Optimization of the isometric engine

Hello,
I would like write simple isometric engine, where the map contains lot of isometric fields/tiles in 3 dimension - like in Minecraft. However, I can not write it in the optimal way.

The camera it’s attached to central box (this simulate the player) and based on his position generates nearby “Chunks”. I divide map for chunks (like in Minecraft) and generates them depending on needs.

Unfortunately, when the program renders these chunks, there is quite a strong lag. When the player stands still, the number of FPS is better, but it is still quite low.

Below I copied the code from my program. Could someone look at it and tell me how I could optimize it all? The amount of FPS and lag are unfortunately too big. I do not have any ideas how to do it better. :disappointed_relieved:

https://www.babylonjs-playground.com/#QDTBMH#6

Hello and welcome

Did you check what was done there:
https://nesh108.github.io/babylon-voxel-demo/

Did you check the mergeMeshes() function and the Solid Particule System ? Maybe great to reduce draw call if you have a lot of tiles. You can also look at the Octree system.

As an alternative, isometric game can be done with a 2d engine, phaser 3 has a isometric plug-in I think. Could be less demanding than 3d.

:slight_smile: Keep us updated on your progress!