Treasure Defender Post Mortem
Because apparently my game died? I don’t know. Anyways, here’s a synopsis of my game, and how I made it. If you haven’t already, you can go get a Windows (sorry Mac users!) download here. While not needed, it might help to play the game before reading.

A screenshot of the current version of the game.
My timezone is pretty nicely situated for LudumDare, and my ‘routine’ of sorts is based around that. The theme is announced at 8PM, giving me time to design a game before I go to bed. Then, the next day, I begin making the game, having gone over many of the details of how the game will work the night before. It’s a really nice system for myself, and it’s worked for me very well in contests previous.
However, this year, I didn’t do that, because I completely forgot LudumDare was happening. The next day, around 1PM, somebody on Steam showed me a screenshot of a game he was working on. I happened to notice that he put the image in a folder named ‘LD25.’ I quickly navigated to the LudumDare website, and lo and behold: There’s a contest going on! So I scrambled together a quick design document that basically said “make that one game with the dungeon and the heroes but with more puzzle” and got to work.
My first challenge was to make a text parser. You see, GameMaker’s room editor, while pretty nifty, didn’t suit my needs in making coordinate-based paths. So, I set to work on making code to read text.
At the time, I didn’t really know about XML at all, and since (to my knowledge) GameMaker doesn’t have any built-in XML reading, I’m not sure if it would’ve helped. Instead, I based my file structure off of Valve’s “keyvalue” format, in which different objects store different facets of data in curly brackets. Here’s what my file structure ended up looking like.
It ended up a bit different in the final version, but you can pretty much infer how it works. I also discovered that, while writing my text parser, GameMaker doesn’t like tabs. Not one bit. When I tried to filter out tabs from the file to get the raw data, it didn’t work, since GameMaker’s code editor interprets a tab as a series of spaces. Consequently, I had to limit myself from using tabs while writing my level files. Lots of fun (NOT), for someone who’s used to writing code!
After getting the text parser up and running, I worked on the basic, boring stuff: Placing and removing towers, making heroes follow paths, etc. Defining which regions the hero would get hurt in ended up being harder than I expected, and I ended up having to do all the base work that you might have to in regular coding. Good practice, I suppose. Consequently, however, the game will give errors if a tower tries to make a hurtful area off the screen. Oops!
A screenshot that shows the first time I got multiple heroes in the same level. It was really exciting at the time! Also shown is a checkerboard background that seems simple, but I couldn’t have made the game without.
Eventually I got everything to a working stage, to where you could play a single level. It was at this point that I had the idea of a “campaign” system. Instead of having a predefined series of levels that the game would play in order, it instead would read a single file that had a list of all the levels that the game would then play in order. This not only meant that I could reorder levels without recompiling, but it also meant that custom level integration would be a helluva lot easier.
Then I made lots of levels. The level making process was actually fairly streamlined. I would use GameMaker’s room editor to map out how the different paths would go and intertwine, and then I would make a text file using the coordinates from that level. I considered making a rudimentary level editor for my own purposes, but I decided that the time spent making a level editor would probably be longer than just typing everything in by hand.
After that, it was polish time. I always try and keep the graphics in my games very simple. I ended up using the hero placeholder sprite as the final thing, just because it easily conveyed direction, and I can’t draw people (turns out that was a bad idea). I used SFXR to create some simple sound effects, and then used Sonar Home Studio to create a nice jazzy song for the main menu. I thought both turned out nicely, and others especially liked the music loop (one even asked why I didn’t keep the loop going during the game).
But enough about making the game, let’s talk about how it turned out.
The Good
- Education! I always try and learn something new with each LudumDare. In years previous, I learned about surfaces, primitives, and vector math. This year, I learned about text parsing, and some nice methods involving paths.
- Music! I write and play music a lot, so I always try and showboat every LudumDare. I ended up chickening out a bit this year though, as I used a drum loop. As a drumset player, I felt pretty bad about it. Otherwise, the music turned out fairly nicely.
- Custom levels! I absolutely love games like TrackMania and Portal 2, not only because they’re lots of fun, but because of the community level creation aspect. Level editors have always been one of my favorite features of games, and I wanted to create that in one of my own games. Even though the level editor is Notepad, I’m still pretty happy with it.
- References! Sticking in the “name” and “occupation” qualities for heroes was purely so I could add in jokes. I’ve compiled a list of every reference made in the game, if you’re curious.
The Bad
- Design! My hastily designed design left me without much design to design my design around. Consequently, I only packaged 8 levels because that’s how many I felt were really unique enough to warrant being part of the final game.
- Theme! Lots of people mentioned that they didn’t feel like a villain, since the hero was a spaceship-cursor thing. Even something as simple as a badly-drawn hero could’ve alleviated the issue.
- Tutorials! I wanted to make the first level an interactive tutorial, but I ended up scrapping that because I’m lazy.
- Late start! I need some sort of calendar for these sorts of things.
I should probably wrap this up now. Even if the game wasn’t the best it could be, I had a lot of fun making it, and I hope everyone else has fun playing it.
Oh, and before I forget, here’s a page with every level solution, plus other stuff!
tl;dr: i made a game