• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Generating random terrain

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

What is the standard way to generate random terrain over some quadrilateral which has to match a given set of constraints.

Ideally I'm looking for a library that does this:

1. I give it the coordinates of some rect

2. I pass it the terrain textures/tiles and any other doodads/destructibles I want placed

3. I pass it a set of constraints over all the textures/tiles/doodads. Some constraints have to always be true, while others cannot be violated.

Example: "Don't put a sand tile adjacent to a snow tile" or "Always have X number of disjoint areas with forests of some thickness W."

I've read a lot on terrain deformations causing desyncs, so probably won't have those in it. This comes at a cost of the terrain being a bit bland, but better than risking the whole game getting desynched.

Here is example from the GBC DWM2, where a major feature of the game was the generation of many random worlds that featured their own tileset, color of water, trees, mountains, randomly placed towns, etc. I am trying to create that sort of thing.

2rgl6iq.gif


Besides the worlds coming in different flavors (e.g. a snow world, a sand world, a grass world, a jungle world), they also get distinct geographical markings. Some worlds (as above) might have a vast open plain. Others might have large mountain ranges covering the islands/main continent that have be traversed.
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
It's been 24 hours and so I am bumping this thread. Would appreciate any discussions or suggestions to lead me in the right direction. I don't want to come up with a series of algorithms when there's likely some already out there...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
It's been 24 hours

Bumping and multiple posting: A post (or the act of posting) with the purpose of making the thread rise to the top of the listing is called bump(ing). You may only bump your thread if no posts have been submitted to it in the last 48 hours. You may not submit one or more posts after you've posted (double-post, triple-post, quadruple-post...)

http://www.hiveworkshop.com/forums/faq/
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,233
Yeh that is very helpful... Typical lol...

And that is?!

Ideally I'm looking for a library that does this:
I do not know of such libraries. Terrain generation is notoriously a difficult task, as is apparent by all the terrain generation bugs in games like Age of Empires, Empire Earth, Empires Dawn of the Modern world etc. This is why professional games use standard maps with little to no random elements.

I've read a lot on terrain deformations causing desyncs, so probably won't have those in it. This comes at a cost of the terrain being a bit bland, but better than risking the whole game getting desynched.
Only between players who do not run the game at maximum settings and people who run the buggy Mac version with people running the Windows version. Damn annoying but there is little you can do to avoid it. Hopefully the re-release of WC3 that is in the pipe line will fix this.
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
Yeh that is very helpful... Typical lol...


And that is?!


I do not know of such libraries. Terrain generation is notoriously a difficult task, as is apparent by all the terrain generation bugs in games like Age of Empires, Empire Earth, Empires Dawn of the Modern world etc. This is why professional games use standard maps with little to no random elements.


Only between players who do not run the game at maximum settings and people who run the buggy Mac version with people running the Windows version. Damn annoying but there is little you can do to avoid it. Hopefully the re-release of WC3 that is in the pipe line will fix this.

I couldn't find more examples of the randomly generated worlds. But the game is called "Dragon Warrior Monsters 2" for the Gameboy color. In the very least I could try to copy their random world generation algorithm, but I have no idea how to get my hands on it.

It may be difficult but this place is full of experts. Could you at least give an outline of an algorithm that would get me started in the right place? It also needs to be repeatable--that is given some integer seed, it will always generate the same exact world. I'm just very unfamiliar with generation techniques in computer science. I suppose I could try to come up with a grammar (context free?)? Again just looking to be put in the right direction.

Assuming it's done well, the advantages of these techniques infinitely outweigh those of "professional mapmaking," because there's no need to hire expensive terrainers, artists, or level designers for each new map you want to add. I think my task is simplified, because these maps are not for RTS (but there are papers on these, e.g. for starcraft: http://eldar.mathstat.uoguelph.ca/dashlock/CIG2013/papers/paper_7.pdf), but rather just overworlds that players explore.

So I am not sure how much more information I can provide to clarify my response. Let me outline the abstract parameters of the overworld generation algorithm, and then provide me with a critique/better parameters and a high level approach of doing it.

1. A set of tile textures, e.g. T = {snow, ice}

2. A set of doodads, e.g. D = {Northrend Treewall, Glacier}

3. A set of encoded constraints, e.g. C = {"Don't place trees within X range of glaciers", "Always have at least N number of Glaciers with thickness W", etc.}

4. The size of the overworld/dimensions of the overworld, call it S.

Where do I start? Do I start inward from the center (bottom-up) or outward from the edges of the playable overworld (top-down)?
 
Status
Not open for further replies.
Top