Fractal random map generator
Moderator: Forum Moderators
Fractal random map generator
I've made a little fractal map generator (well, OK, modified one to spit out Wesnoth map files ) that I thought would be handy.
Basically, a program called worldgen outputs relatively realistic GIANT Wesnoth-style maps, then a program called chunk takes little segments out of it. That way, you can create one big consistant map for a campaign, then use little bits of it for scenarios. Or, of course, you could just make one map and use only one chunk *shrugs*
It doesn't put any villages etc on the map, that's up to you. It makes a pristene, pre-human pre-elf pre-dwarf pre-orc pre-other-sorts-of-civilization world
It also creates a .gif file (legacy from the original program), which makes a handy reference.
Enjoy, and please post comments
Basically, a program called worldgen outputs relatively realistic GIANT Wesnoth-style maps, then a program called chunk takes little segments out of it. That way, you can create one big consistant map for a campaign, then use little bits of it for scenarios. Or, of course, you could just make one map and use only one chunk *shrugs*
It doesn't put any villages etc on the map, that's up to you. It makes a pristene, pre-human pre-elf pre-dwarf pre-orc pre-other-sorts-of-civilization world
It also creates a .gif file (legacy from the original program), which makes a handy reference.
Enjoy, and please post comments
- Attachments
-
- gwswg-1.0.tar.gz
- Gregor's Wesnoth World Generator
- (335.15 KiB) Downloaded 853 times
Of course, everybody loves screenshots, and I didn't post any, so here they are ...
It's the included example world, and a few selected areas from it in the Wesnoth editor.
It's the included example world, and a few selected areas from it in the Wesnoth editor.
- Attachments
-
- The generated world.
- exa.jpg (223.21 KiB) Viewed 9715 times
-
- Screenshot A
- exa_a.jpg (174.58 KiB) Viewed 9713 times
-
- Screenshot B
- exa_b.jpg (253.55 KiB) Viewed 9714 times
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
-
- Art Contributor
- Posts: 85
- Joined: June 11th, 2005, 2:22 pm
Yeah it looks like it's a simple height map with mountains > hills > forest > grass > sand > shallow > deepElvish Pillager wrote:Why are there always forests between hills and grass?
I think if you're starting with a height map (and almost all map generation does start like this) it's best to just divide into mountains > hills > grass > shallow > deep and then worry about things like vegetation and snow afterwards using a different approach.
That's the way Wesnoth's current map generation algorithm does it.
The main nice thing about this map generator is that it does use a fractal algorithm. I think it'd be good to make that an option for the current generator -- to use a fractal height map generator rather than the 'hills' approach that is currently used.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
It's a .gif file representing a /huge/ Wesnoth-style map.scott wrote:Wow. Is that last one a wesnoth map?
As mentioned by others, it's a heightmap, so it's a pretty strange algorithm to make forests out of. There aren't always, but when there are it's because I translated "higher" into "forest"Elvish Pillager wrote:Why are there always forests between hills and grass?
Yes, of course. This is just a proof-of-concept. It would be nice to make one that diverged a bit from the pure 'heightmap" style, and hence could support other terrains, etc.Jormungandr wrote:This is pretty cool. Do you have any plans to expand it with either more command-line parameters, or to use more terrain types (I note swamps are lacking)?
And I'm pleased to see that the editor can actually load a 1000x1000-hex map without choking too horribly. Razz
And no, the editor can't load a 1000x1000-hex map, that's why I made the chunk program
Anyway, I personally think that the nice thing about this is that it generates a very large map, so you could easily, for example, have one scenario on just an island, and then later come back and have a siege of that island on a larger map that also includes some of the mainland.
-
- Art Contributor
- Posts: 85
- Joined: June 11th, 2005, 2:22 pm
That's what it looks like to me, at least. Loading said 1000x1000 map took a minute or two, and about 300M of RAM on my machine.tomsik wrote:I think you can load as big map as long you have enough RAM.
Though, if you do this (and I can't think of a reason why you would want to, other than general curiosity) and then try to edit the map, the editor hangs for a while (as it recalculates transitions?).
Here's version 1.1. Now, rather than each level representing one terrain, each level has several different types of terrains, then it "grows" them to be consistant. It's not great ... but it's significantly better.
Also, for the lazy, it lets you add villages (optionally).
By the way, is there any way to turn a Wesnoth map file into a (possibly gargantuan) image file of the map?
Also, does anybody know of a C pseudo-random number generating function that's both decent and Free Software (GPL, MIT, whatever). It would be nice to put the randomizer in the program itself, so the same random seed will generate the same map on GNU/Linux, Windows, Mac OS X, Solaris, etc, etc, etc.
Also, for the lazy, it lets you add villages (optionally).
By the way, is there any way to turn a Wesnoth map file into a (possibly gargantuan) image file of the map?
Also, does anybody know of a C pseudo-random number generating function that's both decent and Free Software (GPL, MIT, whatever). It would be nice to put the randomizer in the program itself, so the same random seed will generate the same map on GNU/Linux, Windows, Mac OS X, Solaris, etc, etc, etc.
- Attachments
-
- gwswg-1.1.tar.gz
- Version 1.1 of Gregor's Wesnoth World Generator
- (292.48 KiB) Downloaded 561 times
Not sure if this is what you want, but Wercator is in a usable state - it can take a BfW map and render an ink-and-parchment version; see my signature for the thread in the forums, or go to http://gs295.sp.cs.cmu.edu/brennan/wercator/ for a web version. If you're planning on doing really huge files, I would recommend (1) only rendering the ink (i.e. no parchment, no frame) and postprocessing the parchment in, and (2) installing it locally, but see the forum thread and/or the Downloads page of the Wercator site for caveats. If you do want to render monstrous large maps via the Web interface, please run them after normal business hours (US Eastern time), since it's my office machine.GregorR wrote:By the way, is there any way to turn a Wesnoth map file into a (possibly gargantuan) image file of the map?
Well, there's the GSL - it has a wide variety of random number generators available. I've been pretty happy with it for numerical simulation foo.GregorR wrote:Also, does anybody know of a C pseudo-random number generating function that's both decent and Free Software (GPL, MIT, whatever). It would be nice to put the randomizer in the program itself, so the same random seed will generate the same map on GNU/Linux, Windows, Mac OS X, Solaris, etc, etc, etc.
Author of Wercator