I read through the FastRenderGroup stuff that DR0ID wrote and liked it, even though the dirty-updates stuff isn't really sensible for a game like Project Alexandria. There's some code in there that "simulates" layers of sprites by storing all the sprites in a list. The lower-layered sprites are earlier in the list, so the higher-layered sprites are drawn over them. I thought it would be faster than the dict-of-Layers stuff I had in the View class, so I wrote my own LayerGroup that does the same thing. It didn't get me nearly as much speed as I thought it would (it bought me like .2 of a second over a 30 second run). Sigh.
Work still needs to be done in order to get the station to run at the right speed. I have two optimizations left that I know I can do.
- Merge images in backgrounds. Images in geometry sprites are already merged, but in backgrounds, they aren't. This won't gain much speed, but it will ensure that we don't lose speed as Carl adds more art.
- Only draw parts of the background that are exposed by the level. This should speed things up a little bit, but I don't know how much.
Once those are done, I don't know what I'll do. I wonder if SDL has z-buffers? Ha ha..
In the meantime, Carl's been arting up the place, and new labmate Chiz started rewriting the dialog! I added him to the roster.
Ethan