Kotaku AU’s First Homemade Game A Week: Wizkill, A Roguelike

Kotaku AU’s First Homemade Game A Week: Wizkill, A Roguelike

wizkill_2.jpgWell, here it is – our first entry in “Game A Week“, an exclusive Kotaku AU feature where you guys come up with ideas for simple games and I try and code them in seven days.

This little guy is called Wizkill. It’s a roguelike, which means it’s nothing but ASCII graphics, letter-shaped monsters, gold and dungeons. Roguelikes are traditionally quite hard and have a steep learning curve. I’ve tried to minimise the latter by limiting the number of keys, removing classes and providing a single goal (killing monsters), but who knows, it might still take a while to come to grips with.

There’s a score component, calculated when you die or hit level 25. Feel free to post your highest score in the comments for this post. Oh, and if you notice any bugs or want to suggest some changes, add them here as well. If there are enough, I’ll make the appropriate tweaks and release a “final” version on Monday.

If you’d like to start playing, you can download the game after the jump. I’ve also included a write-up on the design and development process, and what I’ll be taking across to my next Game A Week project.Click here to download Wizkill. If you’re running Windows Vista, you ready to go. If you’re running Windows XP, or get the error “App failed to initialize properly (0xc0000135)”, you will need to download the .NET Framework 2.0.

Update: Uploaded a new version to fix a small bug in the dungeon generation code and to make sure the player isn’t surrounded when they enter a new level.

wizkill_ide.jpgThis is the Visual Studio 2005 Integrated Development Environment. Wizkill was written entirely using this IDE, and I plan on writing all subsequent Game A Week projects in Visual Basic .NET. Make fun of it if you will, but it’s the language I’m most comfortable with and, as you can see, quite capable of producing simple games.

I’ve always loved roguelikes. I started writing my first one in QBASIC back in high school. Unfortunately my abilities were limited back then and I could never code anything I was totally happy with. These days, my programming “habits” are much improved, as are the IDEs.

My familiarity with roguelikes is why I chose to make one for the first Game A Week. I had a good idea of all the basic elements a roguelike needs:

– ASCII graphics
– Monsters to kill
– Random dungeons
– Mystery
– Character advancement

Originally, Wizkill was going to be about ascending a tower to kill a wizard, hence the name. There would be only a few levels, but players would have a large number of customisation choices in the form of character generation, items and abilities. After a few hours of coding, I realised such a game would be difficult to balance and playtest in seven days, let alone the implementation of the meat and bones.

It would also be hard to play out a titanic end battle between the player and wizard, seeing as you’d just stand next to him hitting the appropriate direction button to attack. I think it would have been discouraging for the player to spend all this time getting to the wizard, only to die, and would negatively impact the desire to replay.

So I ended up with the current design – 25 levels of random dungeons filled with monsters, and a score component to rate your progress. This way, even if you die, you still have something to show for it. I had thought 50 levels would be a good number, but after playtesting, I found it hard just to get to level 10!

I finished what I like to call “version 1” after two or so days. It included monsters, weapons, armour, healing rations and a store where you could spend gold to upgrade yourself. It was fun, but I felt there wasn’t enough mystery. Sure, finding new monsters could be surprising, but there was no “gambling” mechanic that makes games such as MMOs so addictive.

That’s when I decided to stick in amulets, prayers and perks, and “version 2” was born. Amulets have a small chance of dropping from any monster in the game, and each one has a powerful effect that can be used once per level. Prayers are available to the player starting from level 1, and grant a random bonus every time they’re used. Like amulets, you’re limited to one per level, unless you take the “One man, many gods” perk.

And that leads us to perks. Character development is a key draw card for any RPG, as it allows us to watch our avatar become stronger and overcome obstacles that were once daunting. I had the upgrade store implemented, but it wasn’t enough. So, every five levels the player can select a perk. There are six available, and if you manage to make it to the end of the game, you should have four of these. Perks were hard to design, as they had to provide a benefit no matter what stage of the game the player is at. For the most part, this is accomplished, but there are definitely some perks that are better for late game than others. A novice player, for instance, might take the perks related to scrolls of fortitude early on, especially if they’re struggling to stay alive. However, gold is the key to character enchancement, so an experienced player would see the benefit of taking the gold-boosting perks earlier to reap the maximum amount of gold.

The “sell your stories” feature came out of a loot-selling thing I’d stuck in but wasn’t happy with. I liked the idea of the player benefitting by holding out somehow, and stories seemed thematically correct. Careful story selling is integral to winning the game, and savvy players will quickly realise maximising the gains from this feature is very important.

Developing the game was the easy part, believe it or not. About 1/2 of the development time was spent playtesting and balancing. Monster strength and the rate at which the player acquires gold proved the major influences on difficulty, and I spent hours tweaking values, sometimes by a single digit, to see their effects. After a while, you come up with “rules” in your head. Instead of thinking “this monster should have this much attack power” it’s “monsters should take, on average, two hits to kill at this level”. Once you have some design rules, balancing is easier… but not easy. My biggest regret is hand-making most of the game’s monsters. There are three varieties per level, making for 60 or so templates. The better way would have been to make “profiles” for hard, medium and easy monsters, and balancing them using a formula derivied from the depth. It removes some “personality” from the game, but from a data perspective, it’s one less can of worms.

Overall, I’ve tuned the game to be harder, rather than easier, and I’m not sure if it was the best choice. But we’ll see how we go.

The random dungeon generator was a “last-minute” addition (I put it in about two days ago). Before that, I’d hand made maps, but I wasn’t happy with the result. I thought a random generator would be a headache to debug, but I programmed defensively, and that helped a great deal.

If you’d like a copy of the source code, email loganATkotakuDOTcomDOTau and I’ll send it to you. If I get enough requests, I’ll upload it to Kotaku AU.

Now go play the game!


  • Hmm.. It wont run on my rig. I get the message:
    The application failed to initialize properly (0xc0000135). Click ok to terminate the application.

    Im running windows XP SP3.

  • You died.

    You ventured through 16 portals.
    You had 251gp in your purse.
    6767gp passed through your hands.
    You accumulated 250 fame.
    You killed 254 monsters.
    You almost died 1 times.
    24 rats felt your wrath.
    Your best trophy was: Green umbrella.

    Your score: 10782.

    That’s my latest score. See if you can beat it.

  • Nice quickie roguelike there, I just had a few goes and couldn’t get below level 3, best score is only 325. I wasn’t used to not getting healed by walking around, you really have to manage the scrolls to avoid running low on HP.

  • best score so far is a paltry 216 from 2 levels, every time I get to the third level there seems to be 3 guys right on top of me before i even make the first move 🙁

  • Great work on the random dungeon generator.

    Ages and ages ago I wrote the coolest random maze generator – to be solved using a pen once you’d printed the maze out – but I lost the code 🙁

    The great thing was that the maze could be HUGE and it was possible to create a maze in the shape of letters of the alphabet. Good for birthday parties or just the maze solving nut we all seem to know. Lots and lots of fun. So my suggestion is the ultimate “print and solve” maze generator.

  • You died.

    You ventured through 6 portals.
    You had 113gp in your purse.
    568gp passed through your hands.
    You accumulated 51 fame.
    You killed 93 monsters.
    You almost died 1 times.
    10 rats felt your wrath.
    Your best trophy was: Stinky ogre rag.

    Your score: 879.

  • do you need something other than depth 5 to trigger your first perk? I just made it to level 7 and didn’t have one before i died to an elemental…(even with 4 weapons 4 armour he took all 18 hit points and never died 🙁 )

  • @Vangalorr: Firstly, well done on getting to level 7!

    As for perks, you can select one from the store screen when you go from level 4 to level 5, level 9 to level 10, etc. They’re on the right from the upgrades.

  • You died.

    You ventured through 8 portals.
    You had 54gp in your purse.
    837gp passed through your hands.
    You accumulated 60 fame.
    You killed 112 monsters.
    You almost died 1 times.
    12 rats felt your wrath.
    Your best trophy was: Wizard’s wand.

    Your score: 1324.

    Awesome little roguelike. I like! It’s obviously not as ridiculous and complex as something like Dwarf Fortress or nethack, but I like its jump-in-and-play kind of feel. The only suggestions I could make aren’t really gameplay-related, they’re more like UI issues. I have three of them:

    #1: A save feature. I’d love to be able to quicksave while 3 elementals are chasing me from different directions and see if different strategies could get me out of the situation. I suppose it could be abused for rerolling or something, though. Ah well, maybe just a stats and level saver of some kind.

    #2: Mappable controls. On an ergonomic keyboard, the 8-directionn-hat model is a massive pain in the hand. Mappable controls would be a godsend, as I hate futzing around with external software to do it.

    #3: Don’t autoquit WizKill after death. It’s addictive, and ever second spent away is like a MILLION YEARS. Gimme Gimme More Wizkill!

    Maybe a sneaky #4: Put the wizard back in, but give the score before you get to him and a yes/no dialogue.

    Otherwise, amazingly fun for such a small diversion. Good Job.

  • Oh, by the way:

    You won the game.

    You ventured through 25 portals.
    You had 7776gp in your purse.
    9804gp passed through your hands.
    You accumulated 0 fame.
    You killed 396 monsters.
    You almost died 0 times.
    28 rats felt your wrath.
    Your best trophy was: Wolf hide.

    Your score: 11827.

    Worst victory text ever. I just lost.

  • @Tonjevic: You’re right, it’s not the most moving victory message. Well done on finishing though.

  • Logan, having fun playing, but I seem to keep dieing for no reason (that I can see).

    As far as I can tell, I make a move/attack, then an enemy makes a move/attack.

    A couple of times now I have killed an enemy and died. Text reads:
    You have killed baby orgre.
    You died.

    Enlighten me please?

    Oh, and by the way, those Mongol tickets were of no use in Tasmania :'(

  • @Darren: Sorry to hear about the ticket Darren, honestly wasn’t aware that Tassie was out.

    As for the game, if you take a hit from an enemy that kills you, it won’t come up in the log and will just say you died. So I’d say that’s what’s happening. Make sure you’ve plenty of health before you move near an enemy!

Show more comments

Log in to comment on this story!