Map generator; garbage in, garbage out

Thoughts on the further development of Haven & Hearth? Feel free to opine!

Map generator; garbage in, garbage out

Postby Machenoid » Sat Sep 12, 2009 1:10 am

We all know the current map is garbage, or at least, flawed. I mean, come on, look at this crap:
Image

Completely random; no sense of direction or methodology.

I suggest that instead of using an entirely random macaroni-stamp generator, the generator be given rules to follow that are simple to learn for players, so they can expect where to find something they want without actually making the looking too long or difficult. For instance, the map could start to be generated from two kinds of points, which are lakes and mountains. Shallow rivers then would be drawn between these points and altered based on the distance they travel. After a certain distance of being drawn from the mountain to the nearest lake, they would slowly replace the tiles that make up the river into deep tiles (deep water eventually completely replacing the shallow water)

Depending on which way the river 'moves' along it's generation, any sharp bends could have an increased shallow area on the inside of the corner; a double sharp bend could be forced to create a ford between the two bends. As well, if the distance from the mountain to the lake is short enough, the end of the river could end in a delta. After the rivers are generated, a large number of shallow stream points are created, that will attempt to generate a 2-3 tile wide shallow stream to the nearest river point; moving from the closest points to the river out, and reducing the width of the stream until it disappears completely.

Then, it would be a simple matter of determining how much water, access to streams, and distance to the mountains/lakes is provided to the surrounding area to figure out what land be placed where. Mountains would be surrounded by forests and lakes would be surrounded by clay pits and swamps. Between them are the grasslands, with some local variation based on rivers and streams and their proximity.

The end result would hopefully be:
Image

Not as crappy as my MSPaint image, it's just an aproximation of where the various macaronies would be placed by the generator, but the general idea is many times better then what we have now. Most of the colors should be self-explanatory (light green is grassland, dark green is forest, yellow and purple are the two barren grasslands, etc) If you zoom in, you can see dark gray spots on the mountains; those are the initial points. From there, the dark blue squigles (that are hard to see, sorry) are rivers that move towards the nearest lake with the light teal color squigles being the streams i mentioned earlier. While i was doing this map i realised that streams should in fact start at the furthest point from the river, and then work towards the river, having the computer try and use as many points as possible. In the image, i used all the points i could because if i didn't the top right would be devoid of streams (as well as the bottom center) As well, clay pits in this example are in the areas without rivers (due to the lack of anything growing on them i treated them as deserts in this case) but they could do just as well at the sources (or dead-ends if you prefer) of streams.
Additionally, resourcing issues could be further mitigated by letting some creatures and items spawn more rarely in their neighboring environments (sheep would uncommonly spawn in non-fir forests)

Yes it's a lot of work, but compare the first image with the second image, and i think you'll agree that the effort would be worth it.

tl;dr
Garbage in, garbage out. Not-garbage in, not-garbage out.
The only way to get a "better map" is to improve the generator. If a reset happened right now, we'd still have the same "problem" of uncommon or even rare levels of critical resources because the generator would just spew out another grassland-barren hell hole.
The Dwarf is making a plaintive gesture. He doesn't really care about anything any more.
User avatar
Machenoid
 
Posts: 185
Joined: Sun Jul 12, 2009 9:12 pm

Re: Map generator; garbage in, garbage out

Postby Jackard » Sat Sep 12, 2009 1:22 am

man why not just swipe a heightmap from terragen or dwarf fortress or something
User avatar
Jackard
 
Posts: 8849
Joined: Sun Jul 12, 2009 6:07 am
Location: fucking curios how do they work

Re: Map generator; garbage in, garbage out

Postby Brosephine » Sat Sep 12, 2009 1:49 am

Whilst the maps generated aren't exactly natural in appearance, I think there are bigger, more immediate concerns than making things look nice. Namely, the balance of tile types, and by proxy, resources.
Brosephine
 
Posts: 76
Joined: Mon Aug 10, 2009 11:48 pm

Re: Map generator; garbage in, garbage out

Postby Machenoid » Sat Sep 12, 2009 3:28 am

Jackard wrote:man why not just swipe a heightmap from terragen or dwarf fortress or something

H&H doesn't have a z-axis, and even if you did just tell the computer that "this greyscale means X" you'd still have to generate the greyscale heightmap and then translate it into a usable map.

Brosephine wrote:Namely, the balance of tile types, and by proxy, resources.

Which are all controlled by map generation. :roll:
Currently, only certain creatures spawn in certain tile types, and while in theory this is a good idea, we are currently experiencing the very real problem of not having enough of those specific tiles (and thus not enough creatures) Now, you COULD generate a map over and over using the current method until a useful amount and distribution of the tile type is obtained, but forcing a map generator to run through hundreds of rejects before finding a sane one is wasteful of time and processor power the server could be using for something else. Making the map generator follow a set of rules would let there be resources in a more sensible setup all over the map, one that would require less rejected maps and a more ballanced final product, and lower server strain on creating not just new maps, but playable maps as well.

Once you establish a set of rules for map generation, it's easier to tweak those rules and their settings as well; and best of all, the results can be reproduced much more easilly. Something you simply don't get with an entirely random map generator (ie: without rules for placing rivers, you will always have the risk of creating unreachable locations, unless you put in an exception; and exceptions to the rule for the exception, etc)
The Dwarf is making a plaintive gesture. He doesn't really care about anything any more.
User avatar
Machenoid
 
Posts: 185
Joined: Sun Jul 12, 2009 9:12 pm

Re: Map generator; garbage in, garbage out

Postby Brosephine » Sat Sep 12, 2009 8:44 am

Now, you COULD generate a map over and over using the current method until a useful amount and distribution of the tile type is obtained, but forcing a map generator to run through hundreds of rejects before finding a sane one is wasteful of time and processor power the server could be using for something else.


I'm not privvy to the inner workings of the map generator, but I imagine that much of it is controlled by some easily changed variables.
Brosephine
 
Posts: 76
Joined: Mon Aug 10, 2009 11:48 pm

Re: Map generator; garbage in, garbage out

Postby Jackard » Sat Sep 12, 2009 10:26 am

Machenoid wrote:
Jackard wrote:man why not just swipe a heightmap from terragen or dwarf fortress or something

H&H doesn't have a z-axis, and even if you did just tell the computer that "this greyscale means X" you'd still have to generate the greyscale heightmap and then translate it into a usable map.

that totally doesnt matter

if you have a mapgen make some proper mountains and valleys, rivers flowing from them to seas, swamps where they would naturally be, lakes where they would be, whether or not H&H has a z-axis is irrelevant: the idea here is to make sensible landforms
User avatar
Jackard
 
Posts: 8849
Joined: Sun Jul 12, 2009 6:07 am
Location: fucking curios how do they work

Re: Map generator; garbage in, garbage out

Postby Potjeh » Sat Sep 12, 2009 10:53 am

Heck, if we just got rivers that make sense I'd be a happy hearthling. B12's original intention was to settle in a delta or an estuary of a major river, but you can see why this didn't happen.
Image Bottleneck
User avatar
Potjeh
 
Posts: 11811
Joined: Fri May 29, 2009 4:03 pm

Re: Map generator; garbage in, garbage out

Postby sami1337 » Sat Sep 12, 2009 11:54 pm

Potjeh wrote:Heck, if we just got rivers that make sense I'd be a happy hearthling. B12's original intention was to settle in a delta or an estuary of a major river, but you can see why this didn't happen.


I don't, because you did settle at a major river.
The ones who see things differently.

You can praise them, disagree with them, quote them, disbelieve them, glorify or vilify them. About the only thing you can't do is ignore them.
And while some may see them as the crazy ones, we see genius.
User avatar
sami1337
 
Posts: 1125
Joined: Tue May 26, 2009 1:52 pm

Re: Map generator; garbage in, garbage out

Postby loftar » Sun Sep 13, 2009 4:18 am

Do rest assured, at least, that the current revision of the map generator most likely won't be the last one. It does make sure that the current maps have all the features that we wanted to get in for such things as prospecting and localized qualities, which was the most important part of the map reset. I'd like to figure out some way to make more realistic maps next, but until then there are lots of other things to be done first.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Map generator; garbage in, garbage out

Postby Potjeh » Sun Sep 13, 2009 10:49 am

sami1337 wrote:
Potjeh wrote:Heck, if we just got rivers that make sense I'd be a happy hearthling. B12's original intention was to settle in a delta or an estuary of a major river, but you can see why this didn't happen.


I don't, because you did settle at a major river.

It's a creek. I doubt anything bigger than a canoe can sail on it.

And that's good to hear, Loftar. I hope you include seas in this map realism update. *nagnagnag*
Image Bottleneck
User avatar
Potjeh
 
Posts: 11811
Joined: Fri May 29, 2009 4:03 pm

Next

Return to Critique & Ideas

Who is online

Users browsing this forum: Claude [Bot] and 1 guest