I found a great post about world generation, which can be found here.
It does a good job describing what needs to be done, but I'm having trouble figuring out how to do it in python. I believe it was done in as3, but I'm not sure for certain. Any way, I also found a libtcod function for perlin noise:
noise2d=libtcod.noise_new(2)
value = libtcod.noise_turbulence_perlin(noise2d,[0.5,0.7],32.0)
I don't really know how to implement this, and then assign characters based on the height.
If someone could help me translate the steps from the article to python, I'd really appreciate it. Thanks
Here's a class I wrote some years ago that creates a world map for my roguelike prototype DomeriaRL. The relevant part is in the
__generate
method.It applies noise to a heightmap, normalizes it, and creates the tiles based on the values of the heightmap.
I'm using a color map to create smooth transitions from one tile kind to another.
An example world map looks like this:
Note that this game uses libtcod 1.5.1b1, and some function names changed in newer releases.