jmbjr / crawl

Dungeon Crawl: Stone Soup official repository
http://crawl.develz.org/
0 stars 0 forks source link

new crypt layout(s) and/or end_vault(s) #2

Open jmbjr opened 8 years ago

jmbjr commented 8 years ago

there are currently 8 crypt ends. 4 are encompass vaults and 4 are standard floating vaults. encompass cryptofortress_bobbens https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L1418 quadcrypt_mu https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L1578 evilmike_haunted_forest https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L1727 grunt_crypt_end_deaths_head https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L1981

floating church_of_pain_bobbens https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#l1304 due_elkab https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L1864 david_glass_crypt https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L1530 lightli_unholy_cathedral https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/branches/crypt.des#L2102

Of the 4 floating vaults, church_of_pain_bobbens and due_elkab are fairly large, whereas david_glass_crypt and lightli_unholy_cathedral are rather small. the only layout that can be used for these 4 vaults is layout_city, which is not ideal.

See these commits for more context: https://github.com/crawl/crawl/commit/3a206a40e4fdd4345f96bcfc97efb35afb22fbb3 https://github.com/crawl/crawl/commit/de31b62de9c3dccf8c18bab6238cfe5e9130bac1

The goal is basically to address the final note in the second commit by Grunt: "Caveat: this means that a grand total of one layout is now generally in use for the non-encompass Crypt endings. This should be changed, either by finding more layouts or by letting some layouts start generating from exits."

1) update existing layouts to work better with crypt 2) and/or create new crypt-only layouts 3) add new floating crypt ends

the ultimate goal would be to recreate some of the encompass vaults but using a layout so that you don't always see the EXACT SAME CRYPT:3

there's a forest layout that is already partially ready for use that might be able to randomize evilmike_haunted_forest a bit. There's been objection in the past on heading this direction, but a particularly decent implementation may be better received. https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/builder/layout_forest.des (see the note in the layout by infiniplex:
-- TODO: -- * Finish the rare version for Crypt with actual crypts scattered around (?) ) another angle is to use one of the geoelf layouts and customize it to create more crypt-like layouts. https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/builder/layout_geoelf.des

See these images for inspiration: my personal favorite: http://www.fairfaxunderground.com/forum/file.php?2,file=14931,filename=Layout31.jpg http://xroads.virginia.edu/~CAP/FLOOR/capbsmt.jpg https://www.liverpool.ac.uk/~ggastro/images2/GG11.jpg https://classconnection.s3.amazonaws.com/302/flashcards/1397302/png/51317182937812-148B2F491F64AEA1258.png

the trick is to get the layout to make some of the very distinctive major rooms, then efficiently and cryptically fill in the surrounding filler rooms, then insert the floating main vault in a really good spot. geoelf_castle should be a really good example of this. https://github.com/crawl/crawl/blob/master/crawl-ref/source/dat/des/builder/layout_geoelf_castle.des

jmbjr commented 8 years ago

gammafunk pointed me to this pan layout that he and infiniplex set up

https://github.com/crawl/crawl/commit/86892e867a4d8dda07870a32006f494270e3d871

it uses subvaults.

jmbjr commented 8 years ago
  1. Get primary vault info
  2. Determine affected cells
  3. Determine distribution of large vaults (>3 cells)
    • based on percentage of empty cells after primary vault placement 25% 0-2 50% 1-3 75% 2-4
  4. Randomize large vault list
  5. Pick a corner and direction to start
  6. For each large vault: Start at corner and go in direction For each cell, if empty, try to fit large vault If fits, increment large vault counter and edit layout Check for max. If max, stop large vaults If not fit, check next empty cell If none fit, next large vault

If not reached min number, veto

  1. Create medium vaults if possible (cells =2)
  2. Remaining cells are all singles.

    If doesn't fit,

jmbjr commented 8 years ago

Primary subvault doesn't get a letter. It's filled in via lua (or maybe could use subvault A?)

Large vaults are B C D E. Max of 4

Need a max number of medium ones and small ones. Can do math to figure it out