Small optimization update.
This update is mainly focused on optimizing the AI . The AI was very resource expensive, taking about 6000 microseconds. After changing up the ai I have reduced it to under 2000 microseconds. The next most expensive thing was the engine, taking about 600 microseconds. Which after fixing the way the font was put in reduced it to to less than 100 microseconds. After these changed the stuttering that I had been noticing was mostly gone.
With the optimizations to the the AI it actually made the zombies a bit better. The main changed being that they don’t spas out as much and there are a lot less of them. Previously there were 90 zombies, I have reduced that down to 50.
With the decrease in the zombie numbers I wanted to make it so they could respawn but that will take bit more work than I expected so its going to have to wait till the next update. In simple terms here how I’m going to do it. Say there are 4 regions. Every so often if there are less than say 50 zombies it will spawn say 10 zombies in one of the regions. Another way I might do it is to figure out which region the player spends the most time in and spawn them there but I’m not too sure yet.
Update should be live soon so go check it out and tell me if the performance is any better.
Leave a comment
Log in with your itch.io account to leave a comment.