Random Map Gen

Monkey Forums/Monkey Programming/Random Map Gen

FBEpyon(Posted 2011) [#1]
Hello All,

For the last few days I have been trying to make a random map generator for a game for multiple platforms, but anyways.

I have been trying to figure out a good method of doing this using tiles, but have been not very successful at it..

Any suggestions of what the best way of doing this would be..?

Thanks,

William Mc.


code so far... removed the code for the map generation.. see Method GenMap()



muddy_shoes(Posted 2011) [#2]
It sort of depends on what result you're looking for and your post doesn't give many clues as to what you're trying to do. The map generator for Civilization is going to be very different to the one for X-Com or Dwarf Fortress or Spelunky or a Rogue-like etc.

Here's some reading: http://pcg.wikidot.com/


FBEpyon(Posted 2011) [#3]
I was looking for something more like DF, if you have any suggestions that would be great..

Thanks,

William Mc.


Samah(Posted 2011) [#4]
Here's a nasty article I wrote on the level generation for Left150Dead:
http://www.indiecodez.com/forum/index.php/topic,79.0.html


Bladko(Posted 2011) [#5]
check my code samples for perlin noise


slenkar(Posted 2011) [#6]
nice little game there Left150Dead


FBEpyon(Posted 2011) [#7]
Okay I have looked almost everywhere for more information on random map generation and I can't seem to find anything.. :( I was using a perlin noise function, but it wasn't giving me the result I was looking for..

Thanks anyways..


muddy_shoes(Posted 2011) [#8]
I can't seem to find anything


Huh? http://pcg.wikidot.com/pcg-algorithm:map-generation

And again: "it wasn't giving me the result I was looking for"

What _are_ you looking for and in what way did the Perlin noise fail to provide it?

The closest you've come to explaining what you want is "something more like DF". What does that mean? DF generates a world on many different levels from continent-sized geography with weather, rivers, climate zones and wildlife through to specific placement of individual trees, resources, and terrain types. It also generates in 3D. Beyond the physical map generation, it also generates characters and populations with "history". You surely don't mean that you want all that, so what do you mean?


FBEpyon(Posted 2011) [#9]
Well I have manage to get it to work for the most part.. It gives a nice random looking world.. now I just need to add in steps into the world when selecting an area and add more options other than just water/land..

Code Below (let me know if there is anything I can improve on)


Image -



Jesse(Posted 2011) [#10]
if you know Blitzmax there is a good example in the code archives of what you are doing that include tile transitions :
http://www.blitzmax.com/codearcs/codearcs.php?code=1999
I might just convert it to monkey and post here.


FBEpyon(Posted 2011) [#11]
Yeh I know Blitzmax, I looked at that code and looks like something that might be good to follow along with..

Thanks,

William Mc.