Largee(ish) Tile Based World

Hi guys,
I’m doing a bit of a ‘viability assessment’ on a project idea which is a top down view game where the world terrain is made up of a grid of tile meshes essentially. Use of tile meshes are mainly for stylistic reasons (think DOTA2 etc) however each level will be procedurally generated at run time (it’s the rage right? :P) and so will probably make generation easier.

I’m aiming for a map size of about 2km x 2km at this stage of tiles about 2m x 2m in size. Obviously creating 4,000,000 static meshes as once is probably a not a great idea so I’m just looking for any advice from people that may have worked with something similar before.

When the player moves through the world I’m trying to make it so the player can move throughout the map without any loading. 20x20 tiles at most will probably be visible on screen so i’m thinking of having 60x60 loaded in case I implement any kind of zooming or the terrain has different elevations etc.

Some ideas I have so far:

  • Object pooling – create a set of terrain tile objects and just update the meshes at the edges as the players character moves around the map. E.g. as the player moves in the level the bottom row of tiles would be moved to the top and the data for the top row of tiles would be loaded (mesh to display etc) and the meshes would be swapped accordingly.

  • Spawning and destroying objects in chunks - I have done simple tests and this pauses the game while spawning or deleting objects for a few seconds (when dealing with around 5000 objects). If this can be done on a separate thread then this would probably be the way to go however I’ve read that we’re unable to spawn and destroy objects on threads other than the game thread?

Level streaming – study the built in level streaming system UE4 has to see if that gives me any ideas – on the todo list.

I should also mention that i’m hoping to avoid using instanced static meshes as it will limit me somewhat with what I can do materials. However if ISM’s were the only way then it wouldn’t be the end of the world.

Any help greatly appreciated.

Cheers, Harley.