Random vs Luck: A Goal inspired by nethack

(And the template I was using didn’t have bullets.  amazing.  I think this one might be a better choice.)

Life is going better.  It’s got some up and down, but I’m back to coding.  This has me back to thinking about game design theory stuff.

One that’s been a discussion point more than a few times with a bunch of my friends is randomization as part of the gaming experience.

I like many others cannot begin to count the sheer number of times that I have been screwed by the random number gods.  It’s almost without saying that any time randomization enters the picture in a game, it becomes a luck based outcome.  If it’s an RPG, simulation or strategy game of some sort, you encounter the worst monster possible or a 99% chance to hit misses.  If it’s a platformer game or shooter, as you approach the edge of the screen a dispenser that has a random timer between shots will always choose the perfect moment to hit you, as if sniping.

In this sense, Randomness is effectively a synonym for luck.  But I don’t think it has to be this way, I think it just ends up this way out of both sloppiness and carelessness.  To demonstrate what I mean, I almost have to switch gears for a lengthy lead in:

One of the strongest traits I think a game can possess is uniqueness.  Each game should be a new experience of some form, or there really wasn’t much point to it.  Usually you only get this experience once per game, and everything is the same the next time you start the game, making a second play of the game a mere test of memory.

Making the same game give that new and unique feel more than once is an ambitious task, generally accomplished by either multiple difficulty settings, picking a different character, branching stories where each branch has a different ending, the player using self imposed challenges, having a competitive multiplayer feature, or randomized content.

While most choose to implement one or two of those, Randomized content is relatively uncommon – it’s easier to build more than one scenario than it is to build rules to make a multitude of scenarios by throwing dice.  One kind of game that embraces the challenge of creating random scenarios is a very specific subgenre of RPG: the Roguelike.   Many games will randomize to some extent – RPGs are fundamentally based on the dice rolling mechanisms of tabletop Roleplays, but roguelikes take it a step farther than most.

For those unfamiliar with the genre, it is characterized by being like the 1980 game Rogue, a text based dungeon crawler heavily influenced by Dungeons & Dragons, notorious for a learning curve that few games can match.  The game begins with you being dumped unceremoniously in the entrance to a dungeon either wearing crude, borderline useless gear or stark naked.  The dungeon is randomly generated and your goal is generally to get to the bottom/top.   Once there you might have to retrieve an item for someone or kill a god, and your journey is marked by many deaths along the way.  (While not a “pure roguelike”, a modern roguelike fused with arcade beat’em up action would be the Diablo franchise.)

And while your journey features many deaths, there’s a bit of a sting to it: Roguelikes generally feature permadeath, meaning once your character dies, that’s it.  Reroll and start from scratch.  Because the game is random, you are forced to memorize not a dungeon map, but to memorize the bestiary, develop strategies, and learn techniques for survival.

The roguelike became popular with a niche because it was skill rewarding.  If you learned, and played it carefully, you were rewarded by further progress.  If you were impatient and careless you were probably going to destroy your keyboard in frustration from having to start all over.

My introduction to the genre came years ago with Castle of the Winds, on a then relatively new 386, and it took a while for me to figure out that Castle of the Winds was not the same kind of RPG as Dragon Warrior and Final Fantasy.  (It was the traps and the D&D style  that always got my young and inexperienced self.)

More tame than most roguelikes, Castle of the Winds had rich graphics for the time, was relatively simple by roguelike standards, and did not permanently erase your save if you died, allowing you to roll back from a mistake.  Give it a shot if you’re curious about the genre- the author switched it from shareware to freeware some years after it had become irrelevant, and it should be easy to find a full copy for download.  (His personal webpage disappeared in a server crash late last year, it was available for DL there)   It doesn’t work under x64 versions of windows, but should run fine in compatibility mode under any 32 bit version of windows.  (WinXP in a VM is great for this.)

At the opposite end of the spectrum are intimidating monster games like Nethack.  Nethack is the epitome of Learning Cliff.  Hack was a follow up to Rogue very early on, and development was picked up and it was renamed “Nethack” long before the internet even became popular.  Nethack is still maintained and widely ported to this day as an open source software project.  It’s one of those games you almost have to play once, just to understand what the fuss is about.    There are also graphical mods and remakes available, such as Vulture or just “tileset” versions that are the same Text interface with 8-bit tiles layered overtop.

To get a grip for what I mean by “learning cliff”, some examples:

  • you can write magic words in the floor with everything from writing in dust with your finger, using ink or blood with a pen, or using a hammer and chisel.  These magic words have to be learned by simply finding the writings of previous adventurers on the floor and guessing what the missing letters are, as letters fade with time.  These words are located semi randomly (random chance to find them in certain areas) and you almost have to learn the entire dictionary of magic to beat the game.
    (Edit: Apparently, I might be mixing up games.  I went looking at spoilers last night and either I’m not looking at the right spoiler, or only one engraved word has a magic effect.)
  • Status ailments can be cured through a multitude of ways, some ingenious, some obvious.  The most simple being to pray to your god.
  • I might be remembering another roguelike and not nethack, but I believe it’s nethack where if you pick up a basilisk corpse with your bare hands you will turn to stone.  At the same time, you can also put on gloves, pick up the corpse and use it as a flail.  It petrifies your gloves, but you now instantly petrify any enemy you hit!  Enjoy your collection of dragon statues you can’t loot!
  • A mid game tactic is to leverage different kinds of magic against your junk items to transform them into different items altogether.

And that’s just some highlights. The other side of the game is actually kind of odd: Nethack is fun to lose.  There are so many ways to die in Nethack that you will rarely die the same way twice.  Some are comical, some are not, my favorite tale of woe comes from the time I triggered a cursed treasure chest in a shop, was blinded, tripped over a boobytrapped chest which exploded, injuring a level 25 shopkeeper who upon being damaged, promptly crushed me in one hit.  (There was a little more to the domino effect, but I was laughing so hard that only those highlights stuck in memory.)

My experience with Nethack is why I believe procedurally generated (read: random) content extends a game’s longevity.  You will find many posts all over the internet from people who have been playing nethack for years but “just recently X years later beat it”.  (I saw one blog post where a guy said “20 years later, I finally beat nethack”)

However, roguelikes are a curious mix of random and luck.  While being completely random, they aren’t as luck based as you would think – usually the right knowledge, patience, and methodical play will minimize the luck component.  While you explore and learn, your early runs are  mostly luck based, but as you die and learn ways to defeat and overcome the random number god, the randomization itself keeps the game feeling new, exposing you to a mix of old and new challenges even though you’re on your umpteenth dozen run.

That form of random content inspires me.  While I don’t believe most roguelike mechanisms “as is” are fit for mainstream gaming (I fully recognize most people don’t have the patience for the more hardcore roguelikes), I love the goal of a game creating it’s own balanced content to make replays fun.  I also like the idea of people “learning how to survive” and being exposed to new and different challenges instead of “memorizing the game that never changes.”

Another place where modern gaming has worked to mitigate the luck part of randomness comes from leveraging statistics to normalize your dice rolls.  Under a normalization scheme, a time unit is chosen and used to guarantee quoted chances.  If you have a 20% chance to crit, and attack 30 times a minute, 6 attacks per minute will crit as an enforced chance.  This can be accomplished a number of ways, and it takes away from the feeling of being cheated by random chance – the enforcement of statistics makes you do exactly the damage you expected to.

Statistical normalization is not a new concept.  Some tabletop roleplayers, convinced the dice are really out to get them, who always roll too low to accomplish anything, will replace their dice for a deck of cards or a bowl of numbers.   The idea is simple.  A deck of 52 cards is effectively a 12 sided dice with an equal number of chances for each result.  There are only 4 chances to roll a 1, equal to the number of chances to roll a 12.  You will accomplish the exact same statistical average as with dice, but where dice are random, there is a predictable pattern – the same pattern that blackjack players use.  You can count cards and make realistic risk assessment.  No more 1’s in the stack?  You can take more risks, etc.

I can’t help but think there must be some way to unify randomization and skill to create a randomly generated game that doesn’t really require luck.  Perhaps this is just a naive goal, but this is something I intend to work on and flesh out as I work through projects.  Again, I think that “new” and “unique” feeling that each game has on the first playthrough is important.  I’m down for an achievement run as much as the next guy, but if a game can keep showing me something new, it’s good.

Sadly, everything I’m working on right now is static.  I’m working with baby steps while I ponder carefully over long periods of time and I hope the time will give me a chance to arrive closer at some ideas to achieve that goal.

If nothing else, I need more time to learn how to use Randomization in general.  After all, Random is something that has to be done well – if your random pool is too small and gives predictable results…  It really isn’t random anymore, is it?

Leave a Comment