Temple of The Roguelike Forums
Development => Programming => Topic started by: f1gm3nt3d on March 24, 2010, 03:34:07 PM
-
So for the past year or so I've been hammering on an RL library for C# and developing a few RL's along with it. I'm at the stage where I want to start adding code to generate my maps. For the most part I have the dungeon type maps pretty much nailed down the way I want but I'm having difficulty with world maps. Now, only one of the games I've been working on has a world map, it's a zomband/doomRL type one set in the modern day so world map is pretty much the only map. I've already got a decent solution for generating buildings on a provided map. My question though is more general. How do you generate a large world map consistently? Something like generate a larger map where each cell is say a 100x100 submap, but how do you generate for something like say a coastline going from cell 3,4 to cell 3,5 on the larger map so that it "seams" correctly in the submap? With some sort of fractal algorithm? Does anyone have any links to articles? My google-fu isn't up to snuff for finding them and I can't seem to wrap my head around it. Any ideas, pokes, prods, or finger wagging welcome. Thanks. :D
-
try this (http://en.wikipedia.org/wiki/Diamond-square_algorithm)
You can do global and local generation separately quite easily.
-
Yeah, normally people use fractal based heightmaps that are converted into terrain. Such an algorithm is fairly simple to implement, and I believe there are a few good examples at roguebasin. Essentially, you generate a fractal heightmap and then decide what ranges of the map will be what type of terrain. Maybe below a certain number is ocean, and above a certain number is mountain, and inbetween there are all sorts of land types like forest and desert.
-
Yeah. Isn't that what Slashy used to make the Overworld for ZeldaRL?
-
Thanks for the replies and great starting points. Back to the anvil I go!
-
I have once set up a small collection of ideas in my library how to generate several types of maps:
http://www.funkelwerk.de/library/index.php?n=Library.Maps