Mindless ramblings about the perfect game
RSS icon Email icon Home icon
  • How to build worlds

    Posted on November 21st, 2010 pink No comments

    Joshua Tippetts wrote a post about procedural content generation, covering his approach to landscape generation. He differentiates between “implicit” and “explicit” methods (which I would call “bottom-up” and “top-down”, but who cares about naming) and clearly favors the implicit approach. Both approaches have a (IMHO significant) drawbacks. They are based an algorithms that happen to produce something that resembles a landscape, often only after careful tweaking of obscure parameters. And while they can produce nice looking worlds (after adding water, vegetation, animals and a population), I’m not convinced that this is a good way to create worlds where an entertaining game is to unfold. (This is related to the “sandbox” vs. “story driven” games discussion. I have an opinion about that, which I might elaborate in another post. It’s neither A nor B, more like “story driven sandbox” games.)

    So let me describe two other approaches

    Simulation

    I add this just for completeness. I don’t think that this is really reasonable or even feasible approach, but let’s check it out for the fun of it.

    Instead of generating a world as it is now, simulate its development over time. For the landscape that would mean, you start off with a rocky planet, hurl meteorites at it, simulate tectonics, erosion, and all that stuff and let it run for a few billion (simulated) years. Add in plants at some point along the way – which of course have an effect on erosion – and let them spread around. You might get away without evolution, just add or remove different species at various times. Same thing for animals. And finally you pop some settlers into the world and watch them build villages, cities and kingdoms.

    You even get history for free by recording it. So you do not only get a Kingdom of Blafasel, but also the fact that it is in war with the neighboring Kingdom of Bruhala – a stupid conflict about a small island, because that’s what they were always fighting about.

    This biggest advantage of this approach is that it would not produce the inconsistencies which are inevitable with other approaches – especially when only local knowledge is used.

    Of course this is pretty much nonsense and using this to build a game world would be a huge waste of CPU time.

    Intelligent Design

    No, I’m not a fundamentalist priest. But nobody claims that games work by the same rules as reality.

    Instead of using dump algorithms to crunch numbers, let’s try to simulate what a human game designer does when (s)he creates a game world. The most important thing is that the world serves a purpose. Things link “there is a mountain range here that the player has to cross to reach the other kingdom.” Random methods can still be used to fill in the gaps, but they are heavily constraint by a list of story or gameplay driven objectives.

    I have no clear vision of how such a beast would look like. It might start off with an empty world (say an endless ocean without any land), a set of rules and the objectives (the purpose that this world should serve). Then it starts to shape the world according to the rules, directed by the objectives.

    Shaping means

    • Raise some land from the sea.
    • Put a mountain range here as a border between two kingdoms.
    • Level this area to make room for a mountain village.
    • Place river here to give this wealthy city a big trading route.

    What are those rules?

    • The world consists of continents which are big blobs of rock surrounded by salt water.
    • These plants grows along the coast, those in swamps.
    • This animal lives in forest, that in open plains.
    • A village needs a well or other fresh water supply.
    • A village needs some food sources, and the population is constrained by the supply.
    • Fishermen, Hunters, Farmers, … are food sources.
    • In a religions culture settlements are centered around a shrine or temple.

    And objectives?

    • The world should be interesting. Otherwise the design process could terminate after raising a continent of rock from the sea, without anything of interest on it.
    • The world should be playable. In a randomly generated world, the player might start in a small village in a mountain valley – only to realize that it is surrounded by impassable walls of mountains.
    • The world should allow a certain story to take place. If the game is about an epic war which is going to destroy all of the world, make sure there is someone worth defending, someone, coming from somewhere, who is attacking and a place where the great battle can take place.

    And of course a gazillion more items in each list.

    How to implement a program that can do this is left as an exercise to the reader.

    The process of creating such a world would then be similar to declarative programming. The designer would distill her/his knowledge into rules and set up the objectives that implicitly describe a story.

    [Update 2010-01-10: Fixed links. GameDev.net got a new site and broke some URLs]

  • Links are now on Google Reader

    Posted on November 21st, 2010 pink No comments

    Did I mention that I suck at blogging?

    My dear readership probably noticed that I made a few “Links YYYY-MM-DD” entries, featuring stuff on the web that I read or just thought to be useful or interesting. I do read a lot (I have about one hour commute time every day and a phone that it good enough to read feeds and websites), but manually preparing these entries proved to be way to much work for a lazy person as your humble host. So I just started to “share” these links in Google Reader and in the unlikely event that you care about this, you can find and subscribe to them at http://www.google.com/reader/shared/odahoda.