« GameSetQ: The GameSetWatch Of Music/Movies/Books/Etc Is? | Main | Gadget Trial - Advance Wars + Anime = ? »

Monday, January 22, 2007

@ Play: Mapping the Infinite Cavern

Roguelike column thumbnail ['@ Play' is a bi-weekly column by John Harris which discusses the history, present and future of the Roguelike dungeon exploring genre.]

It is well known, among those who know of the genre at all (honestly if I see someone misidentify dungeon crawlers with roguelikes one more time I think I might break my tether and start trampling circus handlers*), that roguelike games have random dungeons, but it is not often that this is elaborated upon beyond just the statement. What does it mean to have a "random" dungeon? The meaning of this term is not as obvious as it first appears.

When people talk about a dungeon being "random," they rarely mean truly chaotic, but instead that the layout of rooms and passages, and their contents, are unpredictable enough between games that the player can be surprised to discover what lies in wait for him. This actually demands, not pure, nonsensical randomness, but a well-honed generation algorithm that can turn the output of the random number generator into something consistent and explorable.

If we just set each cell of that grid to an equal probability of being a floor or a wall, what we would end up with would not be playable; we would not be assured of being able to explore the whole thing, or find the stairs to the next level (if we even thought to throw that in there). Random dungeon generation schemes must interpose an algorithm between the generator and the map, and of course that means it is not, strictly speaking, completely random.

Typically, for a dungeon exploration game, it is enough for the game's purposes that the player not be able to deduce the layout of the unexplored portions of the dungeon, but this is itself interesting because Rogue, the first game of the type, did not actually have all that random a dungeon.

roguelevel13.gifRogue generated its levels according to a fairly simple scheme by which the map was divided into a grid of nine sections connected by corridors, each being either a room, a longer corridor piece, an intersection, a dead-end, or (rarely) a maze. See if you can pick them out from this screenshot. Almost every Rogue level follows this nine-sector pattern.

This is significant because, if the player was in a room that was in one corner of the screen, he could know for certain that there was no passage in the walls facing the screen edges. A major part of Rogue's strategy had to do with knowing when to search walls for secret doors and when to move on to check another room. If a room is near an edge of the screen, then that's one wall the player need not waste time checking. And if the player has found nine rooms or room-analogues on the level, he can be sure he's gotten all the treasure, and it's okay to head for the next level, and its nine fresh opportunities for more loot.

Oddly, this doesn't make the game any easier for the designers took its predictability in account when balancing th game's food supply. Learning how to game the level generator became an essential skill for success.

Some mazes, too, present tactical advantages, such as doors that can be closed, or even locked, to discourage pursuers, and loops that wounded characters can travel indefinitely, slowly healing until one has regained enough hit points to make a stand. These things are important to realize because all these games place a high emphasis on coming up with an efficient exploration plan. In roguelikes, time is the greatest enemy. Every move wasted is one second closer to starvation, and that Troll with your name on it could be halfway across the level or just about to walk through the door. The longer you live, here, the sooner you die; the only way to survive is to win.

More recent roguelikes may have more chaotic dungeon layouts than Rogue, but they, too, have design quirks and tendencies that can, indeed must, be exploited by a canny player. Sometimes the game chips in with hints to help the player decide whether to explore or not; Angband provides "level feelings" that can clue players into whether there is a good item on the level, and both Nethack and ADOM provide noises to alert the player when there are certain special rooms nearby. Canny use of knowledge of the game's dungeon generation algorithm, coupled with items like scrolls of magic mapping, often mean the difference between a dead adventurer and a live one.

Novice players think of the slaying of hundreds of monsters as being the primary element of roguelike play. Advanced players realize they should think beyond that, and learn to optimize their resources and figure out item identities. The first step towards mastery is to recognize the importance of this kind of exploration risk-management.

Here are screenshots of typical levels from some of the more prominent roguelikes, and what makes them unique:

angbandlevel13.gifANGBAND
Size: Very large
Chaoticness: Low
Opportunity: Moderate

The image above is of the "compressed" map produced by the game's level overview command; each cell of the above represents several in the actual level, and it feels yet larger in play. On the other hand, while it has much bigger mazes, its level generator doesn't seem too much different from Rogues, just with more sectors and a greater reluctance to leave some empty. But those vast, scrolling levels make up for it, and the shape of its rooms are more varied than most other games as well, with a good number of variations upon the theme of rectangular box (one innovation Nethack has never adopted).

The most interesting thing about roguelike dungeons is the stuff contained within it, and Angband levels have lots of that. They also sometimes supply these incredibly horrible-wonderful things called vaults, which may well have the greatest challenge/reward ratio in the genre. Vaults are large rooms that contain many dozens of monsters, generated far out-of-depth (that is, much harder than the standard for that level), frequently with multiple uniques (think bosses) all in one room. But vaults are generated with treasure to match, frequently containing multiple artifacts. They are such over-the-top challenges that it is difficult to resist trying to clear them out as much for the fun of testing one's self as for the prime loot, but many games end in these places.

nethacklevel13.gifNETHACK
Size: One screen
Chaoticness: Moderate
Opportunity: High

Nethack levels are minuscule in comparison, but they have a much greater variety of special rooms that can be found. The most common of these are its famous shops, which have more logic powering them than many games have at all, but there can also be found temples, swamp, throne rooms, army barracks and beehives to pick some of the more interesting types. Also, unlike Angband and ADOM, Nethack does not bias item generation based on how far the player has gotten in the game. He is as likely to find Greyswandir on the first floor as the twentith, which in the end helps ensure that every room is worth exploring.

nethackmazelevel13.gifIn addition to a large number of non-random, special levels, Nethack is also known for having three other types of random levels besides standard dungeons. Cavern levels, which are wide-open and irregular in shape, are found in the Gnomish Mines and are best known to beginning players. Some way down is the rogue level, a single area that is built like Rogue's distinctive floors. (It has some subtle rule similarities as well, and uses Rogue's ASCII graphic scheme, even in graphic versions of the game!) But most important, and most annoying, are the mazes, which make up the full second half of the main dungeon. Since they take forever to explore and contain few special rooms, they are widely considered one of the game's greatest weaknesses.

adomlevel13.gifADOM
Size: One screen
Chaoticness: High
Opportunity: Moderate

ADOM has multiple dungeons connected by an "overworld" area, but many of them look suspiciously similar to each other. Players looking beneath first appearances will find lots of variety however. One dungeon regenerates levels every time they are entered like Moria and Angband, and one level is unique in that the higher the player's level, the greater the danger he'll find, as it generates monsters of a level that is a multiple of the player's: if the player is very strong, then the monsters seen there will be very very strong! Add in room-shops and a good selection of special levels, including several towns, and you have a game that looks a lot like alternate-universe Nethack. Yet, its random level do not vary all that much, resulting in an impression of sameness at times.

shirenlevel13.gifMYSTERIOUS DUNGEON: SHIREN THE WANDERER
Size: Small (seems larger)
Chaoticness: Low
Opportunity: Moderate

Shiren's levels seems to be larger than they really are. Unlike the other games listed here, the size of one "space" is much larger than one character on a text screen, so less territory can be seen at once. Reduced in scale (as in the illustration, which is a copy of the game's translucent in-game map Photoshopped to remove the background), the map is about the same size as a Nethack level.

Shiren doesn't have many special level types, Monster Houses (similar to Rogue's Zoos, a room with a lot of both enemies and random objects) are just about it, but this is made up for with its many level generation types. Depending on the player's progress through the game, there can be anywhere from four level to fourteen scattered around the board. It isn't too hard to recognize the level types after a couple of exposures, and some (especially the 14-room one) are as simple to exploit as Rogue's.


*Finally, here is a word on the confusion, often seen of late, between dungeon crawlers and roguelikes:

Roguelikes are randomly-generated, overhead-view games about tactics and strategy, with a strong emphasis on gaining information and resource management, and usually featuring some form of "permadeath."

Dungeon crawlers are, technically speaking, a large class of RPG that includes any that involves exploring a dungeon, and thus could be honestly considered to include Rogue and its ilk, but most precisely refers to a type of game that has its ultimate source in the likes of Wizardry and Akalabeth. They tend to provide a first-person interface, although one that may switch to overhead when not actually in a dungeon. The dungeon itself is pre-made, not random at all, and the player controls an entire party of adventures, but if one dies he can typically be revived in town, although usually for a fee.

Both game types were inspired by old-school Dungeons & Dragons, but each focuses on different aspects of that seminal game. Roguelikes focus on the specifics much more, and the idea of surviving general types of situations, such as those provided by the random dungeon, monster and treasure generation tables in the back of the first-edition AD&D DM's Guide, while dungeon crawlers are more like the experience of playing through a specific adventure, with monsters and treasure carefully placed to produce a challenging, but fair, experience, and typically with much greater emphasis on following a story.

In other words, playing a roguelike is like playing an improvised game thrown together on the fly by an expert DM, while dungeon crawls have, as their hypothetical basis, the kind of world that a DM has spend days and weeks inventing, or got out of a guidebook. As far as play goes, crawls are about overcome specific encounters cooked up by the designers, and thus favor linear thought and puzzle solving, while roguelikes are about dealing with whatever comes up, which is more non-linear thinking and problem solving.

Now that that's over with, you guys have no excuse. The next time I see someone calling Izuna: Legend of the Unemployed Ninja a mere dungeon crawl gets trampled beneath my huge, circular feet.

Comments

i like this column a lot, but it suffers from a serious dearth of crawl-related content.

Oh dessgeega, if you only knew....

I actually had a Crawl section for this column in the works, and it took me FOREVER to put together. Unlike the Angband section, I actually pieced together a bunch of little screenshots of a Crawl level into one image, all fitted together to look like one huge screen.

I got as far as uploading it when I suddenly realized, hey, I might be able to speak completely authoritatively about Rogue, Nethack and Shiren's level generation, and I can handle the likes of this column for ADOM and Angband, I know relatively little about Crawl's hyper-chaotic levels.

I mean, it's not even obvious the game has explicit rooms. And the structure of the dungeon is still something I'm researching. So, alas, I made a last-second decision to not include Crawl.

I promise, before too long, I'll devote a column to Dungeon Crawl. Other than Dwarf Fortress, it is the relatively) recent roguelike with the most buzz around it, and definitely deserves greater representation here.

Hm, I tried to link to the Crawl picture above but it looks like GSW filters out such stuff. The URL is:
http://www.gamesetwatch.com/atplay/crawllevel13.gif

You know you could have just yelled at me in the instant messanger! You didn't have to do a whole column about it.

A great read as always, @Play is probably my favourite regular column here at GSW.

i could see how crawl would present a challenge this week, since it generates a very diverse range of maps: some that look like nethack's rooms-connected-by-halls, some that contain long narrow passageways, some that are twisting and chaotic, some that are just a big ring around a giant vault in the center, some that look more like minetown, some that are wholly unique like the big cross. then there's water and lava and a whole host of unique rooms and temples. but i'll look forward to your crawl post, because it's easily my favorite game of the bunch.

You could have just made your terminal really big and hit e(X)plore
to see the whole Crawl map. :) (Love the column, and curious to see
what you do with Crawl; I'm still trying to decide what I think of it,
though I'm enjoying playing it.)


Yeah, right, so the level maps are random in Nethack, and they are random in ADoM, but ADoM have this mysterious feeling of "same-ness" ? WTH ??

Just come out and plainly say that you hate ADoM, already, i am tired of your little hinting at how you dont like it.

Karry:
Point of fact is, I don't hate ADOM. I used to play quite a lot of it, and there are still some things it does that are better any other roguelike out there.

There are, however, some head-scratching things about it, which is why I haven't played it in a while, and my roguelike-playing friends fell off the ADOM-wagon. I've been reading up on the game over the past few days, when my internet connection allows me, and it's confirmed my prior impressions of the game, both positive and negative.

But I won't say more about the issue just yet....

This might be one of the most important issues among what makes one roguelike seemingly more difficult than another. One of the things that makes the danger level of ADoM very manageable is that, aside from a few levels, some of which must be traversed, but which are always in the same place in every game, ADoM levels generate rooms connected by narrow corridors. Which means that when challenging monsters appear, a chokepoint is usually just a few steps away. Avoiding getting mobbed is usually not a challenge. The open levels are rather more dangerous, and getting surrounded is a very real threat.

Crawl, on the other hand, has a reputation for being unforgiving. One of the things that may make it so is the relative openness of many of its randomly generated levels. One of the things I had to learn to do to make the beginning of a game of Crawl survivable, was to plan my steps in advance so that if nasties appeared, I could run to a known checkpoint and begin my stand while I still had full HP.

Rogue, of course, while rich in corridors, makes them unsafe by limiting the range of sight in the corridor to one square. You may only face one monster at a time in the corridor, or two if another sneaks up on you, but you will never be able to see it coming.

Running away from a nasty through a hallway in Rogue is nerve-wracking, because you never know when something else, no mater how weak, will block your path long enough for that nasty to get one more hit in.

Continuing the thought I began in my last post, one of the things that these games can do to increase the tension level is to deprive the player of information they have become used to having.

The most obvious example is of invisible monsters. It hits you, but you aren't sure how to hit it back. A nice touch, I think, in Crawl, is that while the game clearly indicates how close most monsters are to death, it withholds this information for certain undeads and abominations. (Presumably they are so hideous that you have no idea how relevant that gaping hole you just put in it is to its continued activity.) If I meet a normal monster, and in the course of our melee it has reduced me to half health while I have nearly killed it, I might stick around to hit it some more. But if a monster has reduced me to half health, while I have no idea how much damage I have done to it, I will be afraid.

Some great comparisons you've drawn here. Good read!

Post a comment



If you enjoy reading GameSetWatch.com, you might also want to check out these CMP Game Group sites:

Gamasutra (the 'art and business of games'.)

Game Career Guide (for student game developers.)

Indie Games (for independent game players/developers.)

Finger Gaming (news, reviews, and analysis on iPhone and iPod Touch games.)

GamerBytes (for the latest console digital download news.)

Worlds In Motion (discussing the business of online worlds.)


GameSetWatch [Twitter / RSS feed] is an alt.video game weblog from the people who run:



Copyright © 2009 Think Services