Hello! I've come up with the following problem: I was developing a Rogue-Like game on Godot, and while the result came up nicely, i've noticed that it is terribly optimized, and on some machines, it runs at 20 FPS or less, so i've been trying to use the Debugger, Profiler and Monitor tools to track down what is consuming more of the processor and whatnot.
I've noticed that, since i use a TileMap with tiles that i've created, each with its own collision shapes and exported to a .tres file, the number of collisions happening at each frame is quite large (on a smaller testing room i've had 66 simultaneous collision pairs happening, if my understanding of the Monitors tool is correct). That seems to be quite a waste processing power, and i've tried to remove the individual bits of Layer and Mask on every tile to check if the number diminishes, but it doesnt.
So my question is: is there a better way to do collision shapes using TileMaps? (Maybe i need to make invisible static bodies to go on top of a TileMap that doesnt have its own collisions?). Does that truly affect the performance of my game, or am I wrong to believe so and should look elsewhere in my project for flaws? Are Individual images less optimized than using a single, large image to draw a region as to the sprites of the tileset? Also, any tips on how to better optimize a game (especially games with such large maps, even if the main camera doesnt show all of it)?
Thanks in advance!