Announcement: Random map generator version 1.1.0

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
Post Reply
florian
Rookie
Rookie
Posts: 18
Joined: 25 Apr 2009, 15:13

Announcement: Random map generator version 1.1.0

Post by florian »

We have released version 1.1.0

http://warzone2100.org.uk/
http://warzone2100.org.uk/wmt-1.1.0.tar.bz2

Changelog for version 1.1.0
Initial support for maps for trunk versions of warzone, pretty good results for arizona and rockies maps. Urban maps look pretty pants on trunk as roads can't be drawn correctly yet.
Image Image
Added makemap.py, a non-interactive version of the map generator (which does not require PyQt4 or PyGL). This tool simply takes the number of players (2, 4 or 8) and the rough size of the map (small, medium, large) and creates you a random map fitting those criteria.
Other minor subtle bugfixes and improvements (for example water will no longer sometimes 'slope' on edges).

Once trunk supports rendering all roads and craters, the support for trunk will be updated to generate all those features as well.
Last edited by Buginator on 17 May 2009, 18:58, edited 1 time in total.
Reason: made it into a sticky
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Announcement: Random map generator version 1.1.0

Post by Per »

Neat. Does it utilize the greater flexibility of terrain in trunk? (Not sure if that is even possible without improving the map savegame format, though.)
florian
Rookie
Rookie
Posts: 18
Joined: 25 Apr 2009, 15:13

Re: Announcement: Random map generator version 1.1.0

Post by florian »

Per wrote:Neat. Does it utilize the greater flexibility of terrain in trunk? (Not sure if that is even possible without improving the map savegame format, though.)
Yes it does - it can draw a transition from any tile to any other tile now and in less space. It also means that lakes will always border directly onto cliffs without the previously necessary 1-tile gap on arizona and rockies tileset maps.

This also means that a map generated with version set to trunk will look terrible on 2.2.

Currently it doesn't generate any transitions that used to be previously invalid (such as Grass -> Proper Snow) but I will lift that restriction next. I also noticed an odd bug on cliffs where the cliff is one tile off (this error does not happen on 2.2 maps, so I think i loosened the restrictions a bit too much...)
User avatar
jaakan
Trained
Trained
Posts: 75
Joined: 15 Jun 2008, 01:51

Re: Announcement: Random map generator version 1.1.0

Post by jaakan »

Could this or something like this, in the long term, be rolled in to the main code base and not just as a tool?
alienkid10
Trained
Trained
Posts: 71
Joined: 07 Apr 2009, 22:38

Re: Announcement: Random map generator version 1.1.0

Post by alienkid10 »

How exactly do I get this working?
florian
Rookie
Rookie
Posts: 18
Joined: 25 Apr 2009, 15:13

Re: Announcement: Random map generator version 1.1.0

Post by florian »

jaakan wrote:Could this or something like this, in the long term, be rolled in to the main code base and not just as a tool?
In theory it should be reasonably easy to modify the gui to execute the non-interactive version of diorama (makemap.py), but it works really quite well as a standalone tool.

That said I am quite happy to assist anybody who wants to write a patch to implement the above.

If you mean "fully integrated, as in part of the game's binary" then the answer is never. It would require embedding the python interpreter, and that would probably be one scripting language too many. (But there is no user-visible difference between this and the solution I outlined above.)
alienkid10 wrote:How exactly do I get this working?
What platform are you on? On Linux it should be trivial, check the instructions in the manual. I don't have / have access to any proprietary operating systems, so its a bit hard for me to work it out. Somebody has written me semi-complete mac instructions which I can post if that would help you?
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Announcement: Random map generator version 1.1.0

Post by Buginator »

Florian, I was testing this generator on Debian, and after changing some values, I hit 'Bake!' and just how long should it sit their baking?
I see in the console window, clasp: solution with Optimization: 0 44 7 19 19, a multicolored numeric display, and then clasp:done. ASP return code: 10, but the main Diorama windows is still blue (and unresponsive), and it has been working for 20 mins. This is on a 2.7GHz CPU.
I tried a 8p Arizona map, with everything at default.
If I move the Diorama window, then everything smears in that window.

*edit, after 35 mins I gave up.
I then killed the process, and tried again.
This time it worked. :) I didn't really change anything either, just a 8p, Arizona map again...

Just some comments, you really should save the tech level, and have 3 of them, so the data will look like:

Code: Select all

level	mapname-T1
players	4
type	12
dataset	MULTI_CAM_3
game ...
data	...
data	...

level mapname-T2
players 4
type 12
dataset  MULTI_T2_C3
game ...
data ...
data ...
and so on for T3 as well.

When you save the map, it would be nice if it would make it a zip file (.wz) and stuff it in ~/.warzone2100-2.2/maps
That is the location for the maps, so it can transfer said map to other players.
It also would be nice to save out the .lnd file, so people that got EW32 working, and do modifications to the map.
(btw, have you thought about having the ability to load in a height map, and then only have the generator create bases / roads / ponds or oil / whatever?)

Then again, since you have the source, I guess I will get around to doing that one of these days. :)
and it ends here.
florian
Rookie
Rookie
Posts: 18
Joined: 25 Apr 2009, 15:13

Re: Announcement: Random map generator version 1.1.0

Post by florian »

Buginator wrote:Florian, I was testing this generator on Debian, and after changing some values, I hit 'Bake!' and just how long should it sit their baking?
I see in the console window, clasp: solution with Optimization: 0 44 7 19 19, a multicolored numeric display, and then clasp:done. ASP return code: 10, but the main Diorama windows is still blue (and unresponsive), and it has been working for 20 mins. This is on a 2.7GHz CPU.
I tried a 8p Arizona map, with everything at default.
If I move the Diorama window, then everything smears in that window.

*edit, after 35 mins I gave up.
I then killed the process, and tried again.
I will answer properly once I have gone to work and back, but for now: Certain combinations of values are a real killer - causeways/canyons and lots of water; 8 players + 6+ oil clusters are a sure way of sitting there for a while. Cell width and height larger than 12x12 as well, especially when combined with the above.

All 8p maps should really be made symmetrical (this speeds up the process drastically and also increases map size).

I have considered doing .wz files, but I was unsure of the correct directory structure within the .wz. Any examples I look at and use?

Emitting a .lev for the various tech levels should be trivial and no problem.


Using a heightmap and then filling in the details would be hard/impossible, due to the way this map generator works. It would work if it used a bottom-up approach (start from a random height map, then derive the rest), but our map generator works top-down. (This has other advantages, such as us being able to prove certain properties a map has.)
Post Reply