Thursday, September 10, 2009

Overhauling the Anguna engine

The nice thing about doing another GBA/DS game is that I already have a working game engine.  There's plenty that I want to change, and a lot that I'd like to clean up (see the previous postmordem posts), but it's nice to have working code that takes care of a lot of the grunt work.

So the past few weeks I've been giving some needed love to the code that drove Anguna.  The first goal was to merge the gba and ds codebases into a single source tree, and just have different make files for the different platforms.  Not for Anguna's sake, but to reuse for the next game.  Of course, some of the stuff (hud, menus, all the code for the DS's second screen) will have to be a bit different for the two platforms, but the majority will be the same.

The next task has been pulling out stuff bit by bit and reorganizing it, reducing coupling when needed, and generally making things less "icky".  Unfortunately, this also means breaking things, so I'm back to that crazy point where I cheer every time I get a sprite to appear correctly on the screen.  It's a bit tedious (especially because I've done this all before), but it's nice to know that as I get this all cleaned up, I'll have a ton of the work done towards my next game (even though I'm still not sure about all the details of said game).  So tonight I managed to get a "black triangle" onto the screen.  It's ugly, but it made me happy:
This, my friends, is my black triangle:  That nasty green background is an ugly "level" that properly got loaded by my level loader and screen drawing code.  (Despite the fact that I didn't bother to find good looking tiles to test with).  The green toady guy from Anguna is a stand-in to make sure my character/sprite code still works.  Which it does.  The fun part is that I hadn't even tested the DS version, but just now, while typing this, I compiled the DS build, and ran it, and it showed the exact same thing!
On a completely different note, I've been playing through a lot of the old-school 2d side-scrolling adventure games (mostly for NES, but some others), trying to get ideas for what works well and what doesn't, for what I like and don't like.  So I might have a few posts here basically just reviewing some of the old games, which will help me organize my thoughts.

No comments:

NNNNNN in 12 hours

I recently announced my NESdev competition entry for this year: NNNNNN , a multiplayer NES port of the Gravitron from VVVVVV .  Now that it&...