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 handled reduced it to less than 100 microseconds. After these changed the stuttering that I had been noticing was mostly gone.
Zombies:
With the optimizations to the AI, it actually made the zombies a bit better. The main thing changed is 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.
Zombie Spawns:
With the decrease in the zombie numbers, I wanted to make it so they could respawn but that will take a bit more work than I expected so it’s 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.
The update should be live soon so go check it out and tell me if the performance is any better.