- Edited
Hello, we are making clone of Crossy Road. But we currently have a terrible performance running this simple 3D scene.
On my boss's phone it only get 20 ~ 40 fps.
If you have done Godot 3D game on android, I would be interested in hearing some tips and tricks.
So what do we have in this scene:
- Gridmap to draw the terrain, such as road, river, sidewalk, and those green area.
- Separate Gridmap to draw the static obstacles, such as trees, rock, cone, etc.
- Directional Light
- Moving meshes such as: vehicles and logs on the river.
- Particles, for river effect.
- UI
- Transparent mesh, used to physically draw ray from UFO. (This doesn't appear often)
What we know:
- It was heavy on the GPU, not much is happening on the CPU.
- The heaviest to render is the Terrain. Gridmap Terrain. More on this later.
What optimization tricks are incompatible?
- Baked light, our terrain is randomly generated.
- MultiMesh, there is nothing in our game can be made with multimesh. Each object must be located in exact position.
- LOD, it's a top down game that only move horizontally.
Assumptions:
- Is it because we forget to remove nodes/meshes? NO, we didn't forget to do that, it also already have terrible FPS in the beginning, where not much had been generated.
Now let's talk about the gridmap terrain.
After testing with renderdoc, which I barely understand. I found that the one that took the longest to render, even on PC, is the Gridmap Terrain. I asked my boss to test this game without rendering it's terrain on his phone and it finally can reach 60fps.
My 3D experience is very minimal so bear in mind. This to me is weird because terrain has the least amount of vertices, and there is not that many exist at one time. It also only uses opaque material. We even tried to only use 1 material for every single terrain but the fps still sucks.
I already given up trying to optimize this game. We need help.
What do you think makes this game heavy especially the terrain gridmap? Or was something else that caused the gridmap terrain to be slow?