Skip to main content

Posts

Showing posts from December, 2014

Worst intro cutscene ever?

It's a toss-up which is worse, the intro to Bad Dudes, or the intro to Robo-Ninja.  I'll let you decide:

Bad Dudes:

Robo-Ninja:

Condensing my room definitions

I recently realized that I was doing it wrong in my room definitions. Previously, I was storing the addresses of each section of background wall data, like:

TestRoom.byte#<TestRoomLineDefsA ;background definition..byte#>TestRoomLineDefsA ; The < and > signify low and high bytes of .byte#<TestRoomLineDefsB ; the pointer address..byte#>TestRoomLineDefsB.byte#<TestRoomLineDefsC ; Atari backgrounds are made up of 3 chunks.byte#>TestRoomLineDefsC ; of data which is why there are 3 pointers..byte#ROOM_COLOR_BROWN ;room colors.byte#ROOM_COLOR_GRAY.byte#TOP_CLOSED ;door flags .byte#<EnemyDefSlime ;what enemies are in this room.byte#>EnemyDefSlime.byte#3 ;number of enemies.byte#NO_ITEM ;any special items in the room

That's 6 bytes for each room that are used to point to the background data. Realistically, there's no way I'm going to have more than 255 different room backgrounds. (There's…

Closed, locked, and fake doors

To be somewhat true to the GBA version, Atari Anguna needs doors: doors that open with the right colored key, doors that open when all enemies are killed, and fake walls that don't look like doors, but allow you to walk through them. Plus, since I'm reusing room wall layouts to save cartridge space, I want the ability to say "use room XYZ but seal off the left door"

This was the new challenge this month. I had to find a mechanism for dynamically drawing doors. The general idea would be just to fill in the "door" opening in the wall with more wall -- either some other color for a locked door, or with the wall color for sealed or fake walls.

The trick is dynamically doing this. The top and bottom walls/doors weren't too bad. I made a rule that no enemies will overlap those scanlines, and, by writing separate kernel code for those lines, gave me enough time to modify the background dynamically. It's easy enough to just modify the "background color…