.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)

Gandalf Parker August 18th, 2007 04:15 PM

Re: quicky update
 
OK, my ADD has shifted back this direction. The blitz games on my server have slowed down and besides offering new game settings Im thinking there is a real desire for blitzes on wrapped maps.

I have a script which I am playing with. The colors seem fairly comfortable to me. The script runs a batch of 100 maps or about 50 provinces (the size I use in my blitz games) and wrapped both X and y. Running a hundred maps usually gives me one or two that I consider good. Maybe someone can help me tweak my settings.

The problems I have is
A) I want the terrains to be abit more grouped. The water together more.

B) I also DONT want the terrains too grouped. Not have all of the forest and mountains grouped to where someone might start somewhere and be stuck with only one terrain for the provinces surrounding their castles (all food bonuses, or all resource bonuses, or all wasteland).

Here is the script I have so far....
<font class="small">Code:</font><hr /><pre>
border: yes ;
filename: Blitz ;
batch: 100 ;
verbose: yes ;
pixel: 50 70 50 * * ;
pixel: 130 130 250 water water ;
pixel: 0 0 205 water ;
pixel: 255 250 205 waste ;
pixel: 124 252 0 farm ;
pixel: 139 90 43 mountain ;
pixel: 162 205 90 swamp ;
pixel: 102 205 0 plain ;
pixel: 34 139 34 forest ;
tchance: plain 50 ;
tchance: mountain 40 ;
tchance: forest 30 ;
tchance: water 50 ;
tchance: farm 10 ;
tchance: swamp 3 ;
tchance: waste 3 ;
tlevel: mountain 140 ;
tlevel: sea 110 ;
pthresh: 5 ;
nbdist: 10 ;
tsize: 50 40 ;
psize: 25 35 ;
zoom: 1.25 ;
wraparound: xy ;
pcount: 40 10 ;
dimension: 2000 1600 ;
</pre><hr />

So how can I get it to be abit more continent and seas, instead of all islands and rivers?

Gandalf Parker

paradoxharbinger August 19th, 2007 08:57 PM

Re: quicky update
 
1 Attachment(s)
once again, i must apologize for my extended absence (getting kind of old, huh?).

i hope that all of you are not too annoyed with me, when i started this project, it was meant to be a way for me to learn a new programming language in an interesting way. after a while it became a way for me to improve my algorithm techniques and even after that, a way for me develop some interesting algorithms of my own, so sometimes i just get derailed into something completely unrelated.

anyway, i have been making some progress. i've recently gone in an entirely new direction with some of the new algorithms, which turns out to be a double win, because even as the algorithms have become more simple, the desired results have also become so much easier to achieve.

i've attached a screen to show what i am now working with. it is a contrived example, but the beauty is that such a result would not be difficult to randomly generate. blue is water, red is land and green is the coast line.

i am going to combine this with the grids to make the edges more jagged. hopefully more on that soon.

@gandalf
unfortunately, seems that the old mapgen is rather more inflexible than i thought, i suppose i never imagined all of the ways people would try to use it, though i tried, but that's what public testing is for, right? in any case, my suggestion would be to try raising the water level. in truth, i haven't looked at that code in so long, i can barely remember how it works, and it was such a mess that it gave me head aches when i went back to try and fix the naming issue that you mentioned. my programming style has advanced quite a bit since i wrote that stuff and to think that i wrote that atrocious code makes me shudder.

Gandalf Parker August 19th, 2007 09:02 PM

Re: quicky update
 
Been there, done that.
Looking at code I wrote years ago either has me laughing or amazed that I wrote it.

Gandalf Parker August 22nd, 2007 02:51 PM

Re: quicky update
 
Very strange. Apparently the secret to getting continents and oceans lies in the ZOOM command. I thought that was zoom like it is in Dom3 but apparently it ties into the code.

Setting zoom to 5.00 got me provinces with very dot-scattered edges. And setting it to 0.25 got me provinces and oceans and also took away the mixed-terrain provinces.

I guess that after I run the maps then I will need to include a fix to the zoom in my script that fixes things like map name and description.

paradoxharbinger August 22nd, 2007 03:50 PM

Re: quicky update
 
yeah, zoom is a little odd. if i remember correctly, this is approximately how it works: imagine you are standing over a map, looking down at it, zoom determines how close your face is to the map. it can dramatically affect how things actually look. i cant remember all of the things i tied it into, nearly everything i expect, but i do recall that it did not lend itself very well to several applications, such as growing terrains.

Gandalf Parker August 22nd, 2007 04:26 PM

Re: quicky update
 
Actually thats how I thought it worked. But apparently it has a big affect on how provinces are drawn, and how they are grouped.

Its a good thing to have found. I can get maps that are alot like Dom3s as far as continent/ocean. Or ones as scattered as I was getting before and thinking I was stuck with it.

The problem I have now is that the settings I had randomly stumbled upon for getting a decent spread of terrains (especially mountains) are no good. I have to start over changing numbers until I stumble on a working ratio.

Can you give me an idea of pthresh, tsize, psize, and some which might be in the program but I dont know it?

paradoxharbinger August 22nd, 2007 06:10 PM

Re: quicky update
 
i think if you scale your old values in proportion to how you scaled the zoom that will set you up. if not, i can start messing around with the old mapgen a bit to figure it out.

DrPraetorious August 22nd, 2007 07:07 PM

Re: quicky update
 
No no no, this is good. We *want* the maps to be more clumped http://forum.shrapnelgames.com/images/smilies/happy.gif.

paradoxharbinger September 8th, 2007 11:38 PM

Re: quicky update
 
work is progressing, i have something now that allows for the overall land percentage to be more or less specified. i have to run some tests to figure out a few constants in my algorithms, but things are looking good. maybe some screens soon.

paradoxharbinger October 12th, 2007 07:24 PM

Re: quicky update
 
ok, land percentage can be closely specified, close enough that no one ought to be able to tell the difference anyway. you can also specify whether the generator should try and put water or land in the center of the map. don't mind the dots, theyre for debug.

screens:

http://paradoxharbinger.wikidot.com/...53.50%20PM.gif

http://paradoxharbinger.wikidot.com/...54.30%20PM.gif

http://paradoxharbinger.wikidot.com/...55.08%20PM.gif

http://paradoxharbinger.wikidot.com/...56.04%20PM.gif

http://paradoxharbinger.wikidot.com/...56.49%20PM.gif

http://paradoxharbinger.wikidot.com/...59.08%20PM.gif

http://paradoxharbinger.wikidot.com/...59.33%20PM.gif


All times are GMT -4. The time now is 07:16 PM.

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