So, this was my first Ludum Dare ! And also, the first “real” game I made. You can play it here first before reading this.
First things first : the title sucks. I didn’t have any ideas on it so I just took what first went through my mind.
You might find interesting to read this post describing the whole process. You can also find my quite uninteresting timelapse video here; not of much interest, as i mostly spent my time munching code.
The first think that occured to me, was that the theme wasn’t great, and that nearly anything could be fit into it. As I had wanted to create some rogue-like game, that being one of my favorite genres and in my opinion having a lot of potential. Of course I wasn’t going to go for some groundbreaking game, but I liked the idea of doing something like that.
So I decided that I would “mock” a little bit the theme by having a old man give you a random set of items, those items being stupid… Then you would have to adapt in the dangerous caverns where all the monsters awaited you without much help (I was thinking toothbrushes and stuff). Alas, caught up by time, I ended up only putting in “serious” stuff.
I wanted something simple to play, but fully randomized like the original Rogue so that if players wanted to go on playing they wouldn’t have to stop because I didn’t have time to make levels (which sometimes happened to other participants, which was truly a pity !). That also meant I could really take my time on the game engine, starting from scratch.
I started by implementing a basic loader, that took me about 5 minutes. Then I started work on the map. First big snag and also enormous error, was when I tried using a two dimensional array in AS3. I had never heard of nested arrays so I then assumed for some reason it wasn’t possible, instead of doing some research. I started coding using a very long array. Let’s say that I lost 6hours total, when I discovered I couldn’t do much with this, found out about nested arrays and learned using them, and cleaned all the mess left by the giant array.
So I worked on the generation algorithm. Didn’t know anything about that, so I sort of improvised to imitate Rogue. The algorithm goes through the map, and sometimes starts creating a room of variable size. After that, it creates corridors between rooms… That’s where it sort of became hectic. Thinks started behaving wildly sometimes, so I ended up doing some wall borders then floor all around the area, that way I could stop working on it. I had already spent a day on this. I finished it with random mob and item spawning.
Then came feature creep. I thought, “Line of sight, why not ?”. Ended up spending half of day two on it with no result. Twas fun, but then I started getting nervous about finishing.
I moved on to the inventory system and item interactions. That was pretty straightforward, using different arrays and algorithms. It was quite simple and I think, one of the things I managed the best. You don’t notice it in the game (well, I think) because it works seamlessly and frustration-less. This took me about three hours, max.
Finally, I implemented fighting and mob “AI”. Not really AI, because I didn’t have time to do pathfinding or stuff like that. It’s less than 50 lines of code. It justs checks if the player is standing next to him to attack him, and if not, moves in his direction. And even that’s basic.
Then came features : luckily I had worked by being careful that most things were dynamic, so I could easily implement items/mobs. I was hard pressed on time so I did only a small portion of what I had in mind… That’s where graphics kicked in, pixel-drawing armor/swords/potions. Not much work of course.
The end of LD#20
I think I did really okay, and I might even polish this to get a solid, entertaining game. It’s more of a engine now than anything else, but it could be more. I hope you found reading this interesting !
You can check out the game here, and my 31hrs timelapse of me coding away here.