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

paradoxharbinger September 17th, 2006 06:24 PM

new map generator
 
1 Attachment(s)
MAPGEN RELEASE: v0.52

PLEASE NOTE: to run the mapgen, you have to install a couple of dll files from m$, which you can get here

ALSO NOTE: as of v0.52, mapgen allows for sprites to be modded, but sprites are not being distributed with mapgen yet. hopefully, kristoffer will allow me to distribute the sprites that were used in the dom3 maps with mapgen, unil then though, i am afraid you are on your own with finding sprites to use.

i will post mapgen releases here at the top of the thread from here on out

changelog:
0.50
+ initial release

0.51
+ sea level is now adjustable
+ changed default sea and mountain levels to 115 and 165 respectively to reflect changes to heightmap algorithm
+ provinces are now marked with correct terrain types
+ output file which stores random number generator seeds (seeds.sds)
+ scripting command to turn comments on/off in .map file
++ verbose: yes/no;
++ default: no
++ data includes province number, province center point, neighbors and terrain types
+ scripting command to turn numbers on/off in image
++ provnum: yes/no;
++ default: no
++ mostly for my debugging purposes

0.52
+ scripting command to turn province borders on/off in map image
++ border: yes/no;
++ default: yes
+ scripting command to change output file names
++ filename: name;
++ default: test;
+ scripting command to generate a batch of maps
++ batch: number;
+++ number must be between 1 and 1000 inclusive
++ "_xxx" is appended to the filename, where "xxx" is the numerical id for the map
+ scripting command to use sprites in map image
++ sprite: name terrain distance distribution;
+++ name gives a path and file name for the sprite. the path may be relative to the folder MapGen is in
+++ terrain is a string for the terrain type to use this sprite in
+++ distance is an integer. this is the minimal distance that must be between this sprite and all others.
+++ distribution is an integer which will determine how often this sprite is placed for this terrain type
++ NO DEFAULTS. maps will be generated without sprites by default.
+ scripting command to turn province borders on/off
++ border: yes/no;
++ default: yes


to do
+ add lakes to heightmap
+ improve oceans in heightmap
+ improve terrain type algorithm to take distance to water into account
++ three levels
+ scripting command to load random number generator seeds
+ add a command for a palette of colors which will be used as background colors
++ use noise to give concentrations
+ cavern provinces
+ deep sea provinces

paradoxharbinger October 12th, 2006 07:51 PM

Re: new map generator
 
1 Attachment(s)
i am moving all discussion for my map generator to this thread, as the dom2 map section seems to be dead. you can find the link to the old thread in the post above. i've attached a screen of a current map.

The_Tauren13 October 13th, 2006 12:13 PM

Re: new map generator
 
Sweet! Wrap-around maps!

Gandalf Parker October 13th, 2006 01:18 PM

Re: new map generator
 
Wrap Around maps, user added sprites for terrain, more color control. Excellent stuff.

Shovah32 October 13th, 2006 02:27 PM

Re: new map generator
 
Excellent indeed. I was actually conserned about your MapGens future since dom3 has a built n RMG but yours is looking awfully nice.

paradoxharbinger October 13th, 2006 09:40 PM

Re: new map generator
 
thanks all for the encouragement.

changing the script command format again, trying to make it both easy to parse and easy to write a script.

the basic format for a command is:
command: argument argument argument...;

see here for scripting commands

paradoxharbinger October 13th, 2006 10:05 PM

Re: new map generator *DELETED*
 
Post deleted by paradoxharbinger

Gandalf Parker October 14th, 2006 11:41 AM

Re: new map generator
 
You might want to allow for mixed terrains. I know that might be more of a pain than its worth but Id like to see something like a less packed trees sprite for forest/farm, or forest/plain

paradoxharbinger October 14th, 2006 12:20 PM

Re: new map generator
 
not sure wht you mean, are talking about making new terrain types?

Endoperez October 14th, 2006 01:32 PM

Re: new map generator
 
A province can be both forest and mountain. Or both mountain and farmlands. Plains is province with no terrains on it, so plains/other provinces are impossible. Other than that, all combinations can be set, in theory. Even swamp/farmlands etc.

paradoxharbinger October 14th, 2006 01:50 PM

Re: new map generator
 
might be something for future development. the way the mapgen works now, a province can have multiple terrain types, but they aren't blended together, which i think is what you are saying. that sort of thing would constitute new terrain types, such as forest/mountain, atleast as far as making the maps goes.

paradoxharbinger October 16th, 2006 12:46 AM

Re: new map generator
 
ok, the script parser is nearly done, been wrangling with it all weekend. there a few kinks to work out of it, but for the most part it is working. i will continue to update the sixth post down with modding commands as they are implemented. i envision using these scripts in place of a gui, so that i can make this a console app, and hopefully able to build on other platforms.

Agrajag October 16th, 2006 07:00 AM

Re: new map generator
 
Quote:

paradoxharbinger said:
There a few kinks to work out of it, but for the most part it is working.

I think Bash.org said it best:
<W-ll-am> well its nearly working
<BoltBait> You are aware, code that ALMOST works looks NOTHING like the code that ACTUALLY works.
<W-ll-am> dont tell me that, its due tomorrow
http://forum.shrapnelgames.com/images/smilies/happy.gif

paradoxharbinger October 16th, 2006 09:02 AM

Re: new map generator
 
http://forum.shrapnelgames.com/images/smilies/happy.gif

well i think i know what the problem is, i just didnt have the time to look into it last night. we'll see.

Agrajag October 16th, 2006 10:14 AM

Re: new map generator
 
Quote:

paradoxharbinger said:
well i think i know what the problem is, i just didnt have the time to look into it last night. we'll see.

Aye, that's the most annoying feeling there is*, trying to go to sleep late at night when you know exactly what the problem is with your code, but you also know that its going to take way too long to do before going to sleep and still being able to wake up tomorrow http://forum.shrapnelgames.com/images/smilies/happy.gif

*-Actually, it isn't that high up there, but its annoying!

Gandalf Parker October 16th, 2006 10:58 AM

Re: new map generator
 
nahh sometimes low-focus sleep-thinking is the best way to see an answer.

Ballbarian October 16th, 2006 11:02 AM

Re: new map generator
 
I do my best work when I am sleeping with my eyes open. [img]/threads/images/Graemlins/icon10.gif[/img] [img]/threads/images/Graemlins/icon10.gif[/img]

Gandalf Parker October 16th, 2006 02:13 PM

Re: new map generator
 
Actually my most impressive programming is done when I have a fever from something like the flu. Afterward even I am impressed by what I did.

paradoxharbinger October 16th, 2006 03:18 PM

Re: new map generator
 
not only did i have to go to sleep knowing that i might be able to fix the problem, but i have to wait until i get out of work today as well.

paradoxharbinger October 16th, 2006 10:38 PM

Re: new map generator
 
well, i got the scripts working, but somehow, something else is broken in the code that makes the .map file as a result. ah the wonders of technology. for now i'm just going to get the rest of the code up to date so that province borders actually change to the color the script tells them to, possibly some new screens tonight.

paradoxharbinger October 17th, 2006 02:31 AM

Re: new map generator
 
few bugs to work out with the pixel colors, didn't have quite enough time to finish that up and put some screens up

paradoxharbinger October 17th, 2006 06:13 PM

Re: new map generator
 
a few new commands defined in the sixth post.

paradoxharbinger October 18th, 2006 07:35 PM

Re: new map generator
 
got my copy of dom3 today, woot!

Ballbarian October 18th, 2006 09:08 PM

Re: new map generator
 
Congratulations!
Sadly, I sense that the progress on your map generator may suffer. I know all of my projects have. http://forum.shrapnelgames.com/images/smilies/happy.gif

Gandalf Parker October 18th, 2006 10:14 PM

Re: new map generator
 
Ditto. http://forum.shrapnelgames.com/images/smilies/happy.gif

paradoxharbinger October 18th, 2006 11:18 PM

Re: new map generator
 
yes, you're probably right, but not too much i hope. once i start a big sp game i can probably work on it between turns. btw, there was a utility for dom2 that would make a beep in multiplayer games when the next round started. does it work for dom3? or is there a similar utility in the works?

as far as the mapgen goes, not much progress in the past two days, had to give some attention to the girl friend, but hopefuly i'll get a big chunk done tomorrow night.

paradoxharbinger October 18th, 2006 11:52 PM

Re: new map generator
 
most of the commands i've outlined for the scripts are already implemented in the code, it's just a matter of having the scripts change the settings rather than just hard-coding them.

Gandalf Parker October 18th, 2006 11:58 PM

Re: new map generator
 
The only thing I can think of for a "beep" would be a batch file and telling it to run on postexec. Actually it would probably be easier to just play a wav or something. Like "HEY your turn is ready!"

paradoxharbinger October 19th, 2006 01:55 AM

Re: new map generator
 
same thing, i dont think i ever used that util, but then again i wasnt multi tasking so much back in the day either

Gandalf Parker October 19th, 2006 02:09 PM

Re: new map generator
 
I totally understand. I play solo games by logging across the net into my own linux server. Why? Because I dont feel the hostings on my desktop for one thing. And because on long games I can have it do things like beep, or email me, or page me, sms, IM, notify me in IRC, whatever I want for a reminder.

Altho I do miss the speech capabilities of having my Windows machine tell me. I understand though that if I add certain modems I can have my linux server speak. I can also have it phone me and talk to me. Heehee.
"*ring ring* Hello? OK I will be right there."
"Was that your wife?"
"No it was my computer telling me my turn was up"

Hmmm that would also be fun for security notices. http://forum.shrapnelgames.com/images/smilies/happy.gif

paradoxharbinger October 21st, 2006 01:18 AM

Re: new map generator
 
1 Attachment(s)
some of you may recall that the wastelands were not working. i finally got around to looking at that issue and it wasn't so much that they were broken as that they were extremely unlikely to appear, but i've fixed that. in the attached screen, the wastes are that greyish red color.

Gandalf Parker October 21st, 2006 12:35 PM

Re: new map generator
 
Looking good.
Abit busy and bright for my tastes but that is just my tastes. Besides, I can always drop the gamma or fuzz the image if I want to work one into a downloadable scenario map. Much easier to soften one than to get one thats too soft and try to brighten it.

paradoxharbinger October 21st, 2006 02:05 PM

Re: new map generator
 
the problem with how busy the map is, is not really a problem at all. you could construct a sprite that is really just a blob of sprites and use that. i will make a few for the plains and swamps and post a new screen. it won't be perfect, i have to do a little updating of the code that puts in the sprites before it will be, so you will probably see some stuff sticking out into the water, but it's an issue that's slated to be handled.

as far as the brightness goes, like i keep saying, you can change the colors an sprites to whatever you like

paradoxharbinger October 21st, 2006 02:30 PM

Re: new map generator
 
1 Attachment(s)
well here's a quick example. as you can see, the mapgen doesn't play too well with larger sprites, but that is something that is relatively easy to fix, my efforts have been focused elsewhere, but it only took a few miuntes make the map 'less busy'.

paradoxharbinger October 21st, 2006 03:06 PM

Re: new map generator
 
1 Attachment(s)
here's another sparse map, took out the forest sprites, never liked how they looked anyway. if someone could get me a few tree and mountain sprites to replace the ones i'm using, bout the size of the ones dom3 uses, i could use those instead. tried to draw a few, they looked terrible

paradoxharbinger October 23rd, 2006 10:35 PM

Re: new map generator
 
when i started this thing, i thought that it would be a great idea to have a gui for it, but now i'm kicking myself. i've started the droll task of removing all of the windows specific code and renderring the mapgen into pure c++ code with the hopes that i can compile versions of it in linux and mac as well. hopefully it won't be too bad, mostly changing the way i was handling file io. all of the options that would have been accessed through the gui will now be manipulated through the scripts.

Gandalf Parker October 24th, 2006 12:09 PM

Re: new map generator
 
Id appreciate that. My map generation pages are run automatically on a linux server every night. Id like to include a set of maps for your generator also.

Nerfix October 24th, 2006 12:35 PM

Re: new map generator
 
How odd, that map kinds of reminds me of Europe. O_o

paradoxharbinger October 24th, 2006 02:59 PM

Re: new map generator
 
any takers on donating a sprite set? also, does any one know of a windows application which can build apps that will run on linux or mac? it would save me the time having to look around and i'd appreciate it

Agrajag October 24th, 2006 05:41 PM

Re: new map generator
 
Well, I have some sprites, but I really doubt they will help you.
However, I have some free time, so I might try drawing a few sprites for you (though bear in mind I have absolutely no talent http://forum.shrapnelgames.com/images/smilies/happy.gif).
I'd just have to know if it treats sprites as mere pictures it pastes on the map, or does it tile them, or if it uses grayscale images and colors them.

paradoxharbinger October 24th, 2006 05:58 PM

Re: new map generator
 
here's how the sprites work now:
  • black is transparent
  • no pure white
  • all other colors 'pasted' to the map
  • the overall dimensions of the image are used for distance calculations, nothing fancy like looking at the actual image data. this helps for the clumping effect i was discussing earlier
  • 24-bit uncompressed tga
  • sprites are blurred after they are placed on the map with a pass of the gaussian blur

not sure how specific i need to be, i think that covers all of the major stuff without getting too technical. if you have a set of colors to use for the background you'd like to see used with them, send those along too. i'm sure your sprites will be better than the crap ones i put together in a few spare seconds.

btw, i think i may have found a compiler to handle mac/linux apps, havent looked at it yet though.

Agrajag October 25th, 2006 11:27 AM

Re: new map generator
 
Well, I tried, but I cam up with really lousy sprites, so I'll spare you the horror :\

paradoxharbinger October 25th, 2006 01:59 PM

Re: new map generator
 
oh well, i guess that my crppy ones will have to do for now. perhaps i will start another thread to request sprites from some enterprising artists.

paradoxharbinger October 25th, 2006 05:56 PM

Re: new map generator
 
ok i did start a seperate thread for the sprites here

paradoxharbinger October 26th, 2006 06:14 PM

Re: new map generator
 
i think that i may have come up with an algorithm for the 'clumping' effect i was discussing earlier, so that you can just set a flag for it, much like telling the mapgen to create a wrap-around map, instead of having to muck about with the sprites

paradoxharbinger October 27th, 2006 01:05 AM

Re: new map generator
 
also, i may have an algorithm for blending terrain types together along the borders. once i get the non-windows build of this running, i will try and implement these algorithms.

paradoxharbinger October 27th, 2006 01:17 PM

Re: new map generator
 
the blending algorithm will be able to blend together more than 2 terrain types, i believe, so if you have an intersection of swamp, farms, plains and forests, any sprites associated with those terrain types might show up there. i think that this sort of behaviour will have to be restricted from occurring with water though, and possibly mountains.

paradoxharbinger November 1st, 2006 09:18 PM

Re: new map generator
 
fyi, started to put in the dom3 terrain types

paradoxharbinger January 12th, 2007 06:31 PM

Re: new map generator
 
fyi, i put a new site together, wiki format. in my oppinion much easier to maintain and develop, which means it is updated pretty often. plus forums, much more storage and no bandwidth limitations. so the old one has been pretty much abandoned, link to the new one in my sig.

paradoxharbinger January 28th, 2007 12:01 AM

Re: new map generator
 
1 Attachment(s)
i am getting very close to releasing an alpha windows version of mapgen. but in the meantime, i'm going to post a few maps for all of you to play around with. right now there are no sprites, but the maps are playable.

this first is a 1600x1200, 294 provinces (176 land, 118 sea), wrap around.

as always, any comments are deeply appreciated.


All times are GMT -4. The time now is 08:52 PM.

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