{"assets":[],"author_link":"author\/cosine\/","author_name":"Cosine","cat":"LD #25","categories":["LD #25"],"comments":[],"epoch":1356267900,"event":"LD25","likes":4,"metadata":{"p_key":"79984","p_author":"Cosine","p_authorkey":"0","p_urlkey":"288994","p_title":"Treasure Defender Post Mortem","p_cat":"LD #25","p_event":"LD25","p_time":"1356267900","p_likes":"4","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1355443200","event_key":"14","event_name":"LD25"},"source_url":"2012\/12\/23\/treasure-defender-post-mortem\/","text":"<p>Because apparently my game died? I don\u2019t know. Anyways, here\u2019s a synopsis of my game, and how I made it. If you haven\u2019t already, you can go get a <a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-25\/?action=preview&amp;uid=724\" target=\"_blank\">Windows (sorry Mac users!) download here.<\/a>\u00a0While not needed, it might help to play the game before reading.<\/p>\n<p><img alt=\"Here's a picture so that more people read my post!\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/compo2\/201083\/724-shot0.png\"\/><\/p>\n<p><em>A screenshot of the current version of the game.<\/em><\/p>\n<p><span id=\"more-217748\"><\/span><\/p>\n<p>My timezone is pretty nicely situated for LudumDare, and my \u2018routine\u2019 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\u2019s a really nice system for myself, and it\u2019s worked for me very well in contests previous.<\/p>\n<p>However, this year, I didn\u2019t do that, because\u00a0<em>I completely forgot LudumDare was happening.<\/em> 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 \u2018LD25.\u2019 I quickly navigated to the LudumDare website, and lo and behold: There\u2019s a contest going on! So I scrambled together a <a href=\"http:\/\/puu.sh\/1BfrI\" target=\"_blank\" title=\"the red spots make people hurt\">quick design document<\/a> that basically said \u201cmake that one game with the dungeon and the heroes but with more puzzle\u201d and got to work.<\/p>\n<p>My first challenge was to make a text parser. You see, GameMaker\u2019s room editor, while pretty nifty, didn\u2019t suit my needs in making coordinate-based paths. So, I set to work on making code to read text.<\/p>\n<p>At the time, I didn\u2019t really know about XML at all, and since (to my knowledge) GameMaker doesn\u2019t have any built-in XML reading, I\u2019m not sure if it would\u2019ve helped. Instead, I based my file structure off of Valve\u2019s \u201ckeyvalue\u201d format, in which different objects store different facets of data in curly brackets. Here\u2019s what my file structure ended up looking like.<\/p>\n<p><img alt=\"Code! Wheee!\" src=\"http:\/\/puu.sh\/1Bgvg\"\/><\/p>\n<p>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\u2019t like tabs. Not one bit. When I tried to filter out tabs from the file to get the raw data, it didn\u2019t work, since GameMaker\u2019s 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\u2019s used to writing code!<\/p>\n<p>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!<\/p>\n<p><img alt=\"An early alpha screenshot.\" src=\"http:\/\/puu.sh\/1BlIU\"\/><\/p>\n<p><em>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\u2019t have made the game without.<\/em><\/p>\n<p>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 \u201ccampaign\u201d 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.<\/p>\n<p>Then I made lots of levels. The level making process was actually fairly streamlined. I would use GameMaker\u2019s 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.<\/p>\n<p>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\u2019t 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 href=\"https:\/\/dl.dropbox.com\/u\/37624951\/music\/menu.mp3\" target=\"_blank\" title=\"A song\"> a nice jazzy song<\/a> for the main menu. I thought both turned out nicely, and others especially liked the music loop (one even asked why I didn\u2019t keep the loop going during the game).<\/p>\n<p>\u00a0<\/p>\n<p>But enough about making the game, let\u2019s talk about how it turned out.<\/p>\n<p>\u00a0<\/p>\n<p><strong>The Good<\/strong><\/p>\n<ul>\n<li>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.<\/li>\n<li>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.<\/li>\n<li>Custom levels! I absolutely love games like TrackMania and Portal 2, not only because they\u2019re 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\u2019m still pretty happy with it.<\/li>\n<li>References! Sticking in the \u201cname\u201d and \u201coccupation\u201d qualities for heroes was purely so I could add in jokes. <a href=\"http:\/\/puu.sh\/1Eqmh\" target=\"_blank\" title=\"References! Wheeee!\">I\u2019ve compiled a list of every reference made in the game, if you\u2019re curious.<\/a><\/li>\n<\/ul>\n<p><strong>The Bad<\/strong><\/p>\n<ul>\n<li>Design! My hastily designed design left me without much design to design my design around. Consequently, I only packaged 8 levels because that\u2019s how many I felt were really unique enough to warrant being part of the final game.<\/li>\n<li>Theme! Lots of people mentioned that they didn\u2019t feel like a villain, since the hero was a spaceship-cursor thing. Even something as simple as a badly-drawn hero could\u2019ve alleviated the issue.<\/li>\n<li>Tutorials! I wanted to make the first level an interactive tutorial, but I ended up scrapping that because I\u2019m lazy.<\/li>\n<li>Late start! I need some sort of calendar for these sorts of things.<\/li>\n<\/ul>\n<p>I should probably wrap this up now. \u00a0Even if the game wasn\u2019t the best it could be, I had a lot of fun making it, and I hope everyone else has fun playing it.<\/p>\n<p><a href=\"https:\/\/dl.dropbox.com\/u\/37624951\/LD25\/solutions.html\" target=\"_blank\" title=\"Stuff!\">Oh, and before I forget, here\u2019s a page with every level solution, plus other stuff!<\/a><\/p>\n<p>\u00a0<\/p>\n<p>tl;dr: i made a game<\/p>","time":"December 23rd, 2012 1:05 pm","title":"Treasure Defender Post Mortem","title_was_empty":false}