Product
Overall, I think my product was very good for a first try. While it might not have been polished, it was fairly fun. I was quite critical of myself throughout the entire process – looking at everyone else’s blogs, I noted how much better their graphics were than mine, but I didn’t think quite long enough about that to realize that that didn’t tell me anything about gameplay. I doubt I’ve created a winner, but I think, at the least, I’ve been able to bring a little joy to the people who play my game, which is a good first step. Certainly, it was very gratifying to receive the first few comments, at which point, I knew I’d done something far better than my own views on it (maybe it’s less fun when you’ve played it for hours on end, trying to debug it). The Ludum Dare is certainly more difficult to complete than one would imagine, and it was pretty much intense coding for 48 hours even to get what I got.
Process: Write Once, Debug Forever
On Friday, at 10:00 EST, the theme was announced. Bet you didn’t see that coming. I thought of ideas for about 30 minutes, and then I generated a list of ideas that I had thought of. Really, my two favorites were having the item be duct tape (because who doesn’t love duct tape?) or acid. At the time, I envisioned both being played on a world made of lines (this thought proved to be perhaps the worst thought I had in the entire contest), so the technical challenges of each were very similar. However, I assumed that duct tape would be a fairly popular idea, since if you ask anyone sensible what the single most useful item to have is, they would say duct tape. Also, I think that the acid idea had more potential, although I wasn’t sure.
I spent from then until midnight working on getting circle-line intersections done well. I probably used a bit more wolfram alpha than was necessary, because solving for x in x^2 + (mx+b)^2 = r^2 is not the hardest thing in the world. I also failed to realize that that equation existed originally, and tried using trigonometry to get the answer, to no avail. Looking back, though, I definitely could have done it with trig, so that was a bit of time wasted. I think I also created my character sprites that day. You can really tell that they took me more than 10 seconds to complete.
The next day I worked almost entirely on getting the movement system working. As a programmer, this actually turned out to be my first encounter with numerical stability (or lack thereof). Since everything had to be working on a line, all x-velocities had to be multiplied by m to get the y-velocity, and all y-velocities had to be divided by m to get the x-velocity, and there was some sort of weighting that had to happen so that gravity on a nearly flat line wouldn’t accelerate you 1 m/s downwards, and 100000 m/s to the right. Dividing by m proved to be very troublesome, because it sometimes caused massive numbers to result, and that wasn’t good. I still have such a step in my current implementation, but I also have special cases for everything that could go wrong (almost everything). Once I had finally gotten that working, I had to write the collision code. The code’s algorithm was basically to make the smallest move possible (which would mean that if you crashed into the bottom of a line, you didn’t come out on top – which was a bug that I had frequently very early on) that didn’t upset any other constraints (specifically, it rechecked every other collision box each time a collision moved you, and it made sure that if you were already on a line, and weren’t transferring to the new line, it kept you on the line). This was surprisingly difficult, although I eventually got it with some more math. I also added all the graphics and UI that were used in the game, excluding the title screen & introduction cinematic.
As is evident from the blog, this code DID NOT WORK. It worked sometimes. Not much though. I spent so much time debugging it – it’s a miracle I was using Xcode instead of Code::Blocks, because I really needed a good interface to the debugger. I deleted the code that handled moving around lines twice, and the code that checked collisions once. While it might not seem too bad, each line of code you delete is time wasted. It becomes the LD47, then LD46, and pretty soon, you’re out of time to kill. Also, I had difficulty with OpenGL & SFML, because I couldn’t figure out how to make a texture that had transparent places in it.
The next day, I worked on MORE debugging (let’s face it: the movement code was full of murderous bugs), and added the red line feature. I think that this was a very good decision, because it made the game interesting. It gave the game an obstacle – time. If you don’t destroy the floor quickly, the red stuff will fall, and you’ll die and fail. I also created my level creation tool, which I didn’t release because it’s buggy and unintuitive. I also implemented the system that let me show pictures before a level started (e.g. the instructions presented to you before the first two levels) and let you go to the next level. Most of the day was spent debugging, and I ironed out about 3 major bugs in the movement system (ARGHHHH!!!), and created the system for the title screen & introduction cinematic (which makes it relevant to the contest! XD). Those went without any trouble. I created all 5 levels that day as well. I compiled it on my Windows machine that day as well, and submitted it.
Good Things (Do More of These)
- I stayed motivated throughout the 48 hours. Often I hit an obstacle that seemed insurmountable (See: Movement), and thought about giving up, but I could never put down my computer for more than a minute before I thought to myself, How awesome would it be to succeed on my first Ludum Dare? (Answer: Really awesome)
- Even though I am a very algorithmic programmer, I gave a lot of thought to graphics and audio. Of course, thought doesn’t make it happen, but if I were making a game with a bigger time constraint, they would have gotten done.
- My code was moderately neat! I didn’t really get to use the OOP I love so much beyond having it as syntax sugar (storing two variables, xPos & yPos is uglier than storing 1 variable, pos with pos.x & pos.y), but I got my code roughly organized in a tree, with no cyclic dependencies.
- Stayed focused. It’s so tempting to try being on a forum, twitter, and what have you, while still coding. During these 48 hours, I was either programming, creating content, eating, playing soccer, sleeping, or blogging about programming (okay, I tweeted about blogging about programming a few times as well). I programmed for long stretches of time with no interruptions, and never was doing more than one thing.
- I created a game. Rather than taking my good ideas, and arduously journeying 90% of the way up a mountain, being confronted by an obstacle, and dumping them into a pit of doom, I took a decent idea, and reached the summit.
Bad Things (Do Less of These)
- I chose to use a complex system instead of a simple one. While I could have used a system based on blocks to create my worlds, I chose to use a system based on lines instead. I use the word “chose” lightly, though. I didn’t realize that I could use the simpler system, because it never occurred to me. I need to think more next time.
- I screwed up my timelapse. Yes, it takes a special kind of idiot to do that. Idiot, thy name is Milo Brandt! Oh well.
- I had no audio. This was mostly a time constraint, considering that I was coding up until the moment that I had to stop.
- My graphics were slightly ugly. This probably was also mostly a time constraint issue, but it also stems from my relative unfamiliarity with OpenGL. My relationship with OpenGL is… complicated. I keep dumping it, only to realize that I love it, and to come crawling back.
The Future
Certainly, I stole a lot of experience from the Ludum Dare, as discussed above, but I think that I generated some very interesting concepts during the contest that might be worth pursuing in the future. While the acid idea would probably, at most, yield me a pretty cool flash game (if I ever bothered getting good with flash), I think that the duct tape idea could create a very interesting game, and could also be extended to be a 3D puzzle game, like Portal. While I definitely have ideas I want to pursue more at the moment, I would certainly be interested to see how such a game would turn out. Also, I look forwards to future Ludum Dares! Bring it on!