Tuesday, March 13, 2012

An overview of "sneak" and Roguelikes

I am writing a “Roguelike” game in Python which is codenamed “sneak”. Roguelikes are a subgenre of role-playing games (e.g. Ultima) with a focus on tactical game play and turn based combat. As mentioned, the game is being written with Python, a language I am learning by doing. It is a flexible language that has helped make a number of commercial successes, such as Civilization IV, EVE Online, and many more. Beyond that, Python is one of the several supported languages for “The Doryen Library”, which is a library specifically designed for Roguelike development.

Roguelikes have a long history in the world of gaming. The genre’s namesake is Rogue, which was released around 1980. It had several notable features, even though it was only the beginning for Roguelikes: permanent death, challenging atmosphere, turn based combat, randomly generated levels, and ASCII ‘graphics’. While Rogue itself got little exposure at its prime, it got enough. It quickly inspired Hack which eventually became NetHack, a game that just about every Roguelike player has tried (though probably not beaten). Not too long after Hack started to make its rounds, another Roguelike came out: Moria. It went onto inspire the creation of Angband, both of which are set in the famous Lord of the Rings universe and notable as the only major Roguelike using a preset setting today. Finally, Rogue also inspired Linley’s Dungeon Crawl, which is now Dungeon Crawl Stone Soup, and my personal favorite of the three ‘major’ Roguelikes.
The aforementioned history lesson is important because the three ‘major’ Roguelikes have given me a few key things. They’ve given me inspiration to continue working on “sneak” and, due to their extensive history, I am capable of studying their changes and player base reactions. This has actually become a significant part of my game design process, as I can probe the archives for particular changes players like and didn’t like. For example, many people seem to prefer the tactically and strategically challenging aspect of Dungeon Crawl Stone Soup over the arbitrary difficulty that NetHack tends to have. For that reason (and the fact that I prefer playing Crawl) I’m erring “sneak” towards the tactical game play, which includes things such as enemy prioritization and knowing when to run away. On the other hand, arbitrary difficulty includes items that try to kill you when you put them on or monsters that can only be defeated one way.

Roguelikes tend to include the features of Rogue (or they wouldn’t be Roguelikes!) along with several others. Common features in the three major Roguelikes include dungeon ‘branches’ (not in Angband), dangerous terrain (again, lacking in vanilla Angband), and a hugely diverse item pool. Note that staple features of the primary role-playing game genre today are typically not in Roguelikes. Things such as fancy graphics, an in-depth plot, and ‘consistent’ progression are not typically present in Roguelikes, though not unheard of (just not in the major three). As far as “sneak” goes, I intend to include all the relevant features of a ‘typical’ Roguelike and hopefully add some new ones.

Perhaps the most important aspect of Roguelike design is the trade off. For the purposes of “sneak”, I am building the game around the concept of limited explicit rewards. Players will receive rewards, such as items, very quickly, but the game itself will force them to make choices. For example, a “ring of accuracy” might make it so your character never misses, but the player has to stop wearing the “ring of protection”, which makes it much safer to take on dangerous foes in melee. The player could make a third choice: carry both rings around and swap them out as needed. That choice comes with its own trade-off, which is inventory management – if the player carries both rings around, he’ll be weighed down (slightly) and have one less precious inventory slot. This somewhat winded example represents a situation I expect to occur on a regular basis in “sneak”. This kind of decision making might seem excessive at first glance, but it does lead to more engaging and satisfying combat. If players could carry around every item in the game simultaneously, their characters would never be in real danger and that’s disappointing for both me and the player.

My game started off quite a bit differently – for the first few months, it barely resembled a Roguelike. At its conception “sneak” did not support equipping items, dungeon floors, leveling up, and several other core features. With patience, focused effort, and several breaks in-between, I’ve managed to craft something at least looks like a Roguelike. After a year of work I’m quite proud of what was once my novice programming project and I’m quite happy to say it has sprung into something much more. Still, I like to think “sneak” has more future than past in it. The game will one day soon support the more diverse dungeon features mentioned previously, such as branches and lethal terrain. I also intend to add more interesting concepts, such as increasingly varied artificial intelligence and an in-depth stealth system.
Artificial intelligence is a key part of every Roguelikes and each one does it a little bit differently. However, all the major Roguelikes have at least one thing in common as far as AI goes: they all support diverse intelligence systems. For example, in Dungeon Crawl Stone Soup, a kobold is quite a bit smarter than a slime creature. The kobold will avoid dangerous areas whereas the slime will just walk through fire. The player can abuse this mechanic in clever ways (e.g. filling a hallway loaded with slimes with a dangerous gas). Roguelikes are fairly unique in this way as few other genres can claim to support player creativity so much. “sneak” will eventually support a more in-depth AI that ties directly into several other systems, such as stealth. For example, an orc might notice a bad sneak immediately, whereas an ant might not notice the player for a few turns. The ultimate goal is to create an AI that encourages the player to be creative and, of course, tactical.

The dungeon itself has a tendency to become your enemy in Roguelikes. From pools of lava that you can fall into (Crawl) to pits filled with dozens of dangerous monsters (Angband), Roguelikes love to surprise players. Indeed, the mark of a good Roguelike player is typically being prepared to face anything. I plan on “sneak” supporting diverse dungeon features:  pools of acid and deadly traps will be relatively common sights. Traps themselves will be quite unpredictable – you might step onto an alarm trap, alerting all nearby monsters to your presence, or you might as simply step onto a spike trap, leaving your character dangerously low on health. The player won’t be completely helpless against the dungeon itself, though. Certain items and skills will help reduce the danger of traps and increase their predictability.

Items (aka “loot”) are an element at the very core of most Roguelikes. As players progress through a dungeon they collect powerful equipment and useful consumables. Again, “sneak” is no exception to the rule here. The game already allows a large number of items to be generated and they can even spawn with random properties. Design wise much of the focus has gone towards insuring valuable trade-offs occur at regular intervals. Consumables are particularly good at forcing the player to make tough decisions. Most consumables provide some immediately beneficial effect such as healing or mapping out part of the level, but disappear immediately after being used. By design the player can only carry a maximum of twenty-six items, so carrying around several consumables will severely limit a player’s ability to carry useful equipment around. Special artifact items with unique powers will be randomly found and more predictably found in the dungeon’s branches, which are “side dungeons” with a particular theme and heightened difficulty. Like the other items, most artifacts will come with their own drawbacks, such as reduced strength or dexterity, along with the aforementioned inventory concerns.

Ultimately developing “sneak” has been a continued learning experience and a great source of enjoyment and occasional frustration for me. Despite or perhaps because of all my ideas, I am unable to predict an end point for “sneak”. My current plan is to release it well before I’m happy to call it ‘done’, which will help test and develop the game overall, I hope. To put it quite simply: for me, the game has just begun!

Editor's Note: I am fully aware there are more than 3 major Roguelikes - the purpose of this overview is mostly about "sneak". If ADOM, IVAN, or any other Roguelike one might call "major" had influenced me to the extent that NetHack, Angband, and Crawl have, I would have included them.

1 comment:

  1. Interesting. I like the idea of limiting player's options. RPG style games have become more complex and easier to play at the same time. More complex by providing a dizzying array of choices. Easier to play because very few choices require sacrifice.

    For example, the concept of encumbrance is almost completely gone in modern RPGs. Even when the mechanics is present, it is trivial to work around. I like the idea of players having to make meaningful choices in gear selection and (hopefully) abilities.