Download

Setting up an efficient building system

I am currently prototyping a construction game similar to RimWorld, Oxygen Not Included, and Space Haven, but in 3D with a bird’s-eye perspective like Dungeon Keeper and Evil Genius. While I can mostly get things done, I’m kind of struggling to figure out a reasonably efficient way to handle the rendering of the tiles. I was wondering, how do UE4 games like Fortnite, ARK, and Satisfactory handle placing, rendering, and optimizing the different building pieces?

The first thing I thought about was Hierarchical Instanced Static Meshes for every piece. But I also wonder how far I can go with different variations of tiles, since a single HISM can only have one mesh and one material. I do intend to have pre-made maps using Landscapes rather than procedural terrain, and the building area should preferably be reasonably large.

There are three potential construction systems I might try, and I don’t know if that affects how efficient I can be:

  1. A single world-aligned grid, like the classic tile-based games. Everything is built on a single unified grid.
  2. Each major building can be freely placed, creating a local grid for that building only. Much like how Satisfactory, Space Engineers, Planet Coaster (and I think ARK) handles foundations.
  3. Freely placing prefab building “shells” of varying sizes and styles but with a limited grid size. These can then be filled up as desired as with the previous option. Perhaps the buildings could be extended by adding additional “wings” to the building.

For the most part I aim for as much freedom as possible, so I’m leaning towards either the first or second option.

A second question, somewhat related to this: I know runtime editing of Landscapes is still, unfortunately, impossible. But, when placing certain buildings like wells, underground entrances, or mines, is it possible to dynamically create a hole in the terrain? I do have some ideas to bypass this if it’s not possible, but I wanted to be sure if there was a way to do it or not.