.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   new map generator (http://forum.shrapnelgames.com/showthread.php?t=30337)

DrPraetorious January 28th, 2007 03:40 AM

Re: new map generator
 
I actually like the clean, crisp colors on maps like this, but I've always had a certain minimalist aesthetic with maps.

Certainly, given the amount of time I expect to spend staring thoughtfully at these, it'll be nice to have variety.

FYI - on a map like this, this is how many start sites fit:
Minimum Distance , Minimum Neighbors , # of starts total (water)
4 , 4 , 10(2)
4 , 6 , 5(1)
5 , 4 , 9(1)
5 , 6 , 5(1)
6 , 4 , 8(5)
6 , 6 , 5(1)
7 , 4 , 6(3)
7 , 6 , 4(2)

Anyway, I think it looks cool, but has a bit too much water to be well-balanced, unless the number of start sites is quite low. Of course, as just a map to play on, it's great.

Thanks for the great work!

--TNDP

Agrajag January 28th, 2007 04:47 AM

Re: new map generator
 
I like it, it looks neat, and should be very easy to edit if you want something with more flavour.
My one criticism would be that some water provinces have tiny little islands floating in them, that are a bit too small to be considered a province, and yet bigger than what you see in other maps, which gives those provinces a bit of a "dirty" feel to them.

paradoxharbinger January 28th, 2007 01:47 PM

Re: new map generator
 
1 Attachment(s)
@ DrP
i'm not sure what your table means, at least the minimum distance column, provinces to pass through to reach one start site from another? in any case, start sites are not something that the algorithms account for at present. something may be able to be implemented that looks for possible start locations and then removes neighbors, provinces that were next to the removed one could then be grown into the gap. perhaps reducing the number of overall provinces could be a quick fix here.

@ Agrajag
personally, i like to see little islands floating about. it would be pretty sweet if we had an island terrain type. i think it would be possible to remove them, though fairly expensive in terms of processing time.

i'm posting these without the sprites so that if someone does want to add some sprites and such to spice them up, the are more than welcome to.

here's another wrapping map. more provinces, but about a 4:1 land:water ratio. 1600x1200, 491 provinces (384 land, 107 water)

DrPraetorious January 28th, 2007 04:14 PM

Re: new map generator
 
Paradoxbringer - yes, that's it exactly.

I don't think the RMG needs to know about start sites - but the parameters can be varied so that you get the number of start sites you want. A high water:land ratio on a map with a lot of start sites will tend to put more than 2 in the water, which is a problem because they can't be occupied.

paradoxharbinger January 28th, 2007 08:26 PM

Re: new map generator
 
i think that it may be possible to give mapgen the desired number of start sites. and after having thought about it, it is probably also possible to constrain the number of neighbours to start sites and provinces between. i will have investigate.

paradoxharbinger January 30th, 2007 07:51 PM

Re: new map generator
 
alright, so i'm finishing up putting in the script functions that i want to see in the alpha, and i'd like to know what kinds of province generation algorithms you all think are important, because if i keep going on like this, i'll sit on it untill i get all of the algorithms i want in there. so here are some options:

(1) simple: all provinces are about the same size (likely to included anyway)
(2) water / land size: all water provinces are about the same size as other water provinces and all land provinces are about the same size as other land provinces (already included)
(3) distribution: give a size for small, medium and large provinces and specify the distribution of province sizes for land and water provinces (lots of arguments)
(4) start sites: give the number of land and water startsites, number of provinces around the start sites, and the number of provinces between start sites (not likely for the alpha, maybe if there is a lot of demand)
(5) anything else you can dream up

paradoxharbinger February 1st, 2007 05:28 PM

Re: new map generator
 
no takers? then i will just go for the first two for now

paradoxharbinger February 17th, 2007 02:37 AM

Re: new map generator
 
1 Attachment(s)
working on finishing the mapgen alpha, which as of now is just making sure that the province generation algorithms work, and i made this map, thought it was interesting and that i'd post it.

two main islands, they look fairly balanced. 45 land, 12 water, 800x600

paradoxharbinger February 19th, 2007 03:05 AM

MapGen alpha release!
 
ok, here is the alpha release of mapgen. the readme pretty much covers everything you need to know to use it. as far as i know, this thing is stable, but if you start trying to make enormous maps on your pre-pentium machine, i'm not making any promises, but any self-respecting pc ought to be able to run this no problem. if something goes awry, give me some feed back and post the debug file so i can try and figure out what happened. also, please provide feedback in general including but not limited to features you think are missing, default parameters, and improvement areas.

edit: removed attachment, new zip further down

Ballbarian February 19th, 2007 09:26 AM

Re: MapGen alpha release!
 
Not working for me paradox. Is script.spt supposed to be blank? I am using WinXP and I get an "application configuration is incorrect" error.

paradoxharbinger February 19th, 2007 12:35 PM

Re: MapGen alpha release!
 
yes, script.spt can be blank, i am not sure what the error you are getting is. mapgen was built on an xp machine. i may have built it with some kind of odd setting though and forgot, i will have to check it out, anyone else getting this error?

DrPraetorious February 19th, 2007 12:42 PM

Re: MapGen alpha release!
 
I get the same error:

"The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

Likewise, I am running WinXP SP 2.

paradoxharbinger February 19th, 2007 03:41 PM

Re: MapGen alpha release!
 
i did try the old build on a pc at school and had no problems running it, so i'm not exactly sure what the problem is, i'm assuming it was the build properties that i had set in vs, which weren't getting me anything anyway, so i changed them all back to default. if this does not work, i may have to use another compiler. is the old build working for anyone?

also a note on scripting, as there seems to be a bit of confusion. default settings are programmed into mapgen, thus script.spt may be empty and it will generate a map with the default settings. if you want to modify the defaults, edit script.spt with the scripting commands here .

edit: removed attachment, new zip further down

DrPraetorious February 19th, 2007 03:44 PM

Re: MapGen alpha release!
 
I get the same error with this attachment, as well.

paradoxharbinger February 19th, 2007 03:48 PM

Re: MapGen alpha release!
 
well, looks like i will have to try some other compiler than visual studio. will try and have another build up tonight.

paradoxharbinger February 19th, 2007 05:24 PM

Re: MapGen alpha release!
 
ok, i think the problem is stemming from the fact that vs is linking with some libraries that are not installed on your pc, but were on the pcs that i was testing on. those of you having problems, you dont have vs on your machines do you?

edit: looks like i did not remove all references to windows libraries in the code. will have a new build to try momentarily.

Ballbarian February 19th, 2007 05:33 PM

Re: MapGen alpha release!
 
I won't be able to try the 2nd attachment until I get home tonight, but I do have visual studio 6.0 installed on my pc.

DrPraetorious February 19th, 2007 05:33 PM

Re: MapGen alpha release!
 
I don't have virtual studio, no.

paradoxharbinger February 19th, 2007 05:44 PM

Re: MapGen alpha release!
 
ok, i think i caught all of the windows refs, so give this a whirl. the next thing i can try is removing all of the std::cout's and fstream and go to good old printf. hopefully it will not come to that.

edit: removed attachment, new zip further down

Manuk February 19th, 2007 06:20 PM

Re: MapGen alpha release!
 
in win2000, at work it generates the map ok. but they are not wrapped.

typed this on script.spt:

wraparound: wraptype; xy

paradoxharbinger February 19th, 2007 06:25 PM

Re: MapGen alpha release!
 
to make a wrapping map, use this:

wraparound: xy;

DrPraetorious February 19th, 2007 06:39 PM

Re: MapGen alpha release!
 
I'm still getting the error with the latest version. This is bizarre - virtual studio can't compile programs that run without libraries?

Ballbarian February 19th, 2007 06:44 PM

Re: MapGen alpha release!
 
Ok, tried it on a pc at work. Generates the same error. This pc also has visual studio 6.0 installed on it.

paradoxharbinger February 19th, 2007 07:48 PM

Re: MapGen alpha release!
 
i looked into the error a bit, and it seems that vs auto links (or something) some dll, cant recall the name at the moment. i saw plenty of pages describing the problem, but nothing describing how to fix or avoid it short of installing the dll on the machine.

DrPraetorious February 19th, 2007 08:23 PM

Re: MapGen alpha release!
 
If it's a freely available .dll I'll install it if needed to use your mapgen.

paradoxharbinger February 19th, 2007 10:19 PM

Re: MapGen alpha release!
 
ok, i think i've found the dlls that need to be installed to run this heap. apparently m$ made it so that apps built with vs2k5 cannot be run on pcs that do not have the proper dlls installed, but m$ has made them available, the installer is here . there does seem to be a workaround for this, which, if i understand it correctly, just means that mapgen would be packaged in an installer with these dlls, which would be installed on your pc when you install mapgen. this is something i will have to look into further, i would rather a no-strings-attached sort of deal.

DrPraetorious February 19th, 2007 11:04 PM

Re: MapGen alpha release!
 
That fixed it.

Thanks!

Making maps now..... http://forum.shrapnelgames.com/images/smilies/happy.gif

DrPraetorious February 19th, 2007 11:21 PM

Re: MapGen alpha release!
 
A few RFEs -
* control for the frequency with which different terrains are seeded. At the moment, these maps have no mountains, which is a game balance issue.

* border mountains. Not sure how to do this, as border mountains don't get seeded like other terrains.

Anyway, it works great, it's amazingly fast. Nice work!

paradoxharbinger February 19th, 2007 11:24 PM

Re: MapGen alpha release!
 
1 Attachment(s)
sweet.

im going to remove the other attachments, and post a new zip with an updated readme in it.

paradoxharbinger February 19th, 2007 11:35 PM

Re: MapGen alpha release!
 
as far as how terrains are seeded, oceans, land masses and mountains are determined strictly by a height map, so everything below x is ocean, everything above y is mountains. rivers are created in a similar manner. the other terrains are sort of 'grown' in the space in between.

try using the tlevel command

the default is tlevel: mountain 120;

so try using a lower number

impassable terrains, border mountains and the other dom3 terrains are something that i intend to work on after i get the sprite functionality in.

well i'm glad that the thing is working, though i'm quite annoyed that it can't be simply copied to another machine.

DrPraetorious February 20th, 2007 02:26 AM

Re: MapGen alpha release!
 
1 Attachment(s)
Oh, I get it. That sets the water level! Okay, that'll work fine.

I think I found a bug in one of the maps it generated (attached). Provinces 10 and 11 appear to have their terrain assignments reversed. There are a few other terrain reversals.

If I had to guess, I think that the script is numbering provinces wrong whe the center (white) pixels have the same y-coordinate. That's just a guess though.

Thanks for the awesome tool!

paradoxharbinger February 20th, 2007 03:03 AM

Re: MapGen alpha release!
 
that may be. i will check it out.

btw, can you post the debug for this map? i'd be interested to see ho long it took to generate it

DrPraetorious February 20th, 2007 03:07 AM

Re: MapGen alpha release!
 
Oh, sorry, I overwrote it already.

This one is about the same size - took 1 minute and 14 seconds, it says. Gah, that's just for the last part.

Total time is about 15 minutes, counting all the steps.

paradoxharbinger February 20th, 2007 03:20 AM

Re: MapGen alpha release!
 
well i took a look at the one you posted, the centers are very close to having the same y coordinate, but they differ by 1. they may have had the same y-coord before the province centers were adjusted, but i cant tell without the debug, so if you see it again, make sure you save it.

speaking of which, first priority is making debug as verbose as i can to address any issues anyone finds

DrPraetorious February 20th, 2007 03:30 AM

Re: MapGen alpha release!
 
1 Attachment(s)
Yeah, okay, take a look at this map - 99 and 100 (I believe) have their province stats reversed.

100 definitely shouldn't be a forest, and 99 should be, in any case. Actually, it looks a lot of the provinces in the 99+ range have their terrain assignments scrambled.

paradoxharbinger February 20th, 2007 03:37 AM

Re: MapGen alpha release!
 
yeah that whole area of the map is a mess, i think it may have to do with the provinces getting renumbered. if it's what i think it is, its a fairly easy fix.

Manuk February 20th, 2007 09:10 PM

Re: MapGen alpha release!
 
1 Attachment(s)
Sorry Paradox, couldn't get the scripts right.

tried this:
wraparound: xy;
dimension: 2000,2000;
pcount: 175 25;


to get less water than default(too much water provinces)
and got that image(see attach)

paradoxharbinger February 21st, 2007 12:19 AM

Re: MapGen alpha release!
 
@manuk

the pcount command is used to specify exactly the number of provinces to generate, so what you typed would create 175 land provinces and 25 water provinces. if you are looking to decrease the total amount of water on the map, try lowering the sea level, use:
tlevel: sea num
right now, sea level is at 38 by default, try lowering the number. or you could use psize to define the relative size of land and water provinces and it will pack as many on as will fit

but the dimensions are messed up because of that comma between the 2000's. the arguments are not separated by commas, just spaces. the syntax is like this:
command: arg1 arg2 arg3 ...;

or in the event that no arguments are required, e.g. verbose:
command;

if this doesnt get you where you need to go, lemme know

@ drP

i'm pretty sure i know where the problem is, i just haven't had time to straighten it out yet. also i am adding in a feature that will allow map regeneration, so if you get a nicely shaped map, but want to change some other settings, you can reuse the random number generator seeds.

Manuk February 21st, 2007 08:04 AM

Re: MapGen alpha release!
 
tried with this script:

wraparound: xy;
dimension: 2000 2000;
tlevel: sea 20;

tried with psize and pcount, but still it's even water and land and the map look like islands. no change.

DrPraetorious February 21st, 2007 11:35 AM

Re: MapGen alpha release!
 
Manuk - try setting the sea level all the way down to 0.

That gives you just a few lakes.

paradoxharbinger February 21st, 2007 12:54 PM

Re: MapGen alpha release!
 
hmmm... try lowering the sea level and zooming in. right now, zoom is not relative to map dimensions. try zoom: .75;

paradoxharbinger February 21st, 2007 01:03 PM

Re: MapGen alpha release!
 
btw, mapgen works differently than the dom3 map generator. dom3 looks like it creates terrain around provinces, ie the provinces are created first and then terrain is stuffed in and around them. mapgen does it in reverse order, terrain is created and then provinces are stuffed into the terrain. i did this because i thought it would lead to a more natural result. if you've ever seen a big map made with dom3, there are usually billions of small mountain ranges and forests, because they put these things along province borders. as a result it looks like chaos.

DrPraetorious February 21st, 2007 01:56 PM

Re: MapGen alpha release!
 
As a rule it produces nice output.

However, I think that the topography (that produces oceans and mountains) is a little off.

It never produces cliffs (so no coastal mountains) and it seldom produces large, unbroken blocks of land. It looks like post-glacial terrain (lots of narrow lakes) even with the water-content set to the minimum.

It'd nice to make maps, for example, with one, roughly circular lake in them. Maybe just a few different fractal algorithms? The code that generates the land maps in Civ IV is freely available (as python code) if you want to take a look at some alternative fractal math.

This is something of a nitpick, obviously, and I'm not suggesting it should take priority over the other features you have planned. If you set the water content very low you get nicely balanced maps.

Keep up the good work!
--TNDP

DrPraetorious February 21st, 2007 03:47 PM

Re: MapGen alpha release!
 
Actually, that's an idea.

If the difference in the "height" of two adjacent province-centers is >X, you declare the border between those two provinces to be a mountain-border. It's impassable and both provinces get the mountain-bordered terrain. How would that work?

paradoxharbinger February 21st, 2007 05:15 PM

Re: MapGen alpha release!
 
that would be a good place to start for part of, but you have to ensure that it makes sense with how the map looks. at least one of the provinces would have to be mountain terrain. there might be more conditions that have to be satisfied for the image to make sense with what map file says.

btw, adding a new layer to the heightmap for lakes should not be too difficult, and may actually be able to replace one of the others. in that case, there would be little time cost for adding it, meaning maps would only take slightly longer to generate. this is on the back burner for now.

paradoxharbinger February 21st, 2007 05:58 PM

Re: MapGen alpha release!
 
that problem with the oceans is kinda bizarre, should not be acting that way.

DrPraetorious February 21st, 2007 06:42 PM

Re: MapGen alpha release!
 
1 Attachment(s)
Actually, I was wrong about the no coastal cliffs (or I just needed to move the mountain limit a bit.)

This is a map without about the right ratios of land:water, but the water is heavily fragmented.

It's still playable, but it'd be nice if all that water was in one or two seas.

Manuk February 22nd, 2007 05:50 PM

Re: MapGen alpha release!
 
there is something about changing switches. I made a map and played it including all nations of that era. some terrain are exactly what they are meant to be. Like theres provinces of two colors that are plains and forest at the same time or something like that.
But others are of some color and the terrain is nothing to do with that color.
Tried to make less water provinces and i think it worked but the map looked like there was a lot of water provinces that were in fact normal provinces (plains?), lots of capitols were in sea provinces (for what they looked in the rgb picture) but they were something else instead.

PS the wrap around and the province shapes look perfect. colors look fine.

paradoxharbinger February 22nd, 2007 08:14 PM

Re: MapGen alpha release!
 
yes, drP came across that bug, im fixing it for the next release, which will probably be this weekend

Ragnarok-X February 23rd, 2007 02:40 PM

Re: MapGen alpha release!
 
sorry but the initial post doesnt tell if this generator works for Dom3 as well. Does it ?


All times are GMT -4. The time now is 04:29 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.