how do i optimize the game for android?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SDGN16

I placed 200 red cubes, added sunlight, and opened the shadows. Then I made apk and ran it on android but it was around 15 fps, I changed the settings according to myself, I got max 20 fps. how can i increase fps?

(phone i tested: samsung galaxy j5)

settings and my screen:

:bust_in_silhouette: Reply From: Wakatta

Shadows - No - Use Baked lightmaps
Glow - No - Use Pre-made Glow textures
Multiple Material - Less is More - As the Godot doc suggest less mats make for nice fps
Fog - Absolutely not

I did what he said but the max. I got 35 fps. I don’t understand why it gets such low fps with 200 cubes. Also when I try to increase the fps the quality is very low, how can I increase the fps without lowering the quality too much?

SDGN16 | 2021-01-18 17:23

In all things art there’s always a trade off between Quality and Quantity your job is to find the middle ground

you can use Anti-aliasing on your main or the root’s viewport something like
get_tree().get_root().msaa = Viewport.MSAA_2X to smooth things out a bit

1 ran 1000 cubes on screen (no collisions) and got 44fps but things started to dive after 1200 so maybe its memory related

There’s a great Tutorial in the docs using shaders or MultimeshInstance
The shader version gave the best results

Wakatta | 2021-01-18 18:23