View Full Version : new map generator
paradoxharbinger
July 17th, 2006, 03:39 PM
I've been working on a map generator of my own for a while now, thought it might be time to get word on it out to the community. Completion is still a ways off, but I have a site dedicated to the project that is updated when I reach major milestones. Check it out and tell me what you think.
ParadoxHarbinger's MapGen (http://www.geocities.com/paradoxharbinger/index.html)
Arralen
July 19th, 2006, 03:00 AM
You noticed that Dom3 comes with a full build-in random map generator?!
paradoxharbinger
July 19th, 2006, 09:53 AM
From what i can see, mine is probably going to be a vast improvement. I really don't like the way those screens look.
Endoperez
July 19th, 2006, 02:44 PM
In that case, good luck to you! You're off to a good start - that is, you've started! That is surprisingly hard. I'm eager to find out what kind of maps you'd have for our favourite game.
paradoxharbinger
July 19th, 2006, 03:26 PM
I'm going to be updating my page soon with a list of my intended features. These are certainly open to input from the community, and if an idea is real popular, or if I like it, and it's feasible, I'll see about putting it in.
But to give a few ideas about what to expect:
- wrapping maps
- maps surrounded by water, think of this as one big continent
- island maps, sort of the same as just surrounded by water, but with multiple continents
- a seed file, which is tiny compared to the generated map (about a couple of kb) and can be sent to a fellow gamer instead of sending an enourmous tga. this file can be used to regenerate a map exactly.
- province boundaries sensitive to terrain
Right now, I am working on the algorithms to grow forests, wastes, swamps and farmlands, which are all sensitive to where there is water and elevation.
In case anyone is wonderring, when looking at the screens on my site, blue is water, yellow mountains, and green general land. As mentioned, I'm working on more terrain types, hopefully i'll be updating the screens page soon, maybe even with a key for the terrain types.
And have no fear, final maps will have sprites.
Edi
July 23rd, 2006, 05:04 AM
Looks interesting. http://forum.shrapnelgames.com/images/smilies/happy.gif
The color scheme of your site sucks long and hard, though. The links are difficult to see as they vanish into the background and the random white pattern on the right side. I suggest making some modifications so that the links are more visible (e.g. in red text).
Edi
paradoxharbinger
July 23rd, 2006, 09:59 AM
heh, point taken, it looks ok on my pc, but i think i run the brightness on my monitor a little high.
Agrajag
July 23rd, 2006, 10:46 AM
And to be unpleasently honest, I can randomize maps just as good with Photoshop (and I'm guessing that Gimp can do that as well, but I haven't tried it)
Endoperez
July 23rd, 2006, 11:17 AM
If I understood it correctly, his randomized maps are actually height-maps, and he's currently working on how the different heights interact with each other: how low-lands near seas become swamps, how high land must go to be a mountain, etc. Eventually, mountains will get pictures of small mountains (over different-colored ground, I think), while forests will get little trees, and wastelands dead plants.
Agrajag
July 23rd, 2006, 02:45 PM
"Right now, I am working on the algorithms to grow forests, wastes, swamps and farmlands, which are all sensitive to where there is water and elevation. "
According to this, he is working on those algorithms, which means that currently they aren't there, which means those are pretty much just pretty pictures right now, which is what I'm commenting about.
As soon as those algorithms get implemented then my statement is automatically changed to say that only the picture can be easily randomized with photoshop. Once you add in graphical representation, then photoshop can no longer recreate those maps randomly. (Though you could still randomize a map and manually cover it with mountains, forests, swamps etc. without too much trouble.)
Besides, I'm just trying to encourage him to do more work faster (by making him try and prove me wrong) http://forum.shrapnelgames.com/images/smilies/tongue.gif
paradoxharbinger
July 23rd, 2006, 10:06 PM
Endoperez has the right of it, I'm tryinhg to make a 'smarter' map generation algorithm. unfortunately right now i'm working and going to school which doesnt leave a hell of a lot of time for the mapgen. but i'm trying to squeeze in as much work when i can. the mapgen is meant to be a program where you can click one button and have a map generated completely, with no additional work, drop it into the map directory, and play it.
paradoxharbinger
July 24th, 2006, 05:19 PM
quick and dirty little update:
the algorithms for making wastes/forests/farmlands/swamps are about 80% done as of now, and thanks to a dirty little cheat i learned in class runs blindingly fast. might even be finished by tonight, but that's a long shot, got a lot of homework to do. my work load is due to decrease next week thanks to the end of summer classes, so expect more frequent updates soon, and maybe even an overhaul of the website for those of you who find it rough on the eyes.
gonna throw it out there one more time in case you forgot, i'm open to suggestions for features in the mapgen.
paradoxharbinger
August 3rd, 2006, 03:18 AM
i'm looking for a little input as to how people would like to see the balance between forests/swamps/etc. right now i'm thinking of a system of sliders, one for each type of terrain, that would operrate a bit like allocating resources in master of orion 1 was, and dictates approximately how much of the map is taken up by each type of terrain. this doesn't really have any effect on the algorithms, just how the user adjusts these levels.
btw, schools out, so i've finally got some time to get some mapgen related work done, look for new screens soon.
Folket
August 4th, 2006, 06:53 AM
I guess your map generator do generate all paths that you may move along, to my knowledge that should not be easy to generate in Paintshop.
paradoxharbinger
August 5th, 2006, 09:09 AM
yes, all provinces will have their neighbours generated. it will make all of the files necessary for a map to be playable without being edited.
Cainehill
August 7th, 2006, 10:47 AM
Cool - the seed function could be real handy, _if_ the executable file is small enough that people can download it easily. Hrm - if it's going to be single-platform that'll reduce that benefit, since a number of people play Dom2 on Linux or Apple as well as Windoze.
paradoxharbinger
August 7th, 2006, 12:17 PM
i've given the multi-platform thing a little thought, but i don't think there is much i can do for it since i'm not at all familiar with the other two api's. maybe after i get the windows version out some one else could make an interface for mac/linux.
as far as the size of the program file goes, right now it's clocking in at 144kb and shouldn't need more than 100kb for data files. the size of the program probly won't grow to more than 200kb.
paradoxharbinger
August 7th, 2006, 12:23 PM
oh, found this in the old version of the mapgen. i've been working on this thing for a while and i've started it over a few times, here's one of the maps that an old version generated. this is the quality (graphically at least) that i'm aiming at for the initial release. eventually i want graphics to be able to be chosen by the user. i will also not that the algorithms used to generate this particular map bear little resemblance with the algorithms i am using now.
Agrajag
August 7th, 2006, 05:24 PM
That actually looks pretty cool. And it would be even cooler if we got to customize colors as well as tree/mountain sprites.
Oh, and what geography does the pinkish color indicate?
paradoxharbinger
August 7th, 2006, 10:46 PM
think the pinkish stuff was wasteland
paradoxharbinger
August 11th, 2006, 12:50 PM
Here is a new map from the generator, with plains (yellow),
forests (green), farmlands (light green), swamps (dark green), mountains (brown), and water (blue). There should be some wastelands in there, but the algorithm is not quite complete.
As of now, I am concentrating my efforts on normal maps, ie the ones that don't wrap around. Once I tweak this to get the wastelands in there I am going to be moving onto to the province boundaries and then to graphics. For the most part, generating the boundaries for the provinces is a generalization of the algorithms used to make the different terrains, so once I get to it, it shouldn't take long to implement.
Agrajag
August 12th, 2006, 12:15 PM
Awww, now that's not as cool as the previous one.
But I guess its because all those extra layers of eyecandy (textures and mountains and the likes)
If I could recommend one thing though, it would be to make the borders smoother, currently they look stitched together rather than blending into eachother. Another welcome addition would be removing any section of land that is really small, there are several spots of brown and blue in the yellow, and they seem a bit too tiny to make sense (Maybe if the brown was a little bigger it could represent a small mountain).
paradoxharbinger
August 15th, 2006, 12:38 AM
the things that you brought up really aren't issues at all, yet anyway. all of the same anomollies appear in the more finished looking map, but because of the way that sprites are placed and some image smoothing they are not noticeable. i am not sure what effect they might have on creating the province boundaries though, so it is a bridge that will have to be crossed when i come to it.
paradoxharbinger
August 15th, 2006, 02:16 AM
thought a little about the problem of the jagged edges, and it will probably effect province boundaries pretty badly. have no fear, because i have a fix for it. i'll post a new screen when i get it fixed.
paradoxharbinger
August 17th, 2006, 09:27 AM
i spent all night on it, but i smoothed out the transitions between each type of terrain. i just want all of you to know that it was a monumental pain in the ***. attached is a screen. enjoy.
Endoperez
August 17th, 2006, 10:54 AM
It does look much better.
Agrajag
August 17th, 2006, 12:50 PM
Looks great.
With a bit of Guassian Blur (3) and some nice mountain/forest/swamp sprites it will be pretty awesome.
paradoxharbinger
August 20th, 2006, 12:58 PM
researched gaussian blur a bit, and wrote up an algorithm for it, havent had the time to test it yet. also have to find a good value for sigma.
my plan is to blur it with a radius of 2 or 3 before the sprites get put on and then to blur it again with radius 1 or 2 after. i don't want the sprites to become too indestinct, but i don't want them to be too blocky either.
paradoxharbinger
August 21st, 2006, 12:56 PM
ok, tested the gaussian blur algorithm and i think i'm satsfied with it, take a look. let me know whether you think it's too blurry or not enough.
Endoperez
August 21st, 2006, 01:17 PM
I don't like the colors, but the blur works fine. It's hard to tell before seeing some of the icons and the scond blur, though. It all depends on how you do the actual province borders - if they aren't bold in color or shape, the regional differences might be too pronounced. That might be just because of the colors you used, though.
paradoxharbinger
August 21st, 2006, 11:39 PM
right now, all of the colors are just placeholders for debugging and will be chosen with more care according to the sprites that are going to be placed in each respective area. the final colors will probably look similar to the ones in that older map i put up that already had the sprites.
paradoxharbinger
August 29th, 2006, 12:36 AM
been pretty busy lately, just started a new job and was out of town for a while. will have some updates this weekend, hopefully province borders will be in.
paradoxharbinger
August 30th, 2006, 10:14 PM
it's half way there, here's some provinces for ya. hope to make it so that water provinces can be made to be a different size than land ones, maybe another screen later. also expect boundaries to be smoothed out like the terrain type boundaries were.
paradoxharbinger
August 31st, 2006, 12:45 AM
here's one with water provinces larger than land ones. and i'm outta here for the night
Agrajag
August 31st, 2006, 03:46 AM
Looks pretty cool, keep up the good work.
Gandalf Parker
August 31st, 2006, 01:17 PM
A) Did you look at DomMap? Thats the generator that was mostly used in creating random maps for Dom2. The source code is available and a number of people worked on improvments. It is very configurable with tons of switches for how much of any terrain and color choices and amount of blur etc. But I did have a long list of wants that never got put in. I run daily maps off of it here....
http://www.dom2minions.com/~dominion/Dominions2/RandomMaps/RandomMaps.html
All 3 color schemes are done by the same program
B) your options are very needed. Especially the surrounded by water, islands, and wrapping.
C) will this be raw code? or something that can run on linux?
D) Would you like the new terrain math? For the terrain settings to put in the map?
E) will the output image be tga or rgb?
F) GIMP does generate really nice random maps, its free, scriptable, and works on all of the same operating systems that Dom3 does. But Im not sure how easy it would be to write a read/interpret program to create a .map file to go with it.
I have some programs for doing things like assigning reasonable names to provinces (forest names, ocean names, etc). And some for going into scenario work such as special provinces with magic sites, natives, monsters, terrain that all match. Also some for scattering castles, monsters, assiging random AIs that are allied against you, giving AIs special gods, etc. You can check out alot of that at www.dom3minions.com (http://www.dom3minions.com)
Nice project. Good luck with it.
Gandalf Parker
paradoxharbinger
August 31st, 2006, 08:46 PM
gandalf,
a) i have seen dommap, and it was actually the reason i decided to embark on this project. i was looking for something to help me learn the c++ language, and it has done just that, as well as expand my knowledge of win32 programming. the color scheme i am using is not final, and eventually will be user defined.
b) these will be implemented eventually, but right now i am concentrating on regular maps, as the algorithms for the others are just more complex versions of the others. sprites are next up on the list, after i tweak the province algorithm a bit. in the distant future there is hope for a random name generator of my own design. it has already seen the light of day, it just isn't in the mapgen now, there are more imprtant things to implement.
c) as far as porting this to another OS, right now i have a windows pc, and that is what the gui for the mapgen is programmed for. it would not be too difficult to generalize the code to run from the console, so that anyone could compile the code (i think). i want as many people to be able to use the mapgen as possible, but i'm limited to the tools i have at hand.
d) the math used for generating the terrain is already finalized, i have only to tweak a couple of constants here and there. rivers aren't just painted on the way they are in other maps, mine are part of the heightmap algorithm.
e) the image output is currently tga, soon to be RLE tga.
f) i tanlged with gimp when i first started this project to get some sprites. it is not an experience i wish to repeat.
NTJedi
September 1st, 2006, 02:15 PM
Great Work paradoxharbinger !!
paradoxharbinger
September 4th, 2006, 06:26 PM
i found and resolved a massive memory leak today. apparently you cannot use commas to chain delete commands.
paradoxharbinger
September 6th, 2006, 10:09 PM
hey everybody. since i started this thread, i've been using it as the main means of dispensing information to the community adn have completely neglected the website i had set up for the mapgen. i finally made an update to the site and you can find some new screens there. the link's in my sig, enjoy.
Gandalf Parker
September 6th, 2006, 10:50 PM
Its looking good http://forum.shrapnelgames.com/images/smilies/happy.gif
paradoxharbinger
September 9th, 2006, 12:44 PM
been tweaking the border generation algorithm a little. here's a screen to keep you sated until i update my site again.
on other fronts, i'm working on the .map files. the neighbour detection is pretty broken as of now, but i don't think it will be too hard to fix.
paradoxharbinger
September 10th, 2006, 01:28 PM
good news, the neighbour algorithm is fixed and .map files are being generated properly. will probably begin work on wrap-around maps now, which should be a fairly quick process.
Agrajag
September 10th, 2006, 02:30 PM
I'm getting tired of saying "cool" and "keep up the good work".
So instead I will be silent.
I will say, however, that the sample map in the previous post seems a bit dark.
Kristoffer O
September 11th, 2006, 05:20 PM
If you want to prepare for dom3 you might include deep seas.
paradoxharbinger
September 17th, 2006, 06:01 PM
deep seas and other dom3 stuff isn't even being worked on right now, and won't be until i get some documentation. any how, i've got enough to do right now as it is to get the dom2 features in.
wrapping maps are go. check my site for screens of them soon. one is attached.
paradoxharbinger
September 17th, 2006, 07:55 PM
just wonderring if there is any interest out there for ringworld type maps, ie maps that only wrap in one direction?
i think i will put it in eventually because i like them, but right now it's a rather low priority. lemme know
paradoxharbinger
September 17th, 2006, 09:16 PM
ok, the site has been updated with some new screens. enjoy
paradoxharbinger
September 26th, 2006, 12:42 AM
been a while since i posted, been a little busy at home, so i did not get to make an update last weekend, but that is not to say i didnt get something done. my current focus is to finish the seed file and make sure that updating certain sections of code will minimally impact maps that get regenerated and then to implement sprites. these features should be finished by the end of next weekend. i am pushing to make a release available by the time dom3 is out, but please dont quote me on that. the sprites will be adjustable. for now this will mean simply replacing the ones that are there with your own, later i will put a load dialog in.
til next weekend
Gandalf Parker
September 26th, 2006, 11:24 AM
Those are beginning to look VERY good. Especially the wrap-around maps.
paradoxharbinger
September 27th, 2006, 12:43 AM
just fixed a bug that was really screwing up wrapping map borders, getting close to having that seed file done in the process.
paradoxharbinger
September 29th, 2006, 09:59 AM
i'm looking for a few testers to put the mapgen through it's paces before i give it to the public at large, if you are interested let me know
Agrajag
September 29th, 2006, 12:15 PM
*Raises Hand*
Gandalf Parker
September 29th, 2006, 01:04 PM
Maybe you could create a global map style?
Basically it wraps normally on the sides, and at top the provinces can all reach each other, and at the bottom they all reach each other.
Even better is to work the math so that the top and bottom have few provinces, and the middle has many. Such as, the two arctics have 3 wide provinces, temperate zone has 20 across, and tropical zone has 50 across
paradoxharbinger
September 29th, 2006, 01:17 PM
I was thinking about it, but it'll take a good deal of work, so it's something that won't be in the first release. i might take it one step further and make it look like the globe has been mapped onto a flat surface.
paradoxharbinger
September 29th, 2006, 09:54 PM
any who wants to test this, hit me up with an email.
paradoxharbinger@hotmail.com
when it's ready, i'll send it along with a readme for the various controls that are currently available and we'll go from there.
primarily i want to make sure that the seed file works, but i'm also looking at constant tweaks that may improve the visual appeal of the maps
paradoxharbinger
October 1st, 2006, 09:24 PM
things are moving a bit slower than i thought they would, it may be a few more days before i can make a release, depending on how much time i can devote after work.
here is an initial map with some sprites, the colors are still bad and there is still a good deal of work to do, so please be gentle
Ballbarian
October 1st, 2006, 11:33 PM
The generator is looking good paradox. Keep up the good work. http://forum.shrapnelgames.com/images/smilies/happy.gif
Endoperez
October 2nd, 2006, 04:44 AM
Not bad at all. One thing that might work is adding more tree sprites, and mixing them as forests. Dom3's map generator does this, and I like the effect.
paradoxharbinger
October 2nd, 2006, 10:09 AM
i can do that. the sprites i am using now are from the original maps, so i only have 2 trees available and the other types are rather limited as well. if anyone has a more robust sprite set, i'd be happy to use that instead
paradoxharbinger
October 2nd, 2006, 08:31 PM
as promised, the two tree types mixed and closer together
Agrajag
October 3rd, 2006, 04:49 AM
Wow, the forests look really cool
Nerfix
October 3rd, 2006, 05:21 AM
Very nice, the forests look good. http://forum.shrapnelgames.com/images/smilies/happy.gif
Perhaps a thin, pale coloured beach for provinces next to water? If it is doable. Keep the work up, with some fiddling the maps will look very good I think. =)
Endoperez
October 3rd, 2006, 07:18 AM
The forests look good, but unless you change the border color near forested provinces, the borders will be hard to see. Your trees grow closer to each other than the Dom3 ones; making them more sparse would help, but I understood you'd prefer to keep the look of your maps a bit different from the Dom3 maps.
Daynarr
October 3rd, 2006, 08:57 AM
Nice work. http://forum.shrapnelgames.com/images/smilies/smile.gif
paradoxharbinger
October 3rd, 2006, 02:39 PM
as far as borders on forest provinces go, they are a bit hard to see, but it is going to end up comming down to user prefenerance because sprites are fully modable. i am only using these because it is what i have on hand. if someone were to rip the dom3 map sprites, my generator could use them, or any other sprites for that matter. since sprites are user defined, it is impossible to nail down a good distance to put between sprites in general, so this option will be moddable as well on a sprite by sprite basis
also changin the land/water border to be a light blue should not be too difficult
paradoxharbinger
October 5th, 2006, 10:27 PM
got a chance to sit down for a few minutes, changed the borders that are on water to a light blue, screenie attached
paradoxharbinger
October 5th, 2006, 10:32 PM
i'd also like to make a note on the speed of my mapgen vs. the dom3 mapgen. it looks as if mine runs anywhere in the region of 5-10 times faster, though at this point features are comporable.
paradoxharbinger
October 5th, 2006, 11:01 PM
hey everybody, updated the site with some more screens, hit the jump in my sig.
paradoxharbinger
October 6th, 2006, 12:25 AM
new color scheme, let me know what you think.
screen attached and a few added to the site
Endoperez
October 6th, 2006, 05:56 AM
The color scheme is still too bright IMO. I'd suggest you to check out the colors used in the maps you find beatiful, and start from there. Even if that doesn't work with your current sprites, I'd quess it's easier to make new sprites that fit a color scheme than to come up with a good-looking color scheme that works with the current sprites.
Gandalf Parker
October 6th, 2006, 01:15 PM
Color scheme has always been a problem. You want the map to look good, but in game play it ends up getting in the way of the icons. I spent alof of time messing with the dommap colors.
paradoxharbinger
October 7th, 2006, 01:30 PM
well i whipped up a few sprites to use for the swamps, not sure that i like them though, thought that i'd run it past you guys to see what you think about them
paradoxharbinger
October 7th, 2006, 01:39 PM
here's a wrapping map with the new swamp sprites. also forgot to mention that i tweaked the water color a bit to be darker.
Endoperez
October 7th, 2006, 04:14 PM
Perhaps plains could be a bit greener? The colors are already better, though.
The swamp sprites aren't very good at making me think of a swamp, but it's hard to make icons for them. I can't think of anything better.
paradoxharbinger
October 8th, 2006, 12:33 PM
yeah, i dont like them much either, but they are mainly just there as placeholders, took me less than 2 minutes to draw them. in the end that doesn't really matter since sprites are intended to be user moddable, which i s the feature that i am working on now.
paradoxharbinger
October 10th, 2006, 01:29 AM
i nearly have the sction which allows for user defined sprites finished, there is an odd bug somewhere i haven't nailed down yet somewhere, but it's getting close.
paradoxharbinger
October 12th, 2006, 12:40 AM
sprites are now moddable. i've fooled around with some sprites for the plains, and i rather like the result. i'm attaching a screen here and i will be updating my site shortly.
paradoxharbinger
October 12th, 2006, 01:46 AM
here's one more for the road, with improved swamp sprites. good night world
Gandalf Parker
October 12th, 2006, 12:25 PM
It looks good altho abit tall (they are taller than the mountains next to them). But the design and color does give me the feel of swamp
paradoxharbinger
October 12th, 2006, 12:56 PM
yes the mountains and trees need resized, gonna take some mucking around. next thing is to make pixel colors (borders, base province color) moddable
paradoxharbinger
October 12th, 2006, 07:33 PM
i just wanted to throw out an exampe of what the scripts to mod things will look like. the first is for sprites and the second for pixel colors of the underlying terrain and border between terrain types (appearing in that order). if a star should appear in brackets, it is interpretted to mean everything, so it can be used as a default.
<font class="small">Code:</font><hr /><pre>
[FOREST]
.\data\features\tre_01.tga, MODDENSE
.\data\features\tre_02b.tga, MODDENSE
[MOUNTAIN]
.\data\features\mnt_01.tga, MODDENSE
.\data\features\mnt_02.tga, MODDENSE
.\data\features\mnt_03.tga, MODDENSE
[SWAMP]
.\data\features\smp_01.tga, DENSE
.\data\features\smp_02.tga, DENSE
.\data\features\smp_02.tga, DENSE
.\data\features\smp_02.tga, DENSE
.\data\features\smp_02.tga, DENSE
.\data\features\smp_03.tga, DENSE
.\data\features\smp_04.tga, DENSE
.\data\features\smp_05.tga, DENSE
.\data\features\tre_03.tga, DENSE
[FARM]
[WASTE]
[PLAINS]
.\data\features\pln_01.tga, MODDENSE
.\data\features\pln_02.tga, MODDENSE
.\data\features\pln_03.tga, MODDENSE
.\data\features\pln_04.tga, MODDENSE
.\data\features\pln_05.tga, MODDENSE
.\data\features\tre_02b.tga, MODDENSE
[WATER]
[END]
</pre><hr />
<font class="small">Code:</font><hr /><pre>
128, 128, 128
[FOREST]
0, 90, 15
[PLAINS]
200, 215, 5
[SWAMP]
20, 120, 80
[MOUNTAIN]
220, 200, 145
[FARM]
125, 165, 25
[WASTE]
95, 70, 65
[WATER]
25, 70, 175
[*|*]
192, 0, 0
[WATER|*]
128, 255, 255
[FOREST|*]
255, 0, 0
</pre><hr />
btw, i'm thinking about moving this discussion over to the dom3 map section, since the dom2 section seems pretty dead now.
paradoxharbinger
October 12th, 2006, 07:52 PM
i am going to move this discussion to the dom3 map section
to here (http://www.shrapnelcommunity.com/threads/showflat.php?Cat=&Board=d3smm&Number=446398&fpart= &PHPSESSID=)
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.