Sunday, March 20, 2011

Postmortem for Twelve Hours

The 2011 7DRL challenge has come and gone and although I finished my entry Twelve Hours, it wasn't as fun or interesting as I expected. I learned some stuff about programming and design as well as game mechanics and gameplay - and I get to write a postmortem!

I knew from the beginning I wanted you to be one of many heroes but I wasn't sure if you'd be on the same team or rivals or what the story would be. It took a few days to come up with the 'defend the village' story and until then there was a lot of changing my mind and trying little changes and general aimlessness. The final game still feels unfocused and I believe much of that is because I was unsure what the story would be for the first %50 of the time. The survival theme also wasn't as fun as I expected. Once while playing Star Craft I remember a heart pounding, grueling, gut wrenching level that ended with me nervously watching the timer count down as the Zerg swarmed my Terran base, demolishing my major buildings and cutting through my inner defense, rushing toward my heroes as my last marines fell to give me the few seconds I needed to win. Playing Twelve hours should have been more like that, or any decent zombie movie right before the good guys bust in and save everyone, but it ended up with me either relaxing in the town center while the villagers fend off ghosts or with me trying to keep up with the fighter chasing down a few stray skeletons. I tried to emphasize the heroes and working together to save the weaker ones by de-emphasizing the stats and inventory options but I ended up with a game where those aspects just feel weak and only partially implemented.

As far as technical learning, this was the first time I used the A* algorithm (I had always used Dijkstra maps) and even though there's a lot of hard-coded junk in there, it went well and I can add that to my toolbox. Creating separate Creature and CreatureController classes was, I suppose, the textbook-correct thing to do, but I found that they are so tightly coupled that they might as well be rolled into one class. I've played around a bit with that and it seems much better. I also got to try deploying my second Java applet (the example for my AsciiPanel project being the first). I prefer C# but chose Java since it works better cross platform and because I found the C# silverlight api to be unbearable. The deployment didn't go perfectly and it seems like it isn't working now so I made it run as an applet or a standalone app - which was neat. The code itself is exactly what you'd expect from a 7 day project; it's thrown together, cut's corners, and has a lot of hard-coded junk, but it get's the job done and hints at how it could be improved.

The 7DRL challenge is a neat opportunity for a small project with a deadline that allows for creativity, comp-sci algorithms, storytelling, and trying new things with code design and game design. It's bigger than a code kata but small enough that it's still good for learning. I'm not sure if the 7DRL challenge is more for the players, the programmers, or the RL community, but I definitely benefit from it as a developer. A lot of neat ideas get explored and it can be great fun for the developer even if the end product is aimless and feels like it hints at more than it delivers.

Saturday, March 12, 2011

Twelve Hours, my 2011 7DRL

My 7DRL, initially called Late Start but now called Twelve Hours, is done. You and the other heroes must save the villagers from swarms of undead and survive twelve hours (720 turns). There's 3 different weapons with different properties, 5 different enemies with different abilities, and 6 other heroes with different abilities as well.

Although it's technically complete, and can be entertaining to follow the other heros around, it it often possible to survive by hiding indoors and using villagers as meat-shields while the other heroes bust some undead skulls. That wasn't what I was going for, and you miss seeing what the heroes can do, but I guess that's what the other cowardly villagers are trying to do as well. I seemed to get the best score while protecting the priest or hanging with the samurai.

You can move (arrow keys, numpad, or vi keys) and swap your weapon or armor with what's on the ground ([g] or [,]). You should press [?] when you start to get a better idea of what's going on.

It looks like sometimes the applet doesn't work. You can download the jar file and run it on your machine as a standalone app. Technically this was added after the 7 day limit, but it doesn't affect the gameplay.

The other heroes are:
  • The Fighter has a better weapon and can go into a rage.
  • The Monk can attack multiple times per turn and heal himself but doesn't use weapons.
  • The Priest can turn undead and heal others.
  • The Samurai has a katana and can do a circular attack that hits each adjacent opponent. The Samurai will also commit suicide rather than being turned into a zombie.
  • The Slayer starts with a wooden stake that instantly kills vampires and she heals twice as fast as other heroes.
  • The Wizard can teleport himself and attack others at a distance.

The source is on github at

It uses my previous project AsciiPanel for the old-school graphics.

Monday, March 7, 2011

late start for 2011 7DRL

I can't believe I almost missed this years 7RDL challenge.

(I removed the applet since the final version is now on

Nothing special; start screen, random scenery, walking around.

It uses my previous project AsciiPanel and the source can be found on github at

Tuesday, March 1, 2011

Programming for fun

Hspec is fun; at least it has been for me. People are watching the github repository, adding issues, making suggestions, forking, and fixing it. I've even gotten a few emails asking about hspec! I've also learned more about BDD, git, github, good (and not so good) design, Haskell idioms, and the Haskell community.

Even if hspec doesn't make me a better programmer or improve what I write, it's reminded me of how exciting and fulfilling programming and collaboration can be.