Phil Hassey - game dev blog
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

Dynamite: Day 16 – Fixing Stuff

So, today my main goal is to build a few levels for this game! Rah! (My title for this post was originally “Building Levels”). But as it turned out, I did very little of that. Instead, I improved and fixed a bunch of broken things.

But first, I added in zlib compression of the level data. This will keep my sqlite3 database nice and small. Worked super easy, took about 2 or 3 extra lines of code. I might even use zlib for my rewind feature, just so I’m not using 2MB of memory for no good reason!

So, I keep on coding here, and I’m finding that in some oddball edge cases the pathfinding code is failing. This is kind of painful. I may have to write up my own A-Star implementation.

.. time passes ..

I did, and it seems to be pretty solid and fast. I even made it pretty “generic” so it might be useful in the future. Maybe I’ll do a post with the code, as I’m pretty pleased with how it came out. I use STL containers for all the internals and it seems pretty zippy even in bad cases.

The next mess I decided to clean up was my rendering engine. As it was, I was making some 10’s of thousands of GL calls. Really. During playing the game this meant I was using about 63% of the CPU. I adjusted my code to use large VERTEX_ARRAY batches, and whatnot, and got it down to a handful of GL calls. Now I use about 8% of the CPU. We’re talking about a 8x gain in speed here. Definitely worth it.

So, I didn’t get done what I wanted to get done today, but I got a ton of other pretty important stuff wrapped up, so I’d call it a win. I’m taking off Sunday, and Monday is the IGF deadline. I’m going to try and get something submitted, even if it’s a very basic game. Who knows, maybe they’ll like it! I’ll definitely be sending in updates to them almost daily until the game is done, so I’m hoping the judges will actually see the game when it is in a more finished state.


Comments are closed.