I am using Godot as my game engine and I am making a basic 2D game, I have a small map with 1 Player and 5 Enemies walking around in it. The game includes some basic code for walking and shooting at enemies, so nothing too crazy. However, the game uses up to 18% of my cpu (I have an Intel Core i7 920) which it usually only does when playing big 3D games. So, what am doing wrong? I think I might be keeping track of to many enemies? I already tried the Low CPU usage option in the Godot settings, but it didnt really change anything.
Here's what I found in the profiler:
I was running for 1264 frames and it gave me this:
Script Functions - 22.79 ms
_physics_process - 80.89 ms
_physics_process - 32.96 ms
_on_Area2D_body_entered - 16.00 ms
check_input (A function checking key input) - 14.37 ms
shoot (Instancing a bullet scene and moving it) - 10.11 ms