Making an Atari game – Day 18

Tracking magic missile
Tracking magic missile

Now I was thinking about how in Yar’s Revenge there is a little tractor beam/missile like object that follows you around the screen at a very slow crawl as you are trying to take out the main enemy. I always found that dynamic fun, and since it might be too tight to try and have separate types of monsters in the same room together, I didn’t think it would be all that hard to have a tracking missile object in some of the rooms. Which it wasn’t really. It was a pretty easy add to the game and made a huge difference in how fun it is.

Since the beginning I wanted to have trap rooms, where all the doors will close once the player enters the room. This proved to be rather difficult. It’s kind of a long story but I was using the pfpixel command to turn the pixels on and off to open and close the doors. However, for all four doors, that required 24 pfpixel commands, which ate away far too many cycles. I could put a drawscreen command in between drawing the doors, but that made entering a room very ugly. So I went on a search online for a quicker way to draw pixels to the screen. I originally thought I could just change the bits in the variables for the Playfield but that proved to be futile. Then I found the pfhline (Playfield horizontal line) and pfvline (Playfield vertical line) commands. I’ve seen these before but didn’t think to even try them at first because I couldn’t see how drawing a horizontal or vertical line would be any quicker than just changing the pixels. I was wrong. It’s a lot faster and takes a lot less space. What took 24 lines only takes 8 lines now. 

So now I have trap rooms plus more space for something extra later in that bank. The trap rooms will close all doors when you enter a room if there are monsters in it. Once you kill the monsters and collect the treasure, then the doors will open again. Works very much like how Zelda’s dungeon rooms do it. That’s kinda what I was going for.

Adding the Tracking missile and the trap rooms made a pretty big difference in how interesting this game/dungeon feels.