Leprechaun goo
Time, she be precious and in scarce supply. I'm trying to put together all of the various bits & pieces I've written or thought about and make something a little closer to a playable version. My current goal is to get most of the player logic done so you'll be able to move the little block around with the joystick.Most recently I've been working on player joystick handling for when the player isn't "on grid". I want to allow the player to reverse direction in "mid stride" as it were. Hopefully this will make the game feel more responsive. This then lead me to thinking about the equate values for the various actions (Run_Right versus Run_Left) to make it simplest to reverse those directions with an XOR. Which then lead me to think about action to sprite lookups, and how to do that efficiently.It's all inter-related. Lots of back & forth. Making tweaks in one part of the code to make it more efficient (less cycles & bytes), then trying to then make sure you've fixed any cross dependencies & assumptions in other parts of the code. i.e. I decided to bit encode the actions, with the 2 LSbits being taken from the current position (or dig counter) for easy animation and the next LSbit being a direction (L/R or U/D). So now I've got to go back through the code and sync up anything where I assume the L/R bit was a different bit.Which then brings me to thinking about sprites. To start with I need 8 running sprites (4 left, 4 right), 8 swinging sprites, 4 climbing sprites & 8 zapping sprites. Unfortunately, I can't figure out how to squeeze a STA REFPn into the top of the kernel so I have left & right duplicates. That's a total of 28 sprites. Now, I know that each level uses 4 pages (256 bytes) of data: 160 bytes for the background, 20 bytes for the gold; which leaves 76 * 4 bytes for other uses, like the sprites. A 8 bytes per sprite, that means I can have 36 different sprites. Enough for my basic needs, but not enough to have separate player & enemy sprites unfortunately. I've also got to figure out how to efficiently copy those sprites into the 16 byte high blocks the foreground bitmap uses.I'm dripping in glue logic.

6 Comments
Recommended Comments