News for hackers. Stuff that matters.
Re:Ask HN: How to generate random terrain by wlievens on Monday September 14, 2009 @11:18AM (#821808)
What kind of scale of terrain are you looking for? Continent maps or battlefield scale?

I got some stuff I rolled here http://flywheel.be/examples/

All random generated. But probably not what you're looking for.

Re:Ask HN: How to generate random terrain by wlievens on Tuesday September 15, 2009 @03:11AM (#823438)
I also have these:

http://flywheel.be/wouter/maps/

For more discrete-looking maps.

Re:Ask HN: How to generate random terrain by allenp on Monday September 14, 2009 @12:30PM (#821971)
These look great - what method did you use to define the borders on the risk-like map?
Re:Ask HN: How to generate random terrain by wlievens on Tuesday September 15, 2009 @03:02AM (#823429)
You mean the border between the hued territories? Roughly:

1) Randomly pick center points of territories, guarantee a minimum distance for best looks

2) Compute the Voronoi raster, i.e. for each pixel find the nearest territory center

3) Figure out which territories border which, based on the Voronoi raster

4) Compute borders for each territory by taking the midpoints of edges in the territory neighborhood graph. Use a couple special tricks for coastal territories.

5) Split up those borders into finer segments

6) Add noise to the border segments

7) Fill in the pixels according to the borders

Re:Ask HN: How to generate random terrain by allenp on Tuesday September 15, 2009 @10:05AM (#823840)
Thank you so much for the detailed response!