0 votes

Hello! I have a player with simple movement and I'm instantiating several enemies around the player. The only thing the enemy does is walk towards the player. When there are around 800 enemies on the map the FPS drops to close to 4.

Any optimization tips? I'll post the images with the nodes and codes here.

Thank You.

Godot version latest
in Engine by (12 points)

1 Answer

+1 vote

There are some tips in the official docs here

https://docs.godotengine.org/en/stable/tutorials/performance/general_optimization.html

but honestly 800 sprites each working with independent scripts is a lot to have on screen at one time. I dont know what your game is but you could maybe have batches of 10 sprites created all working as one unit so there is only one script to run each time but all 10 move the same way with that one script or something similar to that maybe?

by (2,001 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.