Slashdot Mirror


On Randomly Generated Content In Games

Thanks to Skotos.net for their article discussing randomly-generated content in videogames, in which the author discusses pioneering games with random elements, suggesting: "One of the reasons [classic RPG] Rogue was so popular (and spawned so many children) is due to its generation of random content." But he goes on to point out: "Computers don't have the imagination to make good puzzles... asking a computer to create an interesting puzzle is very similar to asking it to tell a story, make up a joke, or create a riddle." The suggested answer is game elements "placed randomly within the [linear] structure", but with recent random level-generating games such as Toe Jam & Earl III striking out, how far should randomness be taken in games?

11 of 89 comments (clear)

  1. Randomly generated content by Jerf · · Score: 4, Interesting

    One of my two "main" programming projects at the moment is a Rogue-like that tries to do for plot what Rogue did for level generation. I put "main" in quotes because it has since been overshadowed by the other main project I'm doing, but I still hope to get back to it someday.

    For anybody else who would like to take this up, since you could probably finish at least a "0.1" release before I turn back to this project personally, I would point out what is probably "the way" to do that sort of thing. The fundamental problem with modern roguelikes is they are too low-level, where "the dungeon" is an array describing what is there, and "the engine" just manipulates this. Thus, "the engine" is only capable of generating really low-level events, like "X killed Y".

    To get a "plot" in place, you need to generate a much higher-level representation of the world to start with. You need to start with what "groups" are in place (cities, towns, nations), maybe run through a routine that does high-level generation of the map (placing these groups in cities, etc.), then iterate down to the next level where the groups are given relationships and placed in actual buildings, then iterate on the landscape again, then build actual people in the context of the groups, then build the place for the people, etc. When you're done, you'll have not only a map like a current Roguelike does, but also an engine with a much higher-level understanding of what the map actually has on it, allowing quests like "Get X out of the evil henchmen's building and return them to Y", etc.

    (Alternatively, you can try to "grow" the land, starting by placing down the general landscape, then adding settlements and using some basic economic rules to govern how they grow and interact, then try to create the "game" at the end.)

    Obviously in a Slashdot post I can't explain too much, but IMHO at least in the Open Source efforts I've seen (and even many commercial ones) this is the fundamental mistake I've seen made at the architecture level that prevents this stuff from working. It probably seems obvious after you've thought about it for a while but it apparently isn't. From here you can probably fill it out too. (If not, perhaps you should be thinking of something else to do. ;-) )

    One warning: You're going to need (or really wish you had) some actual Computer Science to pull this off well, specifically the study of expanding unrestricted grammars into final statements, which is essentially what this is, especially when it comes time to add links between the entities (for instance, antagonism between a "legitimate government" of a town and the underground theive's guild). It's not easy, but IMNSHO it's the only way likely to work.

    I'm quite certain this is possible and I have a design half-sketched out, I just haven't had time to implement it until my other project becomes at least self-sustaining.

    1. Re:Randomly generated content by Snowspinner · · Score: 3, Interesting

      Some English professors I worked with in the past actually worked on something akin to this once. Their goal was to provide a demonstration of either the success or failure of structuralist models of literature, such as those offered by Vladimir Propp in his book Morphology of Folktales.

      If you're not familiar with Propp or with structuralism, you really should be before you do any work on this project. The basic idea is that all stories of a given genre have a common core structure, and amount to filling in the blanks in different ways from story to story. Propp only works with folktales, which are a fairly limited type of story, and structuralism collapsed under some of its own theoretical weight before anyone really got too much further with it, but you shouldn't have much trouble coming up with a structure for fantasy stories - Propp's folktales are actually a fairly good start, and you'd only have to complicate it a bit.

      This is probably a good place to start looking at information about the program mentioned above. I tried the sites it used to be available for download at, and was unable to find a copy still up, but further research, including getting in touch with its creators, would probably prove fruitful.

    2. Re:Randomly generated content by RobotWisdom · · Score: 2, Interesting
      Shuffling in cardgames is just creating random content-- what's critical to a cardgame's success is that it be designed so that a randomly shuffled deck produces interesting variations in gameplay.

      Applying this to Propp's story-elements, randomisation won't help unless the story elements are really orthogonal, which Propp's weren't. I proposed a much more orthogonal breakdown in my Anti-Math notation system, but it's not rich enough for gaming yet.

      Propp's 1927 scheme is one of many I tried to track in my timeline of knowledge representation.

      Incidentally, the Atari 800 had an 8-bit hardware random-number generator that probably worked on thermal noise, unless I'm confusing it with the C64.

  2. SLIGE for Doom by Dave Chess by dpilot · · Score: 5, Interesting

    Dave Chess wrote an automatic level generator for Doom, called SLIGE. Search against "SLIGE" and "doom" and you'll find it on top, add "chess" if you wish.

    I've never actually tried one of these levels myself, but it is automatically generated content for a game, pertinent to the thread. Imagine a pseudorandom (deterministic, repeatable) in-game SLIGE based on x and y coordinates, a garbage-collecting in-core map, and you could have infinite space to play in. The map keeps expanding in your direction of travel, and it gets thrown away behind you. (There would be some problems of course, especially with switches, objects, and monsters.)

    --
    The living have better things to do than to continue hating the dead.
  3. Re:Another Game with pretty good Random Content by Cecil · · Score: 2, Interesting

    Uh. Not in Diablo. I don't know about Diablo II, as I tried it briefly and considered it a boring rehash of Diablo and promptly abandoned it in favour of more interesting games.

    Diablo was quite random. With the exception of "quest objectives" which were merely prefabs placed randomly within a dungeon, the entire dungeon, layout, entrances, exits, doors, rooms were randomly generated for each floor. (Which is why the savegame files could get up to about 15MB if I recall correctly.. hey, it was a big deal when we only had a 1 gig harddrive)

    The only thing it lacked was random quests. It had a okay number of pre-built quests, though, and gave you a random selection of them each time you played. Definitely got stale after awhile though.

  4. F-Zero X had random races by edwdig · · Score: 2, Interesting

    F-Zero X on the N64 had a cup called the X cup, which consisted of randomly generated races. Unfortunately, most of the races were really bland. One time though I was playing multiplayer, with 1 other person and 2 computers racing. Shortly past the start was an almost 90 degree turn. The road wasn't level either, which made it harder to realize how bad the turn was. The two computer cars went flying off immediately. My friend and I just barely managed to stay on the course. That one race was a lot of fun, but otherwise the random courses don't offer much challenge. The only thing that makes them hard is you'll get random patches of track without any railing on the side, making it easy to fall off the course.

  5. Re:An Old Joke by Cecil · · Score: 2, Interesting

    "Diablo", "Master of Magic", and to some extent "Age Of Wonders: Shadow Magic" are some other games that stand out in mind as having an excellent, enjoyable random level design. And they are a lot more dependent on having a good map than Populous was (In Populous, a major part of the game involved flattening the map to build up your castles anyway. So who really cares how it's laid out to begin with?)

    Master of Magic is in my mind the holy grail of randomized level design. Mind you, it only had to deal with a smallish, square-tile based map. I never ran into a map that wasn't enjoyable in that game. They were usually decently well balanced for all players, but not artifically so the way Age of Empires does. Sometimes they weren't completely balanced, but all that meant was a more challenging game or an enjoyable festival of destruction. They were never so unbalanced that one of the players was DOA.

    Age of Wonders seems to be heavily, heavily based upon Master of Magic, but up until the latest version was lacking any random map support at all. Now random terrain can be generated in the map editor, but only the aboveground, and the mapmaker must still add all the cities, dungeons and resources onto the map.

    Anyway, it's not one of those features that only marketing loves. I know a number of people who outright refused to buy Age of Wonders until they got random map support in. It's a big feature for me too, and I love games that do it well (and it can be done well, but it's not easy.)

  6. Re:An Old Joke by irc.goatse.cx+troll · · Score: 2, Interesting

    " "Diablo", "Master of Magic", and to some extent "Age Of Wonders: Shadow Magic" are some other games that stand out in mind as having an excellent, enjoyable random level design. "

    Offtopic, But check out diablo2 LOD 1.10 patch (probably still in public beta, I stopped following it).

    Its mostly the same until you get to hell when they really upped the randomization. Now theres more random monsters that wernt even on the act before, each gaining some more random abilities.
    Really adds onto the randomly designed(well, randomly chosen in some parts) levels.

    --
    Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
  7. PlayStation 2 .Hack-Infestation generated content by Anonymous Coward · · Score: 3, Interesting

    The game uses a randomly generated battle zone, with the random seed based on the name of the zone. The player selects the name of the zone by picking three keywords from three separate lists. This can be seen in more detail on gamefaqs .Hack keywords effects

    While the zone weather, day/night, and element type are determined from the keywords, while the locations of enemies, scenery, and the dungeon entrance on the map appear to be random. They are consistent for each visit to the zone, so the RNG must be seeded from the combination of keywords. The dungeon maze within the zone is also randomly generated, by connecting various prerendered rooms by matching up doors. The level generator only needs to connect rooms so that the doors match up and rooms don't overlap. Rooms may have multiple doors, allowing for loops and dead-ends. Dungeons are multiple levels deep, controlled by the difficultly level of the zone.

    Some keyword combinations are "special" and contain plot elements and bosses and/or cutscenes. These keywords combinations are revealed within the game, or by watching the related anime series.

  8. Darklands by gtshafted · · Score: 2, Interesting
    Does anyone remember an old RPG game by Microprose called Darklands? Darklands was a very different game. It was a game set in Medieval Germany that "generates" infinite "quests" ranging from stealing from Medici merchants, cleansing satanic sites, to helping pilgrims reach the next city safely. The game successfully captures the "feel" of the times and it was very original: the Catholic Church is both holy and full of intellectual elitists (excommunication or something close to it, strongly affects your characters), Christian Saints are treated as demigods you can pray to for miracles (priests in the game were more like clerics should be than in modern D&D video games), witches and satanists were everywhere, aside from prayer the only other magic was alchemy, your characters grow old with age (but you can replace them with younger inexperienced recruits), the seasons change, it was one of the first games employing an rts combat system that bioware now regularly uses, weapons wear down,.... there's probably a lot more that i'm missing but the game didn't really have an ending... just a really big mission which culimates in an animated character saying something through the soundcard! (This was pre-Day of the Tentacle so it was cool. damn I'm old)

    This game killed tons of my grade school hours... and still I don't think i explored all of germany

  9. Randomness vs. AI by DarkGamer20X6 · · Score: 2, Interesting

    There has been much talk about design, or puzzle creation, or tasks that require a "human" mind. I would like to bring into question exactly what random content (specifically randomly-generated dungeons) brings to games as far as gameplay is concerned. I believe that using AI to extend and replace the capabilities of random content could create a better gameplay experience, even if at this point it lacks the ability to design, etc.

    So, what does random content bring to a game? At first glance, I would say not a whole lot. After all, this only creates different content on each run through, but it doesn't alter the basic gameplay. However, it is a fun feature in that it almost forces the player to actually "play" the game. Randomly generated dungeons force exploration. In general, random events force a sort of "trial-and-error" routine that the player must go through in order to progress through the game. You aren't allowed to memorize the map, seek out the best items immediately, or follow the walkthrough; you actually have to play the game.

    So, it's not just a marketing ploy; it does have consequences on how the game is actually played. However, it kind of drops off there. Sure, you can create more complex, or deeper levels of randomness...perhaps even throw in a simple puzzle variant or two, but it pretty much ends there.

    A big point to consider would be what is the player's perception of their abilities within the game's world. One of the things that really kills the gameplay for me, personally, in games like Nethack, Diablo, and .Hack is the feeling that my abilities do not possess any control. That is to say, I want the world to test my skill, and perhaps adapt to my actions, thus giving the feeling that I am somehow altering the world indirectly through my own actions.

    Of course, there do not exist many games that accomplish such a feat, but those that do, even in the most trivial ways, give something more to the formula than Explore, Kill, Collect, Explore, etc. And this is pretty much my point: Random content in games has some use, but by using AI, we can create dynamic content that not only seems logical but can also adapt, or otherwise be extended, to accomodate a player's capability or skill level.

    Therefore, I respect random content, but I believe that the future lies with AI-controlled dynamic content.