Josh Reed
United States
New York
flag msg tools
Hey everyone - first time forum member here, long-time fan of map/board/strategy games although admittedly not too in depth - mostly Civ through 2/3/CTP/4, Catan, various RTS game, now mostly playing a lot of chess.. I also work as a part-time web designer and programmer and have been working on a meta-board game I've had an idea for evolving concepts from checkers/chess through go/stratego/risk up to catan/civ and beyond, with economics built on Civ and combat modelled more RPG-style - part for fun, part to bring myself up to web standards.

Anyhow, I'm working first on a map generator, and really I'm just looking for people that have insight on algorithms, needs, or just general ideas. I'm hoping to pull together a front-end interface for people to mess around with once I can stabilize the algorithms a little bit more to allow for options, especially terrain options... hopefully in the next week or two.

Mostly I'm just trying to get into the community a bit as I develop this game - I've already built some spreadsheets for unit/settlement/terrain interaction and event sequences, so hopefully I'll be around?

The map generator, which I sketched and coded in about 10 hours from scratch this weekend:

www.flourcityshows.com/game/mapgenstable.php (Most recent, more stable, low-res version)
www.flourcityshows.com/game/mapgen.php (whatever version I last updated to the server, generally more high res.)


I've thought through basically three processes for generation, each of which I can see having different appeals - my model for influence is I guess the Civ 4 / Warlords map generator.


Additive/Organic: Start with water, create anchor points for continents, gradually raise islands (imagining volcanoes and fault lines). This seems better for building continents.

Erosive/Organic: Start with level terrain, erode down (imagining either rivers or meteorites). This seems better, I would think, for building mountain ranges, glacial lakes.

Clustering/Inorganic: This is what i'm doing now, which is running and RNG across an X*Y grid through a simulated elevation range (say, -25 to 100), building up mountains and deepening oceans, and adding preservation and smoothing functions when I've built suitable clusters, reiterating, and then polishing it up (adding deserts and glaciers, for example). This, as I hope you'll see, is good for creating long strips of continents, both flat and mountainous.

Thanks for any thoughts!

Peace,
Josh
3 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
Nate K
United States
Utah
flag msg tools
designer
Avatar
mbmbmbmbmb
Welcome to the forums! This looks really cool.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
James Hutchings
Australia
Unspecified
Unspecified
flag msg tools
mbmbmbmbmb
I got an error:

Warning: Invalid argument supplied for foreach() in /home/flour/public_html/game/mapgenstable.php on line 236

Although most or all of the map printed.

I made a map generator a while ago. It's at www.apolitical.info/webgame/map

The way it works is as follows:

I have a variable which is the maximum amount of 'slope' ie how much the elevation can change per square. The more 'slope', the less effect terrain has on its surroundings, and the bigger-scale the map appears to be.

It starts by giving a random elevation to a randomly-chosen space.

Then it chooses more spaces with no value, in random order. However the height ranges of the new squares are constrained by existing heights and 'slope'. For example if there's a square of height -1, and 'slope' is .5, squares X squares away must be a maximum of (-1 + (X*.5)), and a minimum of (-1 - (X*.5)).

'Number of squares away' is calculated as the actual distance, not the number of 'moves'. So (1,5) and (2,4) are 1.41... squares away, not 2 squares away.

Finally, it 'normalises' the heights. For example the highest point might always be +50 and the lowest -50, with all the other squares adjusted to fit into that range. Setting different ranges changes the 'sea level'. For example ranges of +10 and -50 would tend to give mostly water.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Sturv Tafvherd
United States
North Carolina
flag msg tools
mbmbmbmbmb
check out http://inkwellideas.com/

especially Hexographer, which seems to have it's own page now:

http://www.hexographer.com/

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
David Lawton
United States
La Crosse
Wisconsin
flag msg tools
mbmbmbmbmb
here is a great web site i found when looking to generate maps for a computer game I thought of developing and never managed to start.
http://www-cs-students.stanford.edu/~amitp/game-programming/...

you should read the full article as it is quite interesting.

you might want to check out some of his other articles as well, most are about subjects pertaining to other aspects of computer game design.
http://www-cs-students.stanford.edu/~amitp/gameprog.html

hope this helps
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Josh Reed
United States
New York
flag msg tools
Thanks for the insight on slope - that's something I haven't thought about but it crossed my mind today so I'm glad to see a working example. The generator was easy as it worked just with HTML table cells which are probably effectively limited to square rather than hex.. (maybe if I work with divs I can change this).

I'll post later this week on progress, thanks again!

Josh
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Josh Reed
United States
New York
flag msg tools
PS thanks for the heads-up on the error, it's an apparently harmless error in redundancy with variables and arrays that I'm going to combine in a later iteration... the map does work 'fine' now.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
James Hutchings
Australia
Unspecified
Unspecified
flag msg tools
mbmbmbmbmb
fcshows wrote:
The generator was easy as it worked just with HTML table cells which are probably effectively limited to square rather than hex.. (maybe if I work with divs I can change this).


You can have table cells with a width of 2, and have every second row offset by 1.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Josh Reed
United States
New York
flag msg tools
wouldn't that cause bugs with tile selection or at least make it tricky? Maybe if it's a non-essential element of gameplay i.e. actions are performed entirely through clicking on units.. but as far as a map editor and being able to manipulate individual tiles that feels like it's above my head. Out of town til wednesday, will sit and give it a try though, thanks.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
James Hutchings
Australia
Unspecified
Unspecified
flag msg tools
mbmbmbmbmb
It should work in the same way that a 'normal' table would work.

Each cell would start with (remove spaces, and the # should be a space)

< t d # c o l s p a n = " 2 " >

and every second row would start with a blank cell to offset that row:

< t r > < t d > < / t d >



 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Josh Reed
United States
New York
flag msg tools
hey everyone, just an update - I'll probably leave my posts to the Computer-based forum and then set up my own on the site, but I've made serious updates in the board generator and I'm sure ones that down the line will be more interesting to board game designers..

There's a tweakable interface up at http://www.flourcityshows.com/game/mapeditor.php, which will be the permanent link.

you can control size, various terrain types, and color - eventually, you'll be able to upload images, a built in map editor, and easy exporting.

Once I get the Map Editor itself out in beta, I will hopefully be at a state to release the source as well.

Thanks again for all the help,
Josh
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
Fun! Could you improve the tool tip for Tweak Costal Elevations; it's not clear which way is which, initially. You don't seem to allow setting of a percent of oceans, which for Earth is about 70%
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
United States
BEAVERTON
Oregon
flag msg tools
Although it was originally developed for computer games, you might be interested in some code I wrote about ~10 years ago. It's called "BlotchMaker"

It basically works by stamping out a "brush pattern" on a random walk. You can alter a ton of variables, but this screenshot should give you a pretty good indication of what it does:



You can see interesting galleries i created with BlotchMaker.

BlotchMaker 2.4:
http://www.leiavoia.net/axis/pages/desdoc/map/blotchmaker.sh...

BlotchMkaer 3.0:
http://www.leiavoia.net/axis/pages/desdoc/map/blotchmaker3.s...

Compilable C++ source code available on request.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
United States
BEAVERTON
Oregon
flag msg tools
Megahex wrote:
here is a great web site i found when looking to generate maps for a computer game I thought of developing and never managed to start.
http://www-cs-students.stanford.edu/~amitp/game-programming/...

you should read the full article as it is quite interesting.

you might want to check out some of his other articles as well, most are about subjects pertaining to other aspects of computer game design.
http://www-cs-students.stanford.edu/~amitp/gameprog.html

hope this helps


+1

Amit is really cool. I used many of his ideas when i was doing the same thing a decade ago. Interesting to see he is still churning out new ideas!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Karan R
India
Mumbai
flag msg tools
It's Karan, not Karen!
badge
*Nyan*
Avatar
mbmbmbmbmb
Stuff you have listed as steps of making a world is shown perfectly in Dwarf Fortress
Try starting a game of it, when making a new world, it makes a random land mass, then ages the world a few centuries - this makes new geopraphical features like forests/volcanos/rivers/rock types etc
After a certain age dwarvish/goblin/elvish settlements appear and migrate around the board organically
This takes around a half minute, after this you are free to choose where on the world you want to start your fortress
Check out their forums for any algos if available - http://www.bay12forums.com/smf/index.php
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Josh Reed
United States
New York
flag msg tools
@Tall_Walt: I'll clarify that, yep. I'm thinking about Oceans / Land right now... it's a little difficult to cluster Oceans / Continents *naturally* - if I lower the water levels too much on each pass, it'll drag down the continents on the whole and visa versa... although
if you choose a greater number of iterations it will tend more towards oceans. That's got me thinking though, it might be interesting to do a count on each iteration of % of Ocean vs. Land, and speed up / slow down processes accordingly

@Nukem: the aging is really what I would love to wrap my head around, thanks. Smoothing algorithms from erosion, forest growth.. and ideally somehow or another simulating fault lines although this might just be fanciful.

I like the Blotchmaker particularly because of the focus on the individual square (as opposed to mine, which largely works by smoothing and clustering). I think that your focus on controlling the actions for individual squares might be key for, say, selecting X# of particular squares to be the center of X# of continents (or oceans) and performing operations on those...

Thanks for all the feedback, guys, I've had like a dozen ideas just typing this response. I'm having a lot of fun doing this and I'll try to keep it going steadily.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
You might consider splatting/blotching land cumulatively, so multiple hits make for higher terrain. If you make splats long, you'll replicate mountain ranges. Once you have altitude, raise sea level to have the requested amount.

If you're really ambitious, after that, rain on your world, erode it, and break through land bridges hydraulically, like the strait of Gibraltar or the Bosporus.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Herc du Preez
South Africa
Cape Town
flag msg tools
designer
Avatar
mbmbmbmbmb
Another way is to use fractals. It gives continents vs water very interesting shapes though you will have to do some post processing to get some height into the land and seas.

Here is the an explanation of the algorithm I used once.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.