Making an Atari game – Day 10

Last night I had a dream about how I should be coding the part of the engine that handles all of the enemies in the game. After waking up and thinking about it, I thought it was actually a good idea. That has never happened before. So I spent some of the day implementing it and adjusting where in the code the enemy movements are handled. I had them in the Main Game loop in Bank 3 but was quickly running out of space in that bank. So I shifted them all over into Bank 5, which is the same bank that handles the part of the code that places the enemies in the rooms when you first enter them (Enemy spawn code). So it kind of makes more sense to have this there and have the code more organized.

I also put in place holders for enemy characteristics… Basically, variables that I can adjust later for each enemy that will determine whether they just walk randomly, chase the player, have multiple hit points, and whether they have a weapon to attack with. I also added the code that allows the player to hit the enemy, take a hitpoint away from him/her, and animate the enemy getting hit and/or dying. I originally thought the animation was only going to be temporary just to test it out but I ended up liking it on the first go. It was a lot of fun to kill the enemies over and over and see their flashing/disappearing animation. So I guess I’m going to just keep it as is.

Next I think I might start adding multiple enemies per room instead of just the one? I’m hoping to have at least 3 if the variables will be available for it.