Status Update – Bugfixes and Performance
Okay, here’s the update.
I spent this week mostly working on fixing bugs:
- Enemy pigeon AI states were being preserved between successive pigeons – now each AI state resets when the pigeon spawns.
- Incoming player sometimes had wonky physics – now it works like it’s supposed to.
- Player has a little better control over where they will land after being scared off.
I also hooked up my very-simplistic profiler and did some quick performance analysis. I’m not having a lot of performance issues, but I do notice it getting slower as the number of birds increases. Here’s something I found that seems interesting:
Each frame takes three passes through the entities (birds, food, dogs, feathers):
- First, to update.
- Then, to render shadows.
- Finally, it renders the surface and then takes a final pass to render the actual sprites.
Rendering is certainly the biggest cost here. Still, I see a concerning amount of time spent on just the update pass, and I’m not finding anything peculiar happening in it. So I think a large enough chunk of time is spent traversing the entity lists, that I’ll likely see a noticeable improvement if I collapse all of it into a single pass. We’ll find out soon, I hope.
Here’s a gameplay sample for this week:
Check back next week!