Tuesday, December 15, 2015

Zookeeper DJ - Dec Game Jam - Ludum Dare 34

The theme for Ludum Dare 34 was either "Growing" or "Two Button Controls". After brainstorming a variety of ideas I settled on the idea that the player is a Zookeeper feeding animals so that they grow. I remembered playing an old Game & Watch game Fire when I was 10 years old and decided to do a modern take on the game.



Historically my experience in design has leaned towards games that leverage strong systems such as progression systems, level ups, inventory, skills and upgrades. This game jam I decided to focus on a completely different area of design which some designers refer to as Synesthesia. Strictly speaking Synesthesia causes people to experience one sense as a different one - but in video games people sometimes colloquially use the term to describe games which base a large amount of their fun on the sensory experience: music and rhythm games being chief among them.

If you haven't played the game yet - now's a good time to try it out. Click here to check it out! (If you're a Ludum Dare participant please vote for me too!  .


I knew I was on to something really early on because my first playable after the first night had terrible art, almost no sound presence but was already pretty fun.

The game after 6 hours of development.
The basic game mechanics did not change after the first 6 hours of development. The next 42 hours was entirely focused on polish, content, and tuning/iteration.

When I was adding bounce sounds to the food objects I knew I wanted the bounces to sound slightly different from each other and then took the idea a bit further to make the bounces play different sounds. Unsure of what sounds to make them play I tried grabbing 6 sound samples on the Pentatonic scale and had the trampoline choose among them randomly on each bounce. I had become familiar with the Pentatonic scale from watching Bobby McFerrin's TED talk which I highly recommend if you haven't seen it already.


I knew I wanted people to play the game for 5-10 minutes. I didn't want a game experience that was only 1 minute long, but I also didn't want people to grind out endlessly on progression systems. Since the bouncing of the balls meant that the gameplay was deterministic the answer seemed obvious to me: art content.

Players like to be surprised. Sometimes you can surprise them with a cool new enemy, or a new ability, and players tend to really love dramatically new art. I decided right away that the game would focus on 5 tightly tuned levels that each featured their own art. I didn't know at the start that I would eventually also do custom music and sound samples for each stage.
The panda level got drawn first and took about 4 hours. This made me confident I could draw 4 more levels before the end of the game jam.


A big challenge was getting the notes to fall in interesting patterns. For about half of the game jam I just had the notes generated according to a fixed pattern that repeated over and over. I realized right away I do not want people having to be in 2 places at once, that is simply too frustrating. So I feel back on my tried and true game jam technique - using pixels in an image to specify level data. In this case, black and white pixels in a Photoshop file would specify the spawn points for food.

The image is read from left to right, top to bottom. The black pixels represent "spawn food".
Every beat was represented by 2 pixels. That meant that each row was 1 bar in 4/4 time. Since each food took 3 and a half bars to cross the screen then every 4 lines became a natural breaking point for knowing a new sequence of food was dropping. One really neat consequence of this is that anytime two black pixels were within 4 rows of each other it meant the player would have to be in 2 places at once! This made the level design much easier - I could fill the level with black dots and visually watch for 2 black pixels that were too close together.

In case that's confusing I drew the following illustration to show how the pixels turn into food spawns.

In order to use this technique effectively in Unity you need to make sure you import your textures with filtering and compression turned off - otherwise your image obtains compression artifacts or anti-aliasing which causes the information to get lost.


After playtesting a lot I realized that part of allowing a level to feel satisfying and "complete" I needed to end on a closing note on the Pentatonic scale so whenever you reach the end of the level the animal ALWAYS forces the lowest note to be played. This tiny change made the game feel WAY better - prior to that the level would often end with the player having this sense that the level was not truly complete.

Another polish detail to really give that closing sense of satisfaction to every level is to make every level end with a very easy sequence of notes. I don't want the player to mess up and drop some food near the end causing the song to feel like it came to an abrupt end. This doubles down on that sense of completion at the end of every level.

Selecting which level to play next was very challenging with two button controls. This is the part of the game I'm least happy about. I really don't like the 2-second delay. I had debated making it so you spin the 5 levels on a carousel by moving right and then 'select the level by pressing left but I felt really strongly that the player needed to learn how to move their character consistently from the very beginning. Had it not been for the 2-button restriction I definitely would not have done the level select this way.
Level select is definitely sub-optimal but at least it fit the 2 button controls restriction.

It's interesting in watching people playtest the game since the game jam ended how many players I've seen instinctively reach for their mouse as soon as a level ends and the congratulatory screen comes up.

A minor crisis occurred Saturday night when I uploaded a WebGL build and then discovered the background music was not sync'ing to the action! I don't know if the latency was due to WebGL in Unity or Chrome's implementation but either way the desync between the rhythm and the bounces was unacceptable. I fiddled with various appraoches for about 5 hours and finlaly settled on generating all the drumline music for the levels as a single 4-bar clip that is forcibly started at the start of each measure by the game object that spawns the food. This helps to ensure that if the audio of one of the systems does desync, at least they desync together.

The finishing touch on the game was adding the score and trophy system. Since the game has a strong Rock Band vibe to it, even though the mechanics are different, I knew that players would enjoy getting 100%. I added the code to award a silver trophy for finishing the level with at least 60% and a gold trophy with 100%.


Tuesday, December 8, 2015

Mad Scrap - May 2015 Game Jam

Name: Mad Scrap
Date: May 2015
Team: Zaven H, Mike H
Duration: 48 hour weekend game jam

I did this jam with two co-workers. We did it the weekend Mad Max was coming out on theaters, hence the name of the game. Zaven is a designer with an art background and Unity experience which is fantastic for a game jam. It’s great when your artist creates art and hooks it up without any assistance – things just magically show up in the game! Mike was our core programmer – he had some prior Unity experience.

From a design POV I wanted to play around with random level generation. The levels are generated from hand-designed pieces.

The level pieces are bitmap images where each pixel in the bitmap represents a tile type. This allows us to use Photoshop as our level editor. Here are some sample level bitmaps:


Phase 1 Level


Phase 2 Level


Phase 3 Level
In the images above, black represents an open pit, red is spikes on the ground, blue is a rock wall and green is a pushable wall. The magenta and cyan represent power-ups and health pack spawn locations. These simple bitmaps are basically a makeshift level editor. This is a game jam technique I learned last year that basically lets you transform Photoshop tools you're familiar with (copy-pasting, drawing, etc.) into a poor dev's level editor.

All of the tiles are 16 pixels wide (which translates to 16 grid units wide in the world) and any number of pixels tall – the random level generator adjusts automatically for variable heights.
The level is generated in Phases. Each phase has a set of tiles available to it and a length
  • Phase 1: 
    • Tiles 1-1, 1-2, 1-3, 1-4, 1-5, 1-6, 1-7 
    • Duration 3 Tiles long
  • Phase 2: 
    • Tiles 2-1, 2-2, 2-3, 2-4, 2-5, 2-6, 2-7, 2-8, 2-9, 2-10, 2-11, 2-12, 2-13, 2-14, 2-15, 2-16, 2-17, 2-18, 2-19, 2-20  
    • Duration 5 Tiles long
  • Phase 3
    • Tiles 3-1, 3-2, 3-3, 3-4, 3-5, 3-6, 3-7, 3-8, 3-9, 3-10
    • Duration 5 Tiles long
The tiles can be reflected horizontally and vertically for additional variety.

We used Perforce for revision control and Trello for task tracking.

You can play the game here.