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.