Before we start, we hope that you all arrived in 2019 and survived the Christmas season.

This week, although it was pretty short, was relatively productive for our small team. We improved our map and experimented with 3d model loading during runtime with Unity.

3D Map Progress

There’s still no result to show, although we’re getting there. As of writing this post, our Core doesn’t even compile!

As mentioned in our last post, we use a “flattening” approach for storing our map and data. Our large map, therefore, shouldn’t take more than 1GB of RAM the most, which is manageable.

In detail, we don’t save the terrain data and entities directly in the map but use an Integer value instead. This value contains a Type Identifier Flag (first bit), some Metadata and the Lookup Index.
There are two arrays, storing the real objects, which can be accessed via the Lookup Index.

We’re still refining our approach, so please keep in mind that the specifics are subject to change in the near future.

Our “flattening” approach explained (metadata are exempted)!

We are going to write an extra post about this process, but not before the Core compiles, other systems are integrated, Code Coverage is improved, and we’re sure that the approach works out!

Runtime 3D Model Loading

On the other side, we intensively researched about what model format to use. The only real requirement is that Unity can load them during runtime. We also want to make sure that materials, textures, and animations work fine.
The problem is that Unity doesn’t natively support model imports at runtime. We took a look at a variety of different formats, but all had their own problems!

Soon, we found a good solution: the relatively new glTF2 format, developed by the Khronos Group. There are a runtime Unity Importer and a blender Plugin available, which both seem to work with minimal effort.

As with the map, we’ll cover this loading process in an extra post, published after we can fully confirm the functionality.

An example model imported into Unity at runtime!

Next Steps

The obvious next steps are finishing the Map and its associated systems to make the Core compilable again. After that, it’s already time to render the map and the entities.

Make sure to follow us on Twitter and subscribe to our newsletter.
Until next week!