Timberjaw / Dungeonator

Dungeonator world generator for Bukkit
http://www.dungeonator.com
7 stars 1 forks source link

Room Sets - Generator Support #11

Closed Timberjaw closed 12 years ago

Timberjaw commented 12 years ago

This involves determining an appropriate time to add a room set, measuring bounds to determine how much space is available for the set, and searching the database for room sets that will fit. Sets should be spaced either temporally or geographically. When a theme-enabled room is saved, palette-swapped versions should be saved as alternate files to allow for faster selection at generation time.

Timberjaw commented 12 years ago

Concept reservation process:

  1. Once per chunk, select a random direction (NESW)
  2. Move out along the direction by a random number of chunks from 3-10
  3. Select 3 random room sets, ordered by volume
  4. Starting with the largest-volume set, check the surrounding chunks (around our randomly selected chunk) to see if they have been generated, proceeding outward until we can determine if enough room is available for the set. We must also check the existing reserved room list.
  5. If not enough room is available, and we have not yet checked all 3 random room sets, return to step 4 with the next set
  6. If enough room is available, reserve the volume.