Here is my experience with optimizing the game for Android. My game was running at 60fps on my PC, than I made an Android build, the frame rate was 20 to 30, unacceptable . My game is a retro 2d low-res, my resolution is 224 lines and than it is upscaled by Godot to fullscreen without any filter. The game is simple, sprite-based with a relatively small 8x8 pixels tilemap only for the ground, so not all screen is filed with the tilemap. So when trying to optimized it my first thoughts were the particle systems I use, it is the only thing more complex, with a green smoke that has quite some particles. The second option was the amount of characters on screen, there is a boss that summons a lot of bat minions. But for my surprise, these things were not the problem, but by taking out the tilemap the game went to solid 60 FPS. I don't do nothing fancy with the tilemap, it is static, not procedurally generated. The only thing I could do was to mess with the quadrant size, with no result. Also tried 16x16 pixels, also no results. My tilemap is old school with only the top tiles in the ground with colored texture, the tiles under the ground are solid color sprites. Than the next thing I did was do erase all the solid color tiles and the result: solid 60 FPS. Than I made polygons behind the tilemap to cover the area that had the solid color tiles, result: solid 60 FPS, and the game looks exactly the same as before with the polygon solution. There was a small area with lava tiles that I took out and put a big sprite to replace the tilemap and the result was the same: 60 FPS.
So my questions/discussion is:
- Have other Godot users had the same kind of experience?
- Am I doing something stupid with the tilemaps?
I never compiled Godot myself, but I might try to compile it to help with its development in the future and to dive in this question myself.