So, I made a custom Tilemap system to help make the world, but it has an incredible amount of entities that are loaded, 624 specifically. I wanted to have more space for enemies to interact with the walls and reduce how many get stuck in the walls, which is why there are a lot, But sometimes, the frame rate on my computer dropped by 12 when running at 60 FPS, but only 3 in 30 FPS, but that’s not importaint rn, so is there a really good way to reduce the amount of lag that the Tiles produce? Any Good optimizations I can add?
Note: I did make a buffer period of 15 frames for 14 different groups, with one frame drop(one frame where none of the tiles check if they should update)
Test Scene for Tilemap: PlayCanvas | HTML5 Game Engine
Tilemap Script: PlayCanvas | HTML5 Game Engine
Note: I had to hand-type the list that shows what the 3 rooms look like, and so I’m working on a way to make it so that I can have a bunch of rooms generate automatically for both of the sectors.