Skip to content

Instantly share code, notes, and snippets.

@Timberjaw
Created September 12, 2011 07:08
Show Gist options
  • Save Timberjaw/1210729 to your computer and use it in GitHub Desktop.
Save Timberjaw/1210729 to your computer and use it in GitHub Desktop.
Dungeonator Notes - Room Sets & Reservation
Table: reserved_rooms
Fields: x y z library_id
Reservation Process:
1. On random chance, designate current generating room as a set room
2. Get random set
3. Check set bounds
4. Loop through necessary room coordinates to fill bounds, checking for existing or reserved rooms
5. If invalid, bail and generate a normal room
6. If valid, mark rooms as reserved
Population Process:
1. On startup, load entire reserved room list into memory
2. While generating, compare room coordinates to reservation list
3. Populate reserved rooms regardless of doorway data (preferably populate reserved rooms first!)
4. After populating each reserved room, remove it from the reserved list and the database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment