Computer Science Canada Some What Intelligent Random Map Generation |
Author: | pers2981 [ Wed Dec 28, 2011 2:40 pm ] | ||
Post subject: | Some What Intelligent Random Map Generation | ||
Hey there, A few days ago I started working on a top down RPG game were you play as a night who has to protect the world from evil. The map is going to look something like this, ![]() Were the Green brick is equal to grass and the Blue brick is water and the Brown brick is dirt (etc). Right now the generation system is completely random, as you can see there is water scattered across the world in illogical places. I would like to do something like this. >Generate Lakes/Rivers (Water) >Generate Paths (Dirt) >Fill the rest with Grass (Grass) But i'm not exactly sure how I would go about doing so. Any advice/suggestions?
|
Author: | Tony [ Wed Dec 28, 2011 3:28 pm ] |
Post subject: | Re: Some What Intelligent Random Map Generation |
pers2981 @ Wed Dec 28, 2011 2:40 pm wrote: you play as a night
would this night(man) be fighting day(man)? ![]() Serious response -- a neat approach to world generation is to start with something plausible looking and then run that world in simulation mode for a few thousand years (of game time). In particular, I am a fan of Dwarf Fortress' approach http://df.magmawiki.com/index.php/DF2010:World_generation#The_Generation_Process Quote: You may notice that during various phases of the world generation process worlds will be rejected, leading to the rejection count going up and the process starting over. This happens because certain factors such as number of mountain tiles can't be determined ahead of time by the generation process. Instead worlds are generated with parameters which are likely to produce worlds that can support a required number of mountains, and are then checked to make sure they meet the criteria. For example, the random generation of the topography of the land may result in too few high elevation areas to place mountains. |
Author: | pers2981 [ Wed Dec 28, 2011 3:37 pm ] |
Post subject: | Re: Some What Intelligent Random Map Generation |
Tony @ Wed Dec 28, 2011 3:28 pm wrote: pers2981 @ Wed Dec 28, 2011 2:40 pm wrote: you play as a night
would this night(man) be fighting day(man)? ![]() Serious response -- a neat approach to world generation is to start with something plausible looking and then run that world in simulation mode for a few thousand years (of game time). In particular, I am a fan of Dwarf Fortress' approach http://df.magmawiki.com/index.php/DF2010:World_generation#The_Generation_Process Quote: You may notice that during various phases of the world generation process worlds will be rejected, leading to the rejection count going up and the process starting over. This happens because certain factors such as number of mountain tiles can't be determined ahead of time by the generation process. Instead worlds are generated with parameters which are likely to produce worlds that can support a required number of mountains, and are then checked to make sure they meet the criteria. For example, the random generation of the topography of the land may result in too few high elevation areas to place mountains. I forgot the K ![]() Thanks for that I'll look into it more. |
Author: | pers2981 [ Wed Dec 28, 2011 3:53 pm ] |
Post subject: | Re: Some What Intelligent Random Map Generation |
Hey so I looked more into dwarf fortress world generation but i'm still a bit lost. Not to sound like a lecher but how would I implement something like that into my code? |
Author: | Tony [ Wed Dec 28, 2011 4:01 pm ] |
Post subject: | RE:Some What Intelligent Random Map Generation |
Study up on some geology -- http://en.wikipedia.org/wiki/Geology#Geological_evolution_of_an_area Quote: The geology of an area evolves through time as rock units are deposited and inserted and deformational processes change their shapes and locations. |
Author: | Insectoid [ Wed Dec 28, 2011 6:09 pm ] |
Post subject: | RE:Some What Intelligent Random Map Generation |
A common method is to use a fractal height map, where different heights represent different textures, ie the lowest heights are water, followed by sand, grass, rock, and snow. |
Author: | pers2981 [ Wed Dec 28, 2011 8:30 pm ] |
Post subject: | Re: RE:Some What Intelligent Random Map Generation |
Insectoid @ Wed Dec 28, 2011 6:09 pm wrote: A common method is to use a fractal height map, where different heights represent different textures, ie the lowest heights are water, followed by sand, grass, rock, and snow.
Yeah that would work for a side scrolling game such as terraria but for me it simply wont work. The game is a TOP DOWN rpg. |
Author: | Insectoid [ Wed Dec 28, 2011 8:38 pm ] |
Post subject: | RE:Some What Intelligent Random Map Generation |
Oh, it works. There are 2 examples of exactly what you're looking for in the wiki. |
Author: | pers2981 [ Wed Dec 28, 2011 8:55 pm ] |
Post subject: | Re: RE:Some What Intelligent Random Map Generation |
Insectoid @ Wed Dec 28, 2011 8:38 pm wrote: Oh, it works. There are 2 examples of exactly what you're looking for in the wiki.
Okay? Like I said above. I have no idea on how i would do something like this in turing |
Author: | Aange10 [ Wed Dec 28, 2011 8:59 pm ] |
Post subject: | RE:Some What Intelligent Random Map Generation |
Haha, let's figure it out then. I'll code one too :p |
Author: | pers2981 [ Wed Dec 28, 2011 9:14 pm ] |
Post subject: | Re: RE:Some What Intelligent Random Map Generation |
Aange10 @ Wed Dec 28, 2011 8:59 pm wrote: Haha, let's figure it out then. I'll code one too :p
Ha, Sounds like a plan. I have never done any "Map" related stuff before so this will be quiet complex for me, any advice? |
Author: | Tony [ Wed Dec 28, 2011 9:22 pm ] |
Post subject: | Re: RE:Some What Intelligent Random Map Generation |
pers2981 @ Wed Dec 28, 2011 9:14 pm wrote: any advice?
Start simple. Taking on the entire project at once is overwhelming. Pick one key feature, and focus on that first. |
Author: | Aange10 [ Wed Dec 28, 2011 9:30 pm ] |
Post subject: | RE:Some What Intelligent Random Map Generation |
No advise. I'm working on a recursive way to get an ocean to go from "shallow > average > deep". Just an idea. PM for skype and we can talk there! |
Author: | pers2981 [ Wed Dec 28, 2011 9:56 pm ] | ||
Post subject: | Re: RE:Some What Intelligent Random Map Generation | ||
I was playing around with it and I managed to make a bit more "Logical" map generation system. Its still random but if the block to the left of it is grass then it will have a 50% chance that the next block will be grass aswell. It makes it look a bit more "Group" ish, but only horizontally.
|
Author: | Aange10 [ Wed Dec 28, 2011 11:28 pm ] |
Post subject: | Re: Some What Intelligent Random Map Generation |
Haha, well, here is my failed attempt. The goal was to have the Dark Blue in the middle, the green around it, and the light blue on the outside. Though that failed haha. [Don't need to read the code, just glaze through the comments if you;d like. And do run the program xD] |