Saturday, January 8, 2011

Plan ahead to be naked

I thought I had a pretty neat system laid out, where each character's starting armor & weapon used the same value as the character itself. For example, these variables help me define K. Fox when I first start the game:

player = 1
weapon = 1
armor = 1

Similarly, for the bunnygirl I set all these to 11 (sadly not a Spinal Tap joke, it's to leave space in the frames). Anyway, all's dandy until I realize I need to leave a 'blank' option as well, for when you're unarmed or naked. That ends up being weapon = 1 and armor = 31. Doesn't sound like a problem at first... Hours into the inventory system, I realize that I need to large block of checks in about 6 different locations, just to test item slots to see if they're empty.

So, long story short, I spent most of today going back & re-setting all my sprites so that frame 1 is always the un-equiped option. This removes that entire block of code & replaces it a single line. Kinda frustrating, as I actually spent time to think the system out in advance, and yet it was still wrong & had to be redone. hahaha. Clearly I need to stick with coding on the fly. =)

-DirtyC101

No comments: