I am designing a game that is working on a classic tile engine, but whose world is generated randomly. Are there existing games or algorithms that do this? The procedural generation algorithms I have found are never using a tile system... What would be the best way to generate a whole "world" using a tile system? I am not talking about mazes of blocks, but an overall "world map" thanks

  • 5
    \$\begingroup\$ This has been asked many times, try searching here for: random world generation Edit: Here's one for a tile engine. \$\endgroup\$ Commented Oct 19, 2011 at 20:25
  • 2
    \$\begingroup\$ -1: This question is unanswerable in its current form. It is way too vague, only stating that it is a "world map" made of tiles. OK, what kind of tiles? What do these tiles do in terms of gameplay? This could be anything from Final Fantasy to Civilization, and the "best way" to generate terrain for those two games is completely different. There is no way to provide an answer that will provide good gameplay without knowing anything about how you plan to use it. Before you can talk about procedural generation of anything, you have to be able to manually make a good version of it yourself. \$\endgroup\$ Commented Oct 20, 2011 at 6:07

3 Answers 3


Your question leads you into the field of procedural content generation.

Tile-based world generation derived from continuous/analog methods

By continuous, I means something that is not tiles, something that is analog, an example being a vectorised map. You can use any continuous technique for generation, and then quantise it. For example generate a high resolution Perlin noise image, then reduce it's resolution to fit your tilemap size, and sample the pixels to provide yourself a heightmap. (Heightmaps can be a great starting point for your world.) This because you mentioned seeing sources that didn't show you what to do in regards to how to apply it to tiles.

Tile-based world generation using a "blinkered" carving approach

With a tile (cell) based approach, you can do a sort of a blind generation where you generate the world bit by bit without looking further than eg. the directly neighbouring tiles, but this tends to look like the work of an insect. This is typical CA (cellular automata) stuff, and displays little larger scale intelligence.

Tile-based world generation using a broader world view, top-down

This takes a more intelligent approach to building the world tile by tile, since it will first build it region-by-region. In this way you get control over eg. different biomes, political regions, etc. as Tarn Adams has done in Dwarf Fortress. Of course this requires you to think a bit about how you would like to divide up your world. There are many ways, you will have to do your own research.

Procedural content generation is a pretty broad topic, so you'll need to do a good amount of reading before getting a solid idea of what it is you really want and how to go about it -- the devil is always in the detail. For that reason, some good sources for this are the rec.games.roguelike.development mailing list (a ton of information on tile based procedural worlds), AmitP's game programming pages (look under "Other Topics") and last but not least, the Procedural Content Generation Wiki.

  • \$\begingroup\$ None of these methods take into account the gameplay purpose of the map. Any of these methods could generate terrible playing maps. Of course, the OP didn't say what a good map would look like, so... \$\endgroup\$ Commented Oct 20, 2011 at 6:08
  • 6
    \$\begingroup\$ @NicolBolas Exactly. The OP needs something to go on. I don't need to write a full essay for every answer (though evidence shows that I do that often enough). \$\endgroup\$
    – Engineer
    Commented Oct 20, 2011 at 7:42
  • \$\begingroup\$ Agreed, "playable" is an heuristic best left to OP. "Playable" is one layer above the actual generation of a "random world," and not required by the original question. \$\endgroup\$ Commented Jan 24, 2019 at 21:40

Procedural generation is an immense topic. How deep are you willing to go?

Nick Wiggill's answers are top-notch. I'd add to that by suggesting that you look at some mathematical methods of creating coherent random terrain.

Perlin noise offers a great way to create smoothed randomness, and works great for all sorts of terrain. Simulating erosion can give a realistic impression of height (although you may not need that since you're doing a tile-based game)

A lot of the techniques discussed in papers like this one by Oddlabs, makers of the Tribal Trouble, work well in 2D and at low resolutions, too. If you're more comfortable with this kind of approach, learning these techniques may be worth your while.


Spelunky's Procedural Space - a great introduction to procedural content generation by Darius Kazemi

Spelunky is a 2D game by Derek Yu that has some great Procedural levels.

There's also a procedural content wiki http://pcg.wikidot.com/


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .