1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

random doodads in an area/ random doodads at certain spots

Discussion in 'World Editor Help Zone' started by DaneTheBeast, Apr 15, 2015.

  1. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
  2. Chaosy

    Chaosy

    Tutorial Reviewer

    Joined:
    Jun 9, 2011
    Messages:
    11,102
    Resources:
    18
    Icons:
    1
    Maps:
    1
    Spells:
    10
    Tutorials:
    6
    Resources:
    18
    I've done some simple terrain generation myself back in the day.
    loop
    set loc = random location in playable map
    spawn tree at loc
    end of loop

    I've not played those two specifically so I can't give you an exact answer on how they did it.
     
  3. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    Feel free to take at look at my method used in a TD and in the Dead Lab map in my signature.

    It's quite simple:
    - Loop through every tile in the map (set x = x + 128, do something, rerun trigger, set y = y + 128 if you reach the side of the map and reset x)
    - At every location, give it a random terrain type and use chance to determine which (if any) doodad to spawn.

    There are lots of different approaches you can take based on what you want to make.