Making an Atari game – Day 15

The monsters can now shoot. This wasn’t too difficult to implement either. They use the “ball” sprite in the Atari for the bullets. Only one can appear on the screen at any given time (unless I allow flicker), so only one monster can shoot at a time. However one thing I may have to account for later is that sometimes when the player enters a room, if the monster happens to appear kind of in front of the player and looking in his direction, he will shoot at him instantly. This would feel very unfair in the game. So to counter this I think I may add a clock variable later to the game which keeps ticking every frame kind of behind the scenes. Then when you enter a room, all the monsters will check the clock and if 2 or 3 seconds have gone by since the player first entered the room then (and only until then) they are allowed to fire at the player. 

Collecting animating coins
Collecting animating coins

I have added coins in the dungeon to collect. Once you clear a room of monsters, coins will be randomly placed for the player to collect. What I originally planned was once you killed all the monsters, the coins would appear in the middle of the room. Not moving or anything, just sitting there. But something kind of unexpected happened. Because I am basically using the monster sprites and turning them into coins, I forgot to turn the monster movement off. So when I tested the code out and killed all the monsters in the room, all the coins randomly appeared but also started moving randomly around the room. They were using the Monster’s walking code and I kind of liked it. It made it a bit more fun to chase after the coins that were sliding around. So I kept that “bug”. To make it a tad bit more interesting, I may also have them disappear after a given amount of seconds when I add that clock variable. This way the player kind of has to be quick in collecting the coins. I am running dangerously low on variables at this point. Im probably going to have to look for ways of reusing some in “smart” ways in order to finish this project.

Another bug found that I decided to remove was, since the coins behaved like monsters, they also shot at the player. This was obviously ridiculous and easy to fix but funny to find.

At this point Im starting to get excited about sound effects. So far this game has been very very silent. But collecting the coins kind of triggered my brain to the need of high pitched sound effect. I want it to sound fun to collect the coins like the sound in a Mario game. So I looked up the sound effect for coin collecting in Mario on YouTube and then I opened up an Atari sound emulator in my browser and played around with it until I found something similar to see if it can be done. It’s close enough to my liking. Still Not in the game yet, but just wanted to make sure that kind of sound was possible on this system.

I’m a little worried about the sound code. With the Atari I basically have to code my own sound driver. This is something I know nothing about, I’m not sure how many variables it will take and I’m down to my last few. I’m really hoping it won’t be too difficult. I only have one bank left that is virtually unused, which I kind of always planned to use for the sound driver and title screen/menu and ending/winning screen. That “should” be enough space for all of that. Just hoping that when I call another bank for the sound effects it doesn’t go over my 262 cycle count.