Would you be willing to share more details of how you're doing the world map generation?
I've been working on procedurally (rather than randomly) generating worlds, given a seed value, so that I can zoom in and generate the areas needed as the player enters them, instead of having to spend a bunch of time at the beginning generating a world randomly.
I'm generating the base terrain using fractional browning motion running on top of a procedural perlin noise function that feeds a seed and a set of coordinates through a fast murmur hash function to generate values. Once I've drilled down to the resolution I want, I pull out a square of terrain, plus some buffer area on the edges, and run a hydraulic erosion loop on it for a while. It seems to work pretty well, but....
Rivers are troublesome. I can get them to form if I run many many iterations that evaporate and deposit small amounts of water, but that takes quite a long time. Pleasant but fast results are achieved if I dump a whole bunch of water in relatively few iterations, but rivers don't form that way....
I haven't even begun to think about biomes yet.......
How are you running your rivers? What methods are you using to form your biomes? Would any of these methods be usable with as-needed procedural generation rather than pre-generated random worlds?
Certainly
.
Ah, that's a nice idea. I've been considering using a seed value, but I've decided not to go that route for now. I'm the same in a way, though, since parts of the 'local' map - ie the scale the player walks around on - aren't generated until you first step foot in them.
I also found rivers by far the toughest part. If I split my workgen into various parts - land, terrain, height, mountains, forests, gorges, volcanoes, and rivers, rivers take more time than all the others combined, and it's about as efficient as I can find a way to make it at the moment.
Biomes are currently based primarily upon latitude, with a small height component, though I plan to make this slightly more complex in the future.
As for rivers, my latest devblog entry is on just them!
http://www.ultimaratioregum.co.uk/game/2011/12/19/the-case-of-the-penrose-river-2/Here's how rivers look at the moment (without any current or indicator of flow shown, currently):
Let me know what you think, or if the explanation I give there isn't clear enough : )
This is great, I love procedural/random map generation, but it's so darn difficult! Is there a place for best practices having to do with such things? I know of the procedural content generation WIKI, but that's about algorithms and not code. Perhaps it's time to start a page on roguebasin...
EDIT:
This represents my solution to making level generation algorithms that can be used flexibly. I'm interested in peoples opinions, and I'd really love to start some kind of library project, although that might be a little ambitious.
http://roguebasin.roguelikedevelopment.org/index.php/Designing_Flexible,_Reusable_Algorithms
I know what you mean - starting a library project seems like a huge undertaking! I'm trying to get a flexible generation system that can be used for dungeons, but since the focus of URR is on large-scale army combat, dungeons aren't actually that common. So while it's important, getting the outside world looking good is significantly more vital. Really interesting article, though, and has given me a few ideas...
I've thought about starting a blog to post code snippets and screenies as I work on stuff...
Some of the code is too long to be spamming up these forums with. <_<
Here's a great article on polygonal map generation: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/
I don't know why I didn't think of using a table like that to figure out biomes myself, lol....
I've come across that article before - it's fascinating, and gave me quite a few ideas for my system. In the end, though, I think how the map looks is more crucial than how it's constructed; which is to say, if you use a simpler method but the end result is no different, I think one should err on the side of the simpler method. My system is not quite as complex, but I think (at the moment) the map is sufficiently complex : )
Here's a pretty good paper on river generation. Probably wouldn't work for a truly procedural world though...
http://www.cs.sjsu.edu/~teoh/research/papers/CGVR08_terrain.pdf
Wow - that's much more detailed than anything I'm going after. As you say, though, I think that could only be used in certain areas, and I'm not sure I have the skills to program that in myself anyway!