Yet another map generator (removed)

Discussion of all aspects of the game engine, including development of new and existing features.

Moderators: Forum Moderators, Developers

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Yet another map generator (removed)

Post by pyrophorus » March 25th, 2012, 5:46 pm

Hi !
Here is yet another random map generator.
It produces Wesnoth maps one can open and edit in Wesnoth editor.
Shot-1.jpg
My idea doing this is writing a program producing (rather) realistic maps and giving to users a quick and easy way to execute mass editing (like adding snow, creating lakes and so on). Unlike the standard map generator, it can reproduce variations of the same basic layout, changing options like forest and snow coverage, villages and castles number and more.

See complete settings description in HowTo file of the distribution.

Now, my questions are still the same:
1- Are the parameters intuitive enough ? In other words, when you change something, is the result (rather) expected or totally surprising ?
2- Would you use the produced map quite as is, or would it need many modifications ?
3- Is the result interesting as a Wesnoth map ? The goal here is not only to produce beautiful maps. As soon as they're (most often) a battlefield, they should have other qualities too.
4- Any other comment.
Feel free to post your results in this thread.


Use: you can install the program anywhere, but its parameter file must be in the same folder. Edit it and set the 'mapname' property to the full path of the file to produce and run the program (directly or in terminal). Since it is very fast, you should see the produced map appear at once in the destination folder. If not, there is most probably an error in the parameters file. Parameters are checked and errors are reported in the stdout (the terminal window).

EDIT: 0.2 forests implemented on all land types, embedded RNG to give the same result on all platforms.
EDIT: 0.3 villages and burgs are now implemented.
EDIT: 0.8 roads and castles are now implemented.

EDIT: 0.9 New features: bridges implementation, much more control on map option (snow, lake generation...)
The lake generation has been completely rewritten and gives much better results than earlier.
Maximal map dimensions have been extended to 500 x 500 (Wesnoth editor needs some time to swallow them, but it works). I don't think anyone will really use such huge maps, but maybe select the most interesting part.

EDIT: 1.0
It's now possible to change all terrain codes used in map generation in the parameters file. See the HowTo for more information. The user has now full control on maps production. This can result in invalid map files if using wrong codes to replace defaults. Users should be aware of this.
More of it, new keys have been introduced to give control on map corners altitudes.

EDIT: 1.1
1- Setting the seed value to 0 always gave the same map and not a different one each run. It is fixed.
2- The generator accepts a numeric parameter in command line. If used, it creates n different maps in one run, incrementing the original seed by one on each step. Rather handy to quickly select an interesting layout.

3- The generator accepts a new parameter: multiplayer=n (if 0 or unset, the 1.0 behavior apply).
It's an attempt to create more balanced maps. Using this option, a fixed number of villages is created near each player's castle (and some more away). So, at start, all players will have the same number of villages at hand. The 'burgs' parameter is disabled because it would break this balance. Last, some little keeps (two hexes) can be created near the center of the map, allowing leaders to recruit there. All other options are still there (snow, seasons, land type and so on). sample here.

EDIT: 1.1a
Two new parameters allowing to adjust little parts of the map and setting the castles locations.

EDIT: 1.3.1
Added a 'crossroad' parameter giving more control on roads creation.
Added the towns creation parameter.
see here

Since sharing this brought me a lot of trouble and hostility, I decided to withdraw the yamg. Because the GPL, I had to remove executable programs too.

Sorry.
Last edited by pyrophorus on January 17th, 2015, 8:50 am, edited 16 times in total.
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Yet another map generator

Post by Crendgrim » March 28th, 2012, 9:19 am

What if you just post the sources here, as the GPL requires (see §6)? Then nobody would have any problem anymore, right? :)
UMC Story Images — Story images for your campaign!

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Yet another map generator

Post by pyrophorus » March 28th, 2012, 11:28 am

Hi,
IMO, it could be an interesting project for the whole Wesnoth community, and that's what I would like to discuss here.

IMO, there are two important points about this kind of generator:
- It produces a repetable output. With the same RNG seed, you get always the same land mesh. You can even resize the map witihin certain limits without changing it.
- It is very fast (typically about 1/100 second for a 60 x 40 map).

This opens the possibility to interact with it in real time. Suppose we have this kind of generator in the map editor. We could set up a slider to ajust the forest ratio parameter and then display the result each time the user moves it. (S)he could then see forests growing or shrinking in real time. And so on. I think it would be a great feature in the editor to allow user to tune interactively parameters on the same base map. Now, we can't say the editor: "OK, this basic layout is fine, but I would like more villages, less forests and no impassable mountains". We must run the generator again (and get a completely different layout) or change things manually.

We could even (within limits maybe) preserve manual editings in new runs, and why not, even try to reshape existing maps. Storing only the RNG seed in the map file would allow to recreate the whole land mesh and more parameters could be saved somewhere, of course. In that way, we could store a richer (and still concise) information about maps.

You can view the software as a kind of demo of what could be done to improve the editor. It can be developed as a standalone utility too. Shall see...

Friendly,
Last edited by pyrophorus on March 28th, 2012, 7:11 pm, edited 1 time in total.
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Yet another map generator

Post by zookeeper » March 28th, 2012, 5:59 pm

Split the rest of the license discussion (that is, the parts which didn't directly involve the above post) to another thread.

User avatar
pauxlo
Posts: 1046
Joined: September 19th, 2006, 8:54 pm

Re: Yet another map generator

Post by pauxlo » March 28th, 2012, 6:32 pm

This looks interesting. I didn't try the program¹, but I think it might help discussion if you could post some screenshots of the generated maps (i.e. the same map with some different parameter settings).

¹ I don't want to run unknown programs on my system, and I don't care enough to setup a sandbox ... and actually I have no Wesnoth installed to try the resulting maps.

User avatar
battlestar
Posts: 690
Joined: January 1st, 2007, 7:12 am

Re: Yet another map generator

Post by battlestar » March 29th, 2012, 3:33 am

I like it better than the one built-in with Wesnoth editor. I can't understand why pyrophorus' program would be untrustworthy (aye, trust is a personal choice), and having run the program already, there had been no anomalies with my computer, at all.
LUA: Llama Under Apprenticeship
Hell faction: completed

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Yet another map generator

Post by pyrophorus » March 30th, 2012, 12:36 pm

Hi !
It's really difficult to give a full idea of the result because there are so many tuning possibilities. Here are three snapshots. First two are the same except snow level. The third one uses desert option instead of tempered land and no snow. No manual editing have been done (villages are only in last version)
land.jpg
landsnow.jpg
desert.jpg
Last edited by pyrophorus on April 3rd, 2012, 5:22 am, edited 1 time in total.
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Yet another map generator

Post by pyrophorus » April 3rd, 2012, 5:19 am

Hi !
Updated to version 0.3
Villages and burgs are now implemented.
Friendly,
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Yet another map generator

Post by Boucman » April 3rd, 2012, 4:53 pm

honestly your results look really good, it would be great if you could integrate that into wesnoth and provide your algorithms as patches to the game... everybody could use such a generator for random MP maps and/or base for scenarii
Fight key loggers: write some perl using vim

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Yet another map generator

Post by pyrophorus » April 4th, 2012, 8:22 am

Boucman wrote:honestly your results look really good, it would be great if you could integrate that into wesnoth and provide your algorithms as patches to the game... everybody could use such a generator for random MP maps and/or base for scenarii
Hi !
Thanks for your interest and appreciation.
Certainly, I would be glad to see my work integrated in Wesnoth in some way.
There is no problem with the generator output: it's a buffer holding the map data, exactly like built'in generators produce. The stand alone tool just write it as is to a file. Then, it could be used in Wesnoth like any other generator output.
IMO, the integration work is defining a way to set up parameters. In the standalone tool, the main function instantiate a parameter list object, fill it reading a file, and pass it to the generator before running it. Of course, the parameter list could be set otherwise, from a GUI, a network message, WML parsing and anything else, but it have to be done. (I haven't think about calling it from WML or in MP games, but you're right, this could be done easily too).
I don't think I can manage the integration alone, so there I would need some help, collaboration or support of those involved in.

At this stage of development, I'm aware of feedback on the software use and results:
- to define a final parameter list. It is of course possible to allow users to define quite all in the program, for instance exactly which terrains codes are used in various situations, but it would result in more complex (and error prone) parameter files. More complex GUIs too if some is finally created.
- fit closer to real users needs. I tried to allow map creators to get quickly something rather close to their final design, make global changes (like putting and removing snow) easier and faster. But, since I'm a SP player and creator only, I haven't yet taken care about MP random maps. I have the feeling they would appreciate a lot of little keeps a SP designer needs not (I imagine SP designers would prefer to create manually the castles). Here too, I need feedback and testing to move towards a better result.

Friendly,
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Yet another map generator

Post by Boucman » April 4th, 2012, 9:26 pm

pyrophorus wrote: At this stage of development, I'm aware of feedback on the software use and results:
- to define a final parameter list. It is of course possible to allow users to define quite all in the program, for instance exactly which terrains codes are used in various situations, but it would result in more complex (and error prone) parameter files. More complex GUIs too if some is finally created.
hmm, you might want to discuss this on IRC with mordante and fendrin... mordant is our UI specialist and Fendrin worked a lot on the editor which would likely be a very good place to add it...

as for the quantity of parameters, we could have presets, or simple vs expert UI or just hide some parameters... Again you might want to discuss that with our campaign devs, and the best way to find them is on IRC :)
pyrophorus wrote: - fit closer to real users needs. I tried to allow map creators to get quickly something rather close to their final design, make global changes (like putting and removing snow) easier and faster. But, since I'm a SP player and creator only, I haven't yet taken care about MP random maps. I have the feeling they would appreciate a lot of little keeps a SP designer needs not (I imagine SP designers would prefer to create manually the castles). Here too, I need feedback and testing to move towards a better result.

Friendly,

your maps looked good for campaign use (SP or MP) but competitive gameplay is a completely different can of worms, I would drop it for the time being...


boucman
Fight key loggers: write some perl using vim

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Yet another map generator

Post by pyrophorus » April 5th, 2012, 4:44 am

@Boucman: thanks for your reply. I shall finish my work first and then, we shall see.

Some previews maps showing burgs, castles and roads with the same basic settings. The random seed only change.
Program with these options will come soon. I have still some things to adjust to avoid some minor defects.
maps.zip
(8.18 KiB) Downloaded 404 times
Friendly,
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

SlowThinker
Posts: 876
Joined: November 28th, 2008, 6:18 pm

Re: Yet another map generator

Post by SlowThinker » April 6th, 2012, 12:55 pm

pyrophorus, could you adjust your tool so that it creates random maps for Conquest (see my signature)?
Conquest maps have some particularities though - grouping villages to regions, conforming the village surroundings to a village type (although a simple map can use only human villages), and assuring paths (a flat terrain) between villages of a region and paths between regions.
I work on Conquest Minus • I use DFoolWide, Retro Terrain Package and the add-on 'High Contrast Water'
I moved to Nosebane's corner (Doc Paterson's signature); I am spending my time there, so PM me if I don't answer your post in forums

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Yet another map generator (version 0.7)

Post by pyrophorus » April 6th, 2012, 2:50 pm

Hi !
The generator is now near complete. This picture:
Map425.jpg
was created using seed=425 and default values except castles=1. The three villages are a 'burg', that's why the road winds around them.

I'll wait now for feedback (if any) prior to submit the sources.

Have fun...

@slowthinker. I haven't the slightest idea of the Conquest map format and use. So I can't say nothing. My algorithms are general enough to produce any kind of map (hexes or squares), but terrains use is particular to Wesnoth, and I doubt we could find their exact peer in other game softwares.
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

User avatar
MetalKing
Posts: 197
Joined: July 8th, 2011, 11:34 am

Re: Yet another map generator (version 0.7)

Post by MetalKing » April 6th, 2012, 3:18 pm

I didn't use it due to License reps. this open Source is not open to me but the presented Results looks fine.
Can you include statical Map-Data like this: I create a fresh Map and define just some Properties like a
River and/or a Fortress etc. Can the MapGen complete the Map well without changing these Presets?
There would have to be defined that any TerrainType describes the changeable Terrain resp. the Area
for which the Terrain have to get generated.

*edit* typo
Last edited by MetalKing on April 8th, 2012, 12:27 pm, edited 1 time in total.
"Sir! We are surrounded by our enemies!" - "Excellent ! We can attack in every direction!"
"Make everything as simple as possible, but not simpler." -- Albert Einstein
No Source - No Binary - No Trust!
Map Wesnoth Springs - The great War [200x120],Player=9

Post Reply