Okay, so another Ludum Dare went by, and all we have left is a small, dense game in which we’ve poured all of our willpower.
The Longest Way Down is UP! Yay for the oximoron!
It’s time to go back in time and analyze the ups and downs and hopefully learn something useful.
This was the first time that I actually submitted the game before the deadline instead of struggling with last minute problems during the submit hour. It either means that I’m starting to get the hang of how it works, or that I just don’t care anymore and whatever.
Let’s have an in detail look, shall we?
This one was big. Of all the four Ludum Dares I’ve been in, this was the first one where I picked an idea and sticked with it until the end. In the other compos I used to pick an idea, waste half a day on it, understand that I could not do it in time and start again from scratch with a brand new idea. This was inefficient to say the least.
I managed this time to ignore the costant nag of myself thinking about other ideas. “Hmmm, this isn’t going anywhere. That other idea I had looked interesting, maybe I can try that instead.” Nope, guess what, the other ideas I had were just as time consuming and without an end like all the others. It is the idea of procrastination that is too sexy to resist. Still I managed to keep my instincts under control. End result: there is actually a game done in my LD portfolio! Cool beans. Take that, procrastination!
Keeping it simple
This time around I started playing around with and idea, and managed to keep it snack sized. This was the key that let me finish the game in time. Yes, because adventure games are not as strightfoward as they look, especially without dedicated tools.
Still, even though the idea was small enough, the game still made me sweat for the finishing line. I had to cut down a lot of ideas I had during these two days. and the end result is ermetic to say the least. If this game was a room, it would have the bare essentials to survive. But hey, it’s a game, you can play it and you can finish it, so I’m happy with that.
Unfortunately, it comes with a price. I had to cut out sound completely to make it in time, and in part it is my fault (see below).
Sticking to what I know
I have to admit that the biggest part was played by the fact that point and click games are (relatively) simple to program.
Another big thing was using an ambient that I’ve forged into my back mind in the course of the last few months: Emacs. Amazing IDE and a joy to work with (when you get the hang of it). It is the first LD that I did with Emacs and I’m very glad I did. Fast, lightweight and extremely powerful. It fits perfetly in my workflow and has been a wonderful toon in this weekend.
I started drawing in Inkscape on a whim. I thought about making some mockups and them improve them in GIMP, but then the results I got were so quick and so good that I ended up using it for everything. I am really grateful for that. I got a very good approximation of what I wanted for a fraction of the time.
I’m starting to really love vectorial graphics. Probably because it’s the diametral opposite of pixel graphics, which I can barely stand (and before someone jumps on me, let’s clarify, I do not mean pixel art, i mean those blocky Lego-style graphics where a pixel is the size of your nail and you have a hard time understanding what the hell is going on). I’m definately not one of those atari 2600 aficionados which love this kind of style. To me, the less the pixels are visible, the better.
I’m definitely going to use inkscape in the future for other projects (probably with some improvements).
Going the safe way
For once I did something that I considered a waste of time at the time but knew that was the better thing to do: I decided to play it safe. I’ve been fucked over in the past by trying to getting the pc to do some work I should do.
For Spark, it was tiling. This time around, it was hotspot programming (i.e. the clicky areas). Looks like I had to do them by hand. Took a long time, but looking back I’m glad I didn’t create some weird script that would have been just a waste of precious hours in the end. I saved time and in exchange the game gained some health.
What’s good for the game, is good for you!
This took me longer than I’m willing to admit
Lack of Automation
While I managed to complete The Longest Journey Down in the required 48 hours, there was a lot of stuff I had to cut out to do it. For example, there is no sound in the game, which for me is a big blow. I’m a graphics guy first and a sound guy second, so not having any sound to impregnate the atmosphere like I wanted sucks more than a little.
The reason for this is that I decided to make the game in HTML. This has some great advantages under a lot of aspects: complete control over page structure and code efficiency, familiar language which I know very well, familiar workflow. The problem is, if you want real control of what happens over the page (and maintain your mental sanity in case something goes wrong), you have to pick up your sleeves and type. I don’t trust programs with GUIs since most of the time the barf they spit out is unworkable.
Unfortunately, this can be very slow. The workflow consisted in this:
- Create a mockup of the scene in Inkscape and export it
- Boot up Paint.NET and find out where each interactive element was positioned
- Hard code the coordinates into the source
This was a very reliable process and going back I would do the same, but I think that doing this for a game even twice the size it can be extremely time consuming. I really wished that Inkscape had a JSON exporter of sorts to save some time. I even thought of making a converter from XML to JSON so that the process could be automated more. That of course was just stupid since the time I would have saved would have been a lot less than the time I would have spent creating the game.
So in the end I was between a rock and a hard place. Not much to do other than grinding those numbers into the source. I wish I had some way to automate the process, I would have been able to insert a lot more content in the game.
During Ludum Dares, time is tight. And somehow I still managed to waste more than a handful of hours on Reddit. Why I did that is beyond me. I’m not so bitter about this since I knew that the game would be done in time anyway, but I’m still disappointed in my lack of discipline.
Sometimes, things happen that you just can’t foresee, and you get stumped. Happens all the time, for every project.
This time around, a weird bug popped out during the later development stages. To give some context, I was programming the part where you have to change scenes in the game. What should have happened is: you flush the current hotspots and load the next scene. Done, simple and easy.
Not quite. For some reason, the browser was flushing only part of the hotspots, and was just refusing to flush the other ones. I had no clue to why this happened, and had me stuck for more than 40 minutes. I was looping through the current active hotspots divs and using removeChild to get rid of them.
But Chrome didn’t like it. I was oblivious to why this was happening. For some reason Stackoverflow wasn’t of much help either. I was starting to get nervous, I had to finish the art, the textboxes and put everything together and this bug was preventing everything from getting done.
The loop worked like this: I call getElementsByClassName and collect the divs that I want to remove (they have all the same ‘active’ class). I loop though them using length. Through some rapid debugging I discovered that the length of the array I got was changing every iteration, although I didn’t change it.
What. The Fuck.
Then, after much more imprecations, it hit me. I was naively thinking that the “array” I got from getElementsByClassName was, in fact, an array. It looks like instead it is a pointer to another array with the list of the ACTUAL elements in the document with that class. This meant that every time I removed a div, the array changed. But I was still looping on the original array size, so it was basically telling me “the fuck” and stopped removing them when it started getting ‘undefined’ elements (which were in fact out of range).
Okay, I guess this covers everything that happened during this weekend. Be sure to check out The Longest Way Down (shit title by the way, wish I picked something hipsterish like “Down” or something like that). I like it and I think you may enjoy it. For sure I did while creating it.