Hey everyone! It’s Rich, the programmer/composer half of Green Pixel. This past weekend Joe and I entered our first Ludum Dare and ended up making this game over the course of 55-60 working hours (which is almost a week and a half at a regular job when you think about it!).

 

Before the Jam:

As much as I love playing and making games, I also love developing really boring but useful tools. Early on Joe and I realised we only have interest in creating games from the NES/SNES era and that means sprite sheets and tile maps, baby! So over the past year, knowing our self-imposed limitations, we’ve been working together to create a set of tools to make our lives as 2D developers easier (every day we inch closer to the “generate game!” button!). Two of these tools, our animation system and tile map editor, became extremely valuable over the weekend.

For the week leading up to Ludum Dare, I started writing a 2D flash engine. We went with flash because:

  1. You can play the game directly in your browser.
  2. ActionScript is a rrreally forgiving language which is perfect for trying to get a game finished in 3 days and not being arsed to fix memory leaks and whatever else.
  3. I haven’t gotten around to making a cutscene tool yet, so movieclips to the rescue! 😀

I had never tried making my own engine before and now I can’t imagine how I got by before. With the tool chain and the new engine in place, Joe could section up a sprite sheet, create animations and I could have it in the game in about 5 minutes.

 

The Jam – Some notes on the creative process:

Friday – First of all, the theme really took me by surprise and I think I actually voted it down a few times haha. Anyway, we heeded the advice of the keynote and spent about an hour or so brainstorming ideas. We decide on a top-down Link To The Past style game where a Mad Scientist would have to gather resources to build a death ray to protect a world he hated from a meteor by smashing up people’s property whynot. I began by breaking the game down into the various objects that needed to be coded. We had the idea to randomly generate the town and the house interiors, so I first broke up the map into equal sized squares. Each square could have a 0 or more houses, each house could have 1 or more floors, each floor would have 1 or more rooms and each room would contain various objects and NPCs. Too ambitious! At the end of the first night and having a bunch of weird-looking half-assed procedurally generated house interiors, it was clear we would have to design some house templates and assign these templates randomly to build the town. We also constrained each house to only have a single floor. The game looked like Colecovision at this point with my amazing programmer art of solid coloured rectangles, but morale remained high!

Saturday – When I woke up, Joe was finished most of the character animations at this point, so I added them to the player and the NPCs. The NPCs just stood in the top corner of each house and didn’t scroll with the map, but they looked good! The big task for the day was grabbing sections of the templates to build the town map and house interiors. We also discovered the size limit on a ByteArray in ActionScript! Fortunately, Joe was able to prune the templates down so we could load the maps. That night we discussed things we wanted to put in the game, but would have to cut if we were going to reach the Monday deadline. We had originally planned on a few different locations (military base, good scientist’s lab) and giving Dr Vile an inventory of collected resources, similar to Minecraft, that you’d periodically have to empty at his lair in order to build parts of the death ray. We scrapped these ideas and just focused on the town game play. By the end of the first full day, we had a clear vision and most of the visuals in place… just no game play.

Sunday/Monday – The long haul! We vowed not to sleep until it was complete! (We actually did end up sleeping, but we also completed it so I guess that’s ok). Jobs for the day: NPC AI (yeah, I foolishly left this until 23:00 on Sunday night), breakable objects, loot spawning, music and sound effects, cutscenes, HUD graphics, game flow (menu – game game over – final cutscene – menu). So… basically half the game. We worked until 9 am Monday and took a brief 4 hour nap and then rushed like crazy to get the rest of the things into the game but it all came together in the end.

 

Scary Times:

  • We had a bug in one of the tools that almost erased all the art for the game on the second day haha. Luckilly, it was fixable while the art was still in the RAM.
  • Generating a ByteArray so large that it crashed the flash game and not really having the time to design an alternative.
  • A bug in the AStar implementation meant that if an NPC was more than 10 or so tiles away, it would take about 20 seconds to calculate a path. AStar is not a lot of fun to debug at the best of times, but it was about 4:00 am Monday. Luckily, the problem was simple and it ran fairly smoothly after that.
  • NPC AI in general. I had never done enemy AI before and there are a lot of things I would do differently now (like not calling the path finding function every frame when they’re chasing you d’oh!)
  • Combat. I had also never really done any sort of melee combat before. It works ok, but it’s definitely clunky and can lead to some garbage deaths.

Good Times:

  • We finished!
  • Pretty much had time to implement everything after stripping down the feature list.
  • Learned a lot in a short amount of time about AI and procedural generation.
  • Doing both code and music has a nice duality where if I get pissed off with one, the other uses the other side of my brain. 😀 Mmm, brain massage.

 

Conclusion:

All in all, it was one of the most fun weekends I’ve had! I already can’t wait for the next Ludum Dare in April. <3

Someone expressed interest in the source code in the comments section for the game itself, so I’ll upload that. I don’t know about the engine code? It’s kind of in an unfinished state and I might release it as an open source library along with the tools some day. Hopefully the game source will still be interesting!

Congratulations to everyone who participated and submitted a game!

Tags: , , , , ,


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]