Ludum Dare 40 Post-Mortem

I haven’t used this blog in a while, mostly because all my recent work has been for my Woodsy Studio projects. If you want to see what I’ve been up to, check out our latest games over there and definitely take a look at our Kickstarter for our next game, which we’ve had a hell of a time publicizing.

This weekend, however, I participated in my first Ludum Dare and, since it was a solo event, I figured I’d write up my experience here. Ludum Dare is a game jam-style event held (worldwide, with no specific location) three times a year. There are two branches of LD, the Compo and the Jam. The Compo is 48 hours and has far stricter rules–only one person per team, all content must be made in the 48 hour period–while the Jam is 72 hours long and allows for premade assets.

I chose to do the Compo for a couple reasons, not the least of which is that we’re busy with work on Echoes of the Fey and the 48 hour time limit was appealing. However, as someone who is, shall we say, a little lacking as an artist and very lacking as a musician, the need to create all my content was somewhat intimidating. I figured I would only go forward with it if I could come up with an idea from the theme quickly, because time would be lacking if I had to make my own textures, music, and sound effects.

The theme was “The more you have, the worse it gets” and I almost immediately know what to do: a collectable score-attack game where each pick up decreases the fidelity of the game itself. During Echoes of the Fey Episode 0, I helped optimize the game, made in UE4, to run (looking ugly) on a laptop with integrated graphics. I figured I could use some of those tricks to intentionally restrict resolution, texture quality, and frame rate no matter the system quality.

I used UE4 again for this jam, and started with the FPS template (code libraries are permitted, though it is recommended to make the game feel as different as possible) just to save a few minutes coding player movement. I stripped out the shooting and changed up the handling of the character to be a bit faster and more responsive for running around and picking up collectables.

This won’t come as a surprise to anyone who has played some of my earlier games, but I kind of have a kick for building procedurally-generated mazes. I haven’t done it in UE4, however, only RPG Maker and Gamemaker. In both those games, I also focused on long, twisting hallways punctuated with large open spaces. With this game, I realized I was going to be (essentially) making first person Pac Man but with a quality-reduction gimmick. So I wanted all turns and halls, no rooms. For that, I read over this tutorial and made a similar system that implements a reverse backtrack algorithm.

The important thing to note for later is that free (non walled-off) tiles are stored in an array that I can reference later.

By the end of the first night, I was generating random, bland mazes to wander around in. No objectives and, importantly, no textures on everything. That was my next challenge. Fortunately, UE4 is really good at making pretty materials. I didn’t dare try to make a high-res texture; instead I decided just to apply normal maps. For the walls, I used render clouds in photoshop to make a nice textured black and white image, then turned it into a normal. For the floor, I traced the lines of a photograph of a stone floor and applied a ton of noise to make it look chipped and textured. I also converted this into a normal map. I applied both of these over a gray texture.

In broad daylight, this still looked kinda gross. You could see how the normals repeated. So I limited vision by only allowing one light source–a flashlight held by the player–and it became clear now I was definitely leaning into a horror vibe. The coins and flashlight were super-low poly meshes I made in blender as fast as possible.

Next up, I coded the game to drop coins semi-randomly around the level. There are two types of “free” squares stored in two separate arrays in the code–bridge and path–for the backtracking algorithm to work. Without going into too much detail (see the tutorial above or the source code to my game posted below for more), by putting them on the “path” tiles, I could ensure that long hallways would generally be filled with coins. I thought running down these halls and seeing the graphics deterioration happen quickly would drive home my gimmick. The coins were coded to send several console commands to incrementally reduce performance and fidelity. Late in the game, running up the score forces the game into window mode and removes two pixels of resolution with every coin.

The game with deteriorated quality

For music, I fell back on an old trick that I used on 26 gy. All content had to be created during the jam, but derivative content was allowed as long as it was significantly changed/altered. I found a very short (five second) clip of old C64 music, stretched it into a three second clip using Audacity, reversed it, and pitch shifted several parts. It’s a bit of a time consuming process (it’s incredibly hard to tell what a five second clip of music reversed and stretched will sound like, so there’s some trial and error) but I don’t really play any instruments and the method can create some creepy unsettling stuff. For sound effects, I used sfxr, a recommended program developed for Ludum Dare.

I wanted both my music and effects to deteriorate along with the graphics, so I imported two versions of every sound–one as created and another run through a ton of high pass filters, giving it a gross, tinny slightly-too-distant-radio-tower aesthetic. As you collect coins, the quality version gets quieter and the messed up version gets louder.

Finally, I had to give players something to fear. Something to run from. Monsters that populate the maze as you pick up coins. I didn’t have time to really put a lot of work into a static mesh for my enemies, so I tried out a couple of abstract low-poly designs with a translucent glowing material and settled on one.

For their AI, I got super lazy. At first, I wanted to make them roam the maze looking for players. I set up a separate object to report the player’s location to every spawned enemy and sent the enemies chasing if the player was within a certain distance. When I tested this, I saw the enemies pass through walls like ghosts. And I decided for my own sanity that I would leave them like that. I didn’t have the time to get them to run the backtracking algorithm.

With the enemies in, I had something I was comfortable calling a game. For a 48 hour jam (where I let myself sleep), that was good enough for me.

I glossed over a lot of the specifics in this write-up, but part of the LD Compo requirement is publishing the source code, so if anyone is interested in the details, both the game and the full UE4 project are available at my page.

And if you like any of the stuff I do, go check out our Kickstarter for the next Echoes of the Fey, which will help me spend more time making our games and less time doing other stuff.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s