Free the Frog

Free the Frog is the game that I developed for Ludum Dare 37.  Help the frog escape so he can make the leap home!

Post Mortem

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.

Dropping Blocks

Dropping Blocks is a falling blocks game that I developed as a warmup for Ludum Dare 37.  Drop the blocks and complete the lines to add to your score.

Dropping Blocks

I took a different approach when developing this game, as I did not create a board structure to hold the blocks.  Each of the blocks is just a Unity GameObject, with a Block script attached which contains its row, column, and center offset for handling rotations.

Every time a piece is dropped, it checks all of the other pieces to determine if any of the blocks are directly below any of the blocks in the actively dropping piece.  If so, then the status of all of the blocks in the currently dropping piece are set to “not dropping” and a new piece is generated.  The downside to this approach is that all of the blocks must be checked every time a block lands.  It may be improved by creating a hash structure using the rows as keys, so that only the blocks in the row below the piece will be checked.

A piece is generated by generating a random number from 0 to 6 and instantiating the block in the arrangement for that piece.  An array of Materials holds all of the colors of the pieces, and is assigned to the block based on the piece types.

The line check code loops through each line index, and then determines if there are blocks at every column in the line.  This is also inefficient, since all of the blocks have to be checked to determine if a block is in each column for the row.  Again, a hash table structure may make this more efficient for checking the row and eliminate some of the unnecessary looping.  When I play the game in the Unity editor, there is a noticeable delay when a block lands.  However, in the Windows build the delay is not apparent so there may be some optimizations made for the Windows build.

 

Turn Back the Clocks

 

Turn Back the Clocks is a series of games that I have developed for the 0h (Zero Hour) game jam.  The objective of the game jam is to develop a game during the autumn time change, so development starts at 2am and ends at the same time, 2am.  For the last two games, I have improved upon the game after the competition is over.

Turn Back the Clocks 3

This game was a space shooter style game.  The objective is to destroy all of the flying clocks.  This game was developed for 0hgame jam 2016.

Turn Back the Clocks 3

Turn Back the Clocks 2

This was a simple game where you press each of the clocks to set the time from 2 o’clock to 1 o’clock.  The color of the clock changes from red to green as you press them.  The clock reverts back to its original state after a period of time.  This game was developed for 0hgame jam 2014.

Turn Back the Clocks 2

Turn Back the Clocks

This was the original Turn Back the Clocks game for 0hgame jam 2013.  The was no real objective, but you could move around the hands of the clock with the arrow keys.

Turn Back the Clocks