Results 1 to 6 of 6

Thread: Map Creation

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962

    Map Creation

    I need help creating random maps, the maps will have differnt terrains, 12 kinds to be exact (2 water, 10 land). I need them to be in groups (like continants; simlar to real life). The water types are shallow and deep (shallow being near land).

    Call to Power 2 is a perfect example of what I want.
    Involved in: Sentience

  2. #2
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Easy, look for Perlin Noise tutorials - that should be everything you need to create some realistic random terrain. To use different terrain types like swamp and desert (since Perlin Noise deals only with height fields) you can do something like this: for each terrain patch you wanna put in the map, choose a random location and "paint" a tile in that color there. After that, loop trough all the tiles in the map expanding these patches (if a tile isn't blank, make all the nearby blank tiles the same terrain type). You'll need a lot of passes to create a decent map; make sure the map is not too big or you'll have to wait a lot. To make it more realistic (because this way you'll get a lot of big squares or diamonds), you could have a random factor that decides if a tile "expands" or not, and this could also be based on the height or something so that the greater the slope (height difference between the two tiles), the less chance it has to expand (rules like this, if used wisely, will produce an excellent effect ).
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    Using this techneque, how would I be able to include factors such as contenent size? Water, land, and land type percentages would be easy, but contentant size would be difficult.
    Involved in: Sentience

  4. #4
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Hmm... You're right, this way you can't control the continent size - but since you have land and water percentages it shouldn't be very hard. Alternatively you could have the number of loops to expand the LAND terrain patches = continent size, and then have another number of loops just for the water and stuff
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    How I would probably do it would be to have the whole map be water, then place land on it.

    And what do you think the easiest way to do the shallow water would be, as the shallow water would only be near the land? Do you think that I should just loop though all the land tiles, and set any water tiles within a random number of tiles equal to shallow water? Where the random number is between something like 1 and 4.
    Involved in: Sentience

  6. #6
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Heh no, I think that after the loop ends you can just expand both land tiles and shallow water tiles (when a tile is near a land or shallow water tiles, change it to a shallow water tile)
    1 to 4 loops should be enough
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width