The night before the theme was announced I was looking at the themes that were up for vote. What I should have done was come up with an idea for each theme. Or at least tried. Instead, I ended up focusing on one theme that I had a good idea for but then expanded upon it further until I had my mind set on Chain Reaction.
When I woke up the next day I saw that the theme was Evolution. I’m sure the first thing that jumped to everyone’s mind was Pokémon, because that’s exactly what I thought of. I also started thinking about the theory of evolution and Charles Darwin. And then I even took a look at genetics. Maybe I could put something about mutation in my game. Nothing really sparked a game idea, though. I was stuck with no idea and I was freezing up and fixating on it.
Luckily, I had to go on a marathon training run that morning, so I had a good hour and a half to come up with something. I figured with all that time, something would materialize. Instead, I ended up finishing the audiobook I had been listening to, which was Fight Club. That Olympics commercial got me hooked on the audiobooks.
At this point, I was thinking of bowing out of the competition. I’m pretty sure every good idea I’ve ever had has been either in the shower or while I’m asleep. I thought back to the old StarCraft custom map I used to play called Evolves. In it, each player would control all of their troops with one unit who was separated from the battlefield. You would tell him which player to attack using this one unit. The more troops a player kills, the faster their troops will evolve. In order to win, you must destroy the other players’ bases. So usually, the fastest person to evolve their troops would win. It required a bit of strategy and luck, but it was fun.
Obviously I wasn’t about to go building the underlying RTS of StarCraft so I could make something similar. I dumbed down the gameplay significantly so I would have a feasible timeline. I was also using a new library that I haven’t worked with before: FlashPunk. It is similar to Flixel, which I had used for the 0 hour game jam in November. So I especially wanted to pick something simple. I started with just setting up the game loop and getting something drawing to the screen.
I then proceeded to get the controls for moving and shooting working. And hooked up a bullet system for actually firing something. The bullet’s velocity wasn’t hooked up in this screenshot.
Or this one.
You can tell I was testing how the controls felt from an early stage. Tight controls really make a game that much better. I would adjust the movement speeds of the player and the enemies a lot throughout the project. Next up was having something to shoot at.
In comes the basic AI that I came up with. Originally, I wanted to do a sort of Pac-Man style AI, where each of the opponents does something different. Purple was going to shoot at the opponent furthest from them, Red the closest, and Blue the weakest. Later on I would find this to be highly advantageous to Red.
I know what you’re thinking. What happened to the little nub on the ship? Sharp eye, reader. I was going to have the ships pointing in the direction they were traveling, but since I made the movement so fast, I found that it wasn’t necessary.
I fiddled around with the AI until Red wasn’t too dumb. At this point, it would just chase me around the screen and continuously fire at me, which was fine for now. I duplicated Red’s AI and tweaked the variables until Purple and Blue were created. It was nice having these other opponents because red wouldn’t chase me down the entire time. At some point while playtesting with the AI, I thought it would be nice to have someplace to hide from the barrage of bullets. And I would eventually need a HUD for all the ships’ health and experience. So I built bases in each corner and built the information that needed to be displayed for each ship into the base.
I think they’re actually all going for me in that screenshot. Anyways, don’t worry. The AI would change before the end. There’s also a bug in that screenshot. Giant air high five to whoever can spot it. So I’ve got a player controlled character, 3 AI opponents, and the ships can actually destroy each other. Is it a game? Not yet. Still needs, at the very least, a win/lose state. And since Ludum Dare requires the theme to be in place, I need to hook up some sort of Evolution feature.
The easiest thing I could think of was boosting the stats of a ship once they gain enough experience. And with time being a factor, I made a quick decision to do 5 levels. Here’s what I initially came up with for the levels.
It changed as I tried it out and I think it turned out pretty well. The last round of evolution is now the craziest as ships are blowing up left and right as they race to the end. I added very basic game over screens for both winning and losing the game. And I of course put the option of restarting from those screens.
So the game was “technically” complete. The next important thing to get in was sound effects. I’m no expert in making sounds or music with a computer, so I opened up cfxr and created a few beeps and boops for various happenings in the game. I thought making each ship have a different firing sound would be cool and the player would be able to tell who was firing, but since the ships are firing constantly I feel that the effect was lost. If you try hard enough, I’m sure you’ll be able to tell the difference.
After the sound effects were in and tested, I opened up GarageBand to see what I could do with it. Turns out, not a whole lot. I gave up pretty quickly as there were so many things I wanted to polish in the game that would easily be better than any music I would make in the same amount of time. There were also a lot of samples missing in GarageBand, so I did a 1.2 GB software update to get them. I figured next time I tried I would at least have the entire sample library at my disposal.
Instead of an amazing soundtrack, I upped the visuals.
Trails for the ships and explosions for getting hit by a bullet and for being destroyed. I also managed to get a pulsating background in so it wasn’t just all black. It’s made up of 144 grey squares that scale up and down randomly. I had an idea about using the background to reflect the action as it happened. Let’s say Red had just been destroyed. The grey square underneath that could pulse red and send out reverberations of red to the squares near it. Something like that. It sounds cool and if I ever get back to this game, I will definitely try it out.
So it’s just before the end, and I’m noticing that the AI is way too smart. At least for Red and Purple. Going after the closest and weakest opponent kind of gives them an edge over me and Blue. I did away with the opponents’ sense of individualism and made them all behave the same way using a state machine. Every time between 30 and 60 frames an opponent will decide to either go to their base, move to a random spot in the arena, or go to an enemy’s current position. It will also choose a new enemy to fire at. This made the game far more balanced, with Blue and me actually winning some games.
Overall, I’m really happy with the way this Ludum Dare turned out. Even though I didn’t enjoy the theme too much, I managed to come up with an idea, a realistic timeline, and a complete game.
Now that you’re done reading about it, go ahead and play the darn thing!