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?

4 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. 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. 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.