Random map generator

Discussion among members of the development team.

Moderator: Forum Moderators

Post Reply
cowboy

Random map generator

Post by cowboy »

I've gotten alot done on the random map generator I have been working on, it seems to generate mostly playable maps.
If anyone would like to give it a try it can be found at:
http://www.rpgworlds.com/~cowboy/ranmap.tar.gz

It's far from finished/far from perfect ect ect, I'm basically throwing it out for some feedback on what works, and what doesn't, and advice on how to go about various parts.

Oops - forgot to mention, you'll have to generate your own WML for the map to define the players/ect for now.
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

It just works. Had conversation with Cowboy at IRC [1] about features...

* Colorization (selectable) for better visualization of map to help evaluation (e.g. some scenario you have in your mind)

* Possibility to enable/disable terrains to use. e.g. I prefer manually selected places for villages and castles and maybe you might want random map without e.g. mountains.

Maybe something like this: './ranmap.pl -novillages -nocastles -nomountains -colorize'

- Miyo

[1] #wesnoth at irc.wesnoth.org
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

"ranmap" been added to CVS and it can be found under utils/

- Miyo
gandalf
Posts: 157
Joined: August 24th, 2003, 4:15 pm
Location: Sweden

Post by gandalf »

miyo wrote:"ranmap" been added to CVS and it can be found under utils/
- Miyo
ranmap?

I found random_map.pl and I got this result when running it.
with my Debian/Linux v5.6.1

$ ./random_map.pl
./random_map.pl: use: command not found
./random_map.pl: use: command not found
./random_map.pl: line 38: syntax error near unexpected token `qw('
./random_map.pl: line 38: `use List::Util qw( shuffle );'
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

perl -w random_map.pl

- Miyo
cowboy

Post by cowboy »

gandalf wrote:
miyo wrote:"ranmap" been added to CVS and it can be found under utils/
- Miyo
ranmap?

I found random_map.pl and I got this result when running it.
with my Debian/Linux v5.6.1

$ ./random_map.pl
./random_map.pl: use: command not found
./random_map.pl: use: command not found
./random_map.pl: line 38: syntax error near unexpected token `qw('
./random_map.pl: line 38: `use List::Util qw( shuffle );'
As miyo mentioned, I forgot to include the #!/usr/bin/perl line.

If you're using perl < 5.8.0 you will also need List::Utils
apt-get install libscalar-list-utils-perl
gandalf
Posts: 157
Joined: August 24th, 2003, 4:15 pm
Location: Sweden

Post by gandalf »

cowboy wrote: If you're using perl < 5.8.0 you will also need List::Utils
apt-get install libscalar-list-utils-perl
Thanks, with some editing in the multiplayer.cfg file I am now playing a random multiplayer scenario. Nice ;-)
cowboy

Post by cowboy »

gandalf wrote:
cowboy wrote: If you're using perl < 5.8.0 you will also need List::Utils
apt-get install libscalar-list-utils-perl
Thanks, with some editing in the multiplayer.cfg file I am now playing a random multiplayer scenario. Nice ;-)
Ya, that's required, but one day won't be.
miyo added a bunch of command line switches today to the generator, and I'm cleaning up/optimizing logic further.
Any thoughts you have on the generator, bugs, suggestions, tiny little nitpicks would be very welcome as we try to improve it.
gandalf
Posts: 157
Joined: August 24th, 2003, 4:15 pm
Location: Sweden

Post by gandalf »

cowboy wrote: Any thoughts you have on the generator, bugs, suggestions, tiny little nitpicks would be very welcome as we try to improve it.
The following parameters could be interesting to play with.

The number of tiles that are wood/water/hills (relative to the total number of hex tiles)

The number of villages

The number of enemies

The size of the map
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

* Latest version has been commited to CVS.
* Now the script contains '#/usr/bin/perl -w' so you can start it like './random_map....'
* You can get command-line switches with 'random_map -help'

- Miyo

ps. Cowboy you forgot to mention loads of bugs that I found and reported (have to maintain my reputation as bug-hunter) *grin*
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

gandalf wrote: * The number of tiles that are wood/water/hills (relative to the total number of hex tiles)
* The number of villages
* The number of enemies
* The size of the map
'random_map -help'

- Miyo
Post Reply