I'm currently working on an isometric strategy game. The "level" consists of basically two parts - a two-dimensional heightmap, and a two-dimensional character grid. These two parts correspond directly, each being a two-dimensional array of dimensions AxB. The heightmap is the basic geometry of the level, while the character grid dictates what type of thing each grid unit is (grass, sand, water, etc).

Now, here's where I'm having trouble: both the heightmap and grid change quite frequently, and tend to be rather large dimensionally (128 x 128 needs to run smoothly). In my original implementation, I had a different mesh for each grid type, and would create an entity for each node in the grid, like so:

This achieves the desired result in that I have a game grid that I can modify on the fly, but framerate leaves quite a bit to be desired. My suspicion is that there's a much more efficient way to do this with static geometry that gets recompiled whenever a change occurs, but I'm a little stuck as to how to begin that, or if that's even a good idea.

One thing which may help a bit is to not create a distinct entity for each tile/node,but just add a "tagged" pcmesh to the existing one.Probably you could also save the "character grid" by not using a complete entityjust for "ground type" information, and instead use pcproperties with a "clever"naming scheme so you can lookup what type of ground some node is made of.It could perhaps even be skipped if you used eg. some part of the material name forthat, which would be assigned to the tagged pcmesh I mentioned earlier.