Free the Frog is the game that I developed for Ludum Dare 37. Help the frog escape so he can make the leap home!
Ludum Dare 37 was the twelfth time that I competed in the 48 hour game development competition. I wanted to create something with gameplay similar to the classic arcade game Frogger.
The trick with this game was getting the movement controls right. I wanted to make it so that you could press the gamepad in a direction, and the frog would immediately move to the next “square”. Therefore, the movements were discreet, so I could not use my typical methods for doing continuous movement. This can be thought of as a big chess board. When a direction is pressed, the frog’s location (a row and column stored as integers) is updated. Then, the frog is pulled to that new location. I had to add a boolean variable to track if the frog is moving, so that no new input is accepted until he reaches his destination.
I wanted to have a lot of mechanics in this game, which have been lacking in my previous games. I wanted each level to introduce something new. I got this idea after watching Super Mario Bros 3 videos, which each level had some new mechanic or concept added.
- The first level just introduces the player to the game, so the player just has to maneuver around the board to reach the exit.
- The second level introduces the guns, which is the first time that the player can actually lose a life. The guns only shoot one bullet at a time and can be easily dodged.
- The next level reuses the gun that I created, but this time it shoots three bullets in a row. It’s a nice way to create a new obstacle with minimal development effort. Using Playmaker makes altering the standard gun relatively simple.
- The next obstacle introduced is the spikes. I think the first spikes may be a little unfair, because they start hidden and pop up right as the player is moving through the game level. If the player looks closely, they can see the tip of the spike when it is down, but maybe there should be some other visual cue. I used a simple Blender cylinder and moved the vertices at one end together to create a cone. I used Playmaker to move the spike up and down, waiting for a few seconds after each position transition. The frog is killed when it collides with the collision box around the spike.
- There is one beneficial power-up in the game. I think one of the flaws of the game is that there are too many negative obstacles at the beginning, and not enough things to benefit the player. The speed booster power-up decreases the amount of time that it takes to move to the next square. I put a long row of spikes, which makes it necessary to use the speed booster to pass. I used trail and error to determine how many spikes would be required in order to have to use the speed booster. Unfortunately, only one level uses the speed booster power-up, so I would have also liked to use the speed booster in another level.
- Another object that the player can interact with is the warp object. I made it so that there are two varieties of warp points, one red and one blue. The red warps to the other red point, and the blue warps to the other blue point. The first level with warps, I made it so that one point is easily accessible and the other is surrounded by spikes. If the player takes the ones with spikes, then the exit is easily reachable. If the player takes the other one, then the exit is blocked by spikes.
- The remaining levels don’t introduce any new obstacles or powerups, but I tried to make them unique by using different obstacles together to make a unique challenge to reach the exit.
For the graphics, I used Blender as usual to model, texture map, and animate the frog. However, when the frog dies, I used the cell fracture plugin for Blender to make an animation of the frog falling apart into pieces.
As for the music, I used GarageBand on my Mac Book Pro again for composing the music. I didn’t do anything really out of the ordinary. I used the dummer track to lay down a unique beat. I made a couple of melodies, which I alternated and swapped instruments. Sometimes I would slightly modify the melody to keep the music interesting.
There were some things that could have went more smoothly while developing the game. I forgot that when you call Destroy on an object, it doesn’t actually get destroyed until the next frame. So trying to do a while loop on all children objects while the number of children is greater than zero will result in an infinite loop and crash Unity. You would think by now Unity would give the option to break out of an infinte loop without crashing and losing all of your work since your last save. There was actually a way to attach the process to the debugger in the IDE and set a breakpoint and mess around with the variables to get it unstuck, but that method is very convoluted and probably wastes more time than just restarting Unity and losing whatever progress you’ve made. There is an editor script that automatically saves when you press play button that goes in the Editor folder, so I should remember to always add that script when creating a new project.
I didn’t care much for the theme “One Room”, so I made the story explain that the frog is stuck in one room. When the frog reaches the quantum accelerator artifact, then he is warped to the same room in a different time and dimension. I actually based the story on the opener from the 90’s television show Quantum Leap.