3-dungeon-flow.html 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033
  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <link rel="prev" href="2-doorways.html">
  7. <link rel="next" href="4-scene-setup.html">
  8. <link rel="icon" href="../assets/images/favicon.ico">
  9. <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.11">
  10. <title>3. Dungeon Flow Basics - DunGen</title>
  11. <link rel="stylesheet" href="../assets/stylesheets/main.4af4bdda.min.css">
  12. <link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
  13. <script src="https://unpkg.com/iframe-worker/shim"></script>
  14. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  15. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
  16. <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
  17. <link rel="stylesheet" href="../stylesheets/extra.css">
  18. <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  19. </head>
  20. <body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="black" data-md-color-accent="cyan">
  21. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  22. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  23. <label class="md-overlay" for="__drawer"></label>
  24. <div data-md-component="skip">
  25. <a href="#getting-started-dungeon-flow-basics" class="md-skip">
  26. Skip to content
  27. </a>
  28. </div>
  29. <div data-md-component="announce">
  30. </div>
  31. <header class="md-header md-header--shadow" data-md-component="header">
  32. <nav class="md-header__inner md-grid" aria-label="Header">
  33. <a href="../index.html" title="DunGen" class="md-header__button md-logo" aria-label="DunGen" data-md-component="logo">
  34. <svg width="100%" height="100%" viewBox="0 0 258 272" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
  35. <path d="M79,20.998C103.163,20.998 126.827,20.993 150.49,21.002C156.512,21.004 156.994,21.502 157,27.603C157.008,36.435 157.275,45.279 156.89,54.094C156.689,58.68 158.685,61.484 161.849,64.242C170.723,71.978 179.515,79.812 188.188,87.772C190.849,90.214 193.071,93.217 195.28,95.995C199.425,101.209 199.993,100.532 203.73,100.441C209.056,100.311 214.403,100.217 219.713,100.549C222.988,100.754 224.083,99.873 224.059,96.517C223.93,78.354 223.952,60.189 224.044,42.025C224.059,38.949 223.341,37.434 219.868,37.603C214.383,37.872 208.877,37.791 203.381,37.715C199.579,37.663 197.517,38.715 197.907,43.168C198.327,47.964 197.807,52.836 198.065,57.655C198.263,61.366 196.432,62.919 193.348,61.885C188.656,60.311 184.193,58.029 179.724,55.858C179.188,55.598 179.033,54.157 179.028,53.262C178.979,44.43 179.007,35.598 178.995,26.766C178.99,22.857 180.241,20.823 184.822,20.897C200.816,21.158 216.816,20.988 232.814,21.004C239.132,21.01 240.996,22.894 240.998,29.241C241.006,56.07 241.005,82.9 240.998,109.729C240.997,114.795 238.959,117.469 233.922,117.935C228.649,118.423 223.32,118.407 218.015,118.42C208.355,118.444 198.68,117.994 189.04,118.408C184.225,118.615 181.96,116.755 180.231,112.653C175.241,100.811 167.104,91.401 156.54,84.26C153.778,82.394 150.001,81.189 146.67,81.142C126.51,80.86 106.344,81.107 86.182,80.92C81.723,80.878 80.502,82.453 80.517,86.753C80.64,122.394 80.606,158.037 80.499,193.679C80.487,197.764 81.821,199.148 86.047,199.093C103.375,198.866 120.707,198.998 138.038,198.998C159.059,198.998 178.198,184.319 182.849,163.942C184.15,158.243 183.93,152.135 183.91,146.215C183.896,141.846 185.254,139.882 189.885,139.936C204.381,140.105 218.88,139.974 233.378,140.01C238.862,140.024 240.989,142.215 240.993,147.822C241.011,180.317 241.012,212.813 240.992,245.308C240.988,250.939 238.967,252.977 233.218,252.985C205.722,253.022 178.226,253.017 150.73,252.989C145.524,252.983 144.074,251.47 144.001,246.325C143.982,244.992 144.14,243.641 143.973,242.329C143.34,237.341 146.132,235.979 150.411,235.99C160.395,236.016 171.06,236.112 181.183,236.112C181.349,229.59 181.592,223.106 181.957,216.723C182.112,214.015 183.166,213.054 185.926,212.937C199.005,212.385 199.002,212.308 199.002,225.465C199.002,236.846 199.003,236.883 210.211,236.618C214.669,236.512 219.122,236.203 223.998,235.966L223.998,215.809C223.998,197.812 223.911,179.813 224.071,161.817C224.103,158.195 223.211,156.729 219.348,156.922C213.399,157.218 207.424,157 201.518,157C200.995,162.216 201.49,167.296 200.093,171.982C197.761,179.807 196.375,184.335 192.2,189.003C186.463,195.42 180.539,202.401 173.212,206.467C165.218,210.904 155.809,213.982 146.533,214.772C140.003,215.328 133.915,215.112 127.586,214.988C124.239,214.923 122.845,216.06 122.934,219.622C123.145,228.116 123.005,236.618 123.001,245.117C122.998,251.059 121.128,252.977 115.061,252.989C97.897,253.025 80.733,253.002 63.568,253.002C51.404,253.002 39.239,253.028 27.074,252.99C21.11,252.972 19.972,251.911 19.969,246.171C19.952,212.512 20.027,178.852 19.931,145.193C19.92,141.244 21.512,139.936 25.206,139.967C36.037,140.056 46.872,139.868 57.7,140.066C61.659,140.139 62.704,138.654 62.9,134.816C63.079,131.328 63.031,127.859 62.985,124.329C62.92,119.388 61.017,118.259 56.858,118.302C47.864,118.397 38.869,118.381 29.875,118.42C29.044,118.424 28.21,118.569 27.382,118.535C20.483,118.255 19.854,117.626 19.858,110.743C19.874,83.582 19.901,56.422 19.946,29.261C19.957,22.709 21.747,21.005 28.509,21.001C45.173,20.992 61.836,20.998 79,20.998M40.806,37.592C39.579,39.018 37.305,40.427 37.283,41.871C37.009,60.012 37.047,78.158 37.045,96.302C37.045,98.812 38.187,100.243 40.973,100.24C46.626,100.235 52.281,100.327 57.93,100.537C61.815,100.681 63.165,99.043 63.06,95.156C62.832,86.672 62.99,78.177 63.001,69.687C63.01,63.101 65.168,60.989 71.882,60.989C92.36,60.99 112.837,60.999 133.315,60.997C139.718,60.996 139.987,60.711 139.998,54.125C140.004,50.629 139.757,47.111 140.059,43.642C140.457,39.073 138.568,37.373 134.101,37.395C103.319,37.551 72.535,37.595 40.806,37.592M62.997,200.455C62.997,187.472 63.078,174.487 62.886,161.507C62.863,159.996 61.38,157.25 60.476,157.208C52.923,156.859 45.347,157.01 37.87,157.01C37.87,182.364 37.917,206.983 37.817,231.602C37.803,235.205 39.289,236.074 42.623,236.055C62.599,235.939 82.576,236.005 102.552,235.977C103.642,235.975 104.732,235.678 105.997,235.493C105.997,229.703 105.875,224.216 106.048,218.738C106.137,215.898 105.136,214.958 102.315,214.998C93.661,215.12 85.004,215.009 76.348,215.006C62.998,215 62.998,215.006 62.997,200.455Z" style="fill:currentColor;fill-rule:nonzero;"/>
  36. <g transform="matrix(1,0,0,1,91.4761,179.778)">
  37. <text x="0px" y="0px" style="font-family:'Arial-BoldMT', 'Arial', sans-serif;font-weight:700;font-size:110px;fill:currentColor;">D</text>
  38. </g>
  39. </svg>
  40. </a>
  41. <label class="md-header__button md-icon" for="__drawer">
  42. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
  43. </label>
  44. <div class="md-header__title" data-md-component="header-title">
  45. <div class="md-header__ellipsis">
  46. <div class="md-header__topic">
  47. <span class="md-ellipsis">
  48. DunGen
  49. </span>
  50. </div>
  51. <div class="md-header__topic" data-md-component="header-topic">
  52. <span class="md-ellipsis">
  53. 3. Dungeon Flow Basics
  54. </span>
  55. </div>
  56. </div>
  57. </div>
  58. </nav>
  59. </header>
  60. <div class="md-container" data-md-component="container">
  61. <main class="md-main" data-md-component="main">
  62. <div class="md-main__inner md-grid">
  63. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  64. <div class="md-sidebar__scrollwrap">
  65. <div class="md-sidebar__inner">
  66. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  67. <label class="md-nav__title" for="__drawer">
  68. <a href="../index.html" title="DunGen" class="md-nav__button md-logo" aria-label="DunGen" data-md-component="logo">
  69. <svg width="100%" height="100%" viewBox="0 0 258 272" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
  70. <path d="M79,20.998C103.163,20.998 126.827,20.993 150.49,21.002C156.512,21.004 156.994,21.502 157,27.603C157.008,36.435 157.275,45.279 156.89,54.094C156.689,58.68 158.685,61.484 161.849,64.242C170.723,71.978 179.515,79.812 188.188,87.772C190.849,90.214 193.071,93.217 195.28,95.995C199.425,101.209 199.993,100.532 203.73,100.441C209.056,100.311 214.403,100.217 219.713,100.549C222.988,100.754 224.083,99.873 224.059,96.517C223.93,78.354 223.952,60.189 224.044,42.025C224.059,38.949 223.341,37.434 219.868,37.603C214.383,37.872 208.877,37.791 203.381,37.715C199.579,37.663 197.517,38.715 197.907,43.168C198.327,47.964 197.807,52.836 198.065,57.655C198.263,61.366 196.432,62.919 193.348,61.885C188.656,60.311 184.193,58.029 179.724,55.858C179.188,55.598 179.033,54.157 179.028,53.262C178.979,44.43 179.007,35.598 178.995,26.766C178.99,22.857 180.241,20.823 184.822,20.897C200.816,21.158 216.816,20.988 232.814,21.004C239.132,21.01 240.996,22.894 240.998,29.241C241.006,56.07 241.005,82.9 240.998,109.729C240.997,114.795 238.959,117.469 233.922,117.935C228.649,118.423 223.32,118.407 218.015,118.42C208.355,118.444 198.68,117.994 189.04,118.408C184.225,118.615 181.96,116.755 180.231,112.653C175.241,100.811 167.104,91.401 156.54,84.26C153.778,82.394 150.001,81.189 146.67,81.142C126.51,80.86 106.344,81.107 86.182,80.92C81.723,80.878 80.502,82.453 80.517,86.753C80.64,122.394 80.606,158.037 80.499,193.679C80.487,197.764 81.821,199.148 86.047,199.093C103.375,198.866 120.707,198.998 138.038,198.998C159.059,198.998 178.198,184.319 182.849,163.942C184.15,158.243 183.93,152.135 183.91,146.215C183.896,141.846 185.254,139.882 189.885,139.936C204.381,140.105 218.88,139.974 233.378,140.01C238.862,140.024 240.989,142.215 240.993,147.822C241.011,180.317 241.012,212.813 240.992,245.308C240.988,250.939 238.967,252.977 233.218,252.985C205.722,253.022 178.226,253.017 150.73,252.989C145.524,252.983 144.074,251.47 144.001,246.325C143.982,244.992 144.14,243.641 143.973,242.329C143.34,237.341 146.132,235.979 150.411,235.99C160.395,236.016 171.06,236.112 181.183,236.112C181.349,229.59 181.592,223.106 181.957,216.723C182.112,214.015 183.166,213.054 185.926,212.937C199.005,212.385 199.002,212.308 199.002,225.465C199.002,236.846 199.003,236.883 210.211,236.618C214.669,236.512 219.122,236.203 223.998,235.966L223.998,215.809C223.998,197.812 223.911,179.813 224.071,161.817C224.103,158.195 223.211,156.729 219.348,156.922C213.399,157.218 207.424,157 201.518,157C200.995,162.216 201.49,167.296 200.093,171.982C197.761,179.807 196.375,184.335 192.2,189.003C186.463,195.42 180.539,202.401 173.212,206.467C165.218,210.904 155.809,213.982 146.533,214.772C140.003,215.328 133.915,215.112 127.586,214.988C124.239,214.923 122.845,216.06 122.934,219.622C123.145,228.116 123.005,236.618 123.001,245.117C122.998,251.059 121.128,252.977 115.061,252.989C97.897,253.025 80.733,253.002 63.568,253.002C51.404,253.002 39.239,253.028 27.074,252.99C21.11,252.972 19.972,251.911 19.969,246.171C19.952,212.512 20.027,178.852 19.931,145.193C19.92,141.244 21.512,139.936 25.206,139.967C36.037,140.056 46.872,139.868 57.7,140.066C61.659,140.139 62.704,138.654 62.9,134.816C63.079,131.328 63.031,127.859 62.985,124.329C62.92,119.388 61.017,118.259 56.858,118.302C47.864,118.397 38.869,118.381 29.875,118.42C29.044,118.424 28.21,118.569 27.382,118.535C20.483,118.255 19.854,117.626 19.858,110.743C19.874,83.582 19.901,56.422 19.946,29.261C19.957,22.709 21.747,21.005 28.509,21.001C45.173,20.992 61.836,20.998 79,20.998M40.806,37.592C39.579,39.018 37.305,40.427 37.283,41.871C37.009,60.012 37.047,78.158 37.045,96.302C37.045,98.812 38.187,100.243 40.973,100.24C46.626,100.235 52.281,100.327 57.93,100.537C61.815,100.681 63.165,99.043 63.06,95.156C62.832,86.672 62.99,78.177 63.001,69.687C63.01,63.101 65.168,60.989 71.882,60.989C92.36,60.99 112.837,60.999 133.315,60.997C139.718,60.996 139.987,60.711 139.998,54.125C140.004,50.629 139.757,47.111 140.059,43.642C140.457,39.073 138.568,37.373 134.101,37.395C103.319,37.551 72.535,37.595 40.806,37.592M62.997,200.455C62.997,187.472 63.078,174.487 62.886,161.507C62.863,159.996 61.38,157.25 60.476,157.208C52.923,156.859 45.347,157.01 37.87,157.01C37.87,182.364 37.917,206.983 37.817,231.602C37.803,235.205 39.289,236.074 42.623,236.055C62.599,235.939 82.576,236.005 102.552,235.977C103.642,235.975 104.732,235.678 105.997,235.493C105.997,229.703 105.875,224.216 106.048,218.738C106.137,215.898 105.136,214.958 102.315,214.998C93.661,215.12 85.004,215.009 76.348,215.006C62.998,215 62.998,215.006 62.997,200.455Z" style="fill:currentColor;fill-rule:nonzero;"/>
  71. <g transform="matrix(1,0,0,1,91.4761,179.778)">
  72. <text x="0px" y="0px" style="font-family:'Arial-BoldMT', 'Arial', sans-serif;font-weight:700;font-size:110px;fill:currentColor;">D</text>
  73. </g>
  74. </svg>
  75. </a>
  76. DunGen
  77. </label>
  78. <ul class="md-nav__list" data-md-scrollfix>
  79. <li class="md-nav__item">
  80. <a href="../index.html" class="md-nav__link">
  81. <span class="md-ellipsis">
  82. Introduction
  83. </span>
  84. </a>
  85. </li>
  86. <li class="md-nav__item">
  87. <a href="../changelog.html" class="md-nav__link">
  88. <span class="md-ellipsis">
  89. Changelog
  90. </span>
  91. </a>
  92. </li>
  93. <li class="md-nav__item md-nav__item--active md-nav__item--nested">
  94. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
  95. <div class="md-nav__link md-nav__container">
  96. <a href="index.html" class="md-nav__link ">
  97. <span class="md-ellipsis">
  98. Getting Started
  99. </span>
  100. </a>
  101. <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="0">
  102. <span class="md-nav__icon md-icon"></span>
  103. </label>
  104. </div>
  105. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
  106. <label class="md-nav__title" for="__nav_3">
  107. <span class="md-nav__icon md-icon"></span>
  108. Getting Started
  109. </label>
  110. <ul class="md-nav__list" data-md-scrollfix>
  111. <li class="md-nav__item">
  112. <a href="1-creating-tiles.html" class="md-nav__link">
  113. <span class="md-ellipsis">
  114. 1. Creating Tiles
  115. </span>
  116. </a>
  117. </li>
  118. <li class="md-nav__item">
  119. <a href="2-doorways.html" class="md-nav__link">
  120. <span class="md-ellipsis">
  121. 2. Doorways
  122. </span>
  123. </a>
  124. </li>
  125. <li class="md-nav__item md-nav__item--active">
  126. <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
  127. <label class="md-nav__link md-nav__link--active" for="__toc">
  128. <span class="md-ellipsis">
  129. 3. Dungeon Flow Basics
  130. </span>
  131. <span class="md-nav__icon md-icon"></span>
  132. </label>
  133. <a href="3-dungeon-flow.html" class="md-nav__link md-nav__link--active">
  134. <span class="md-ellipsis">
  135. 3. Dungeon Flow Basics
  136. </span>
  137. </a>
  138. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  139. <label class="md-nav__title" for="__toc">
  140. <span class="md-nav__icon md-icon"></span>
  141. Table of contents
  142. </label>
  143. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  144. <li class="md-nav__item">
  145. <a href="#marking-the-tile" class="md-nav__link">
  146. <span class="md-ellipsis">
  147. Marking the Tile
  148. </span>
  149. </a>
  150. </li>
  151. <li class="md-nav__item">
  152. <a href="#setting-up-assets" class="md-nav__link">
  153. <span class="md-ellipsis">
  154. Setting Up Assets
  155. </span>
  156. </a>
  157. <nav class="md-nav" aria-label="Setting Up Assets">
  158. <ul class="md-nav__list">
  159. <li class="md-nav__item">
  160. <a href="#tile-set" class="md-nav__link">
  161. <span class="md-ellipsis">
  162. Tile Set
  163. </span>
  164. </a>
  165. </li>
  166. <li class="md-nav__item">
  167. <a href="#archetype" class="md-nav__link">
  168. <span class="md-ellipsis">
  169. Archetype
  170. </span>
  171. </a>
  172. </li>
  173. </ul>
  174. </nav>
  175. </li>
  176. <li class="md-nav__item">
  177. <a href="#dungeon-flow" class="md-nav__link">
  178. <span class="md-ellipsis">
  179. Dungeon Flow
  180. </span>
  181. </a>
  182. </li>
  183. <li class="md-nav__item">
  184. <a href="#understanding-the-flow-graph" class="md-nav__link">
  185. <span class="md-ellipsis">
  186. Understanding the Flow Graph
  187. </span>
  188. </a>
  189. <nav class="md-nav" aria-label="Understanding the Flow Graph">
  190. <ul class="md-nav__list">
  191. <li class="md-nav__item">
  192. <a href="#nodes" class="md-nav__link">
  193. <span class="md-ellipsis">
  194. Nodes
  195. </span>
  196. </a>
  197. </li>
  198. <li class="md-nav__item">
  199. <a href="#lines" class="md-nav__link">
  200. <span class="md-ellipsis">
  201. Lines
  202. </span>
  203. </a>
  204. </li>
  205. <li class="md-nav__item">
  206. <a href="#dungeon-length" class="md-nav__link">
  207. <span class="md-ellipsis">
  208. Dungeon Length
  209. </span>
  210. </a>
  211. </li>
  212. </ul>
  213. </nav>
  214. </li>
  215. <li class="md-nav__item">
  216. <a href="#recap" class="md-nav__link">
  217. <span class="md-ellipsis">
  218. Recap
  219. </span>
  220. </a>
  221. </li>
  222. </ul>
  223. </nav>
  224. </li>
  225. <li class="md-nav__item">
  226. <a href="4-scene-setup.html" class="md-nav__link">
  227. <span class="md-ellipsis">
  228. 4. Scene Setup & First Generation
  229. </span>
  230. </a>
  231. </li>
  232. </ul>
  233. </nav>
  234. </li>
  235. <li class="md-nav__item md-nav__item--nested">
  236. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
  237. <div class="md-nav__link md-nav__container">
  238. <a href="../core-concepts/index.html" class="md-nav__link ">
  239. <span class="md-ellipsis">
  240. Core Concepts
  241. </span>
  242. </a>
  243. <label class="md-nav__link " for="__nav_4" id="__nav_4_label" tabindex="0">
  244. <span class="md-nav__icon md-icon"></span>
  245. </label>
  246. </div>
  247. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
  248. <label class="md-nav__title" for="__nav_4">
  249. <span class="md-nav__icon md-icon"></span>
  250. Core Concepts
  251. </label>
  252. <ul class="md-nav__list" data-md-scrollfix>
  253. <li class="md-nav__item">
  254. <a href="../core-concepts/tiles.html" class="md-nav__link">
  255. <span class="md-ellipsis">
  256. Tiles & Tile Component
  257. </span>
  258. </a>
  259. </li>
  260. <li class="md-nav__item">
  261. <a href="../core-concepts/weighting.html" class="md-nav__link">
  262. <span class="md-ellipsis">
  263. Weighting
  264. </span>
  265. </a>
  266. </li>
  267. <li class="md-nav__item">
  268. <a href="../core-concepts/tile-sets.html" class="md-nav__link">
  269. <span class="md-ellipsis">
  270. Tile Sets
  271. </span>
  272. </a>
  273. </li>
  274. <li class="md-nav__item">
  275. <a href="../core-concepts/archetypes.html" class="md-nav__link">
  276. <span class="md-ellipsis">
  277. Archetypes
  278. </span>
  279. </a>
  280. </li>
  281. <li class="md-nav__item">
  282. <a href="../core-concepts/doorways.html" class="md-nav__link">
  283. <span class="md-ellipsis">
  284. Doorways
  285. </span>
  286. </a>
  287. </li>
  288. <li class="md-nav__item">
  289. <a href="../core-concepts/dungeon-flow.html" class="md-nav__link">
  290. <span class="md-ellipsis">
  291. Dungeon Flow Asset
  292. </span>
  293. </a>
  294. </li>
  295. <li class="md-nav__item">
  296. <a href="../core-concepts/flow-editor.html" class="md-nav__link">
  297. <span class="md-ellipsis">
  298. Flow Editor
  299. </span>
  300. </a>
  301. </li>
  302. <li class="md-nav__item">
  303. <a href="../core-concepts/dungeon-generator.html" class="md-nav__link">
  304. <span class="md-ellipsis">
  305. Dungeon Generator
  306. </span>
  307. </a>
  308. </li>
  309. </ul>
  310. </nav>
  311. </li>
  312. <li class="md-nav__item md-nav__item--nested">
  313. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
  314. <div class="md-nav__link md-nav__container">
  315. <a href="../advanced-features/index.html" class="md-nav__link ">
  316. <span class="md-ellipsis">
  317. Advanced Features
  318. </span>
  319. </a>
  320. <label class="md-nav__link " for="__nav_5" id="__nav_5_label" tabindex="0">
  321. <span class="md-nav__icon md-icon"></span>
  322. </label>
  323. </div>
  324. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
  325. <label class="md-nav__title" for="__nav_5">
  326. <span class="md-nav__icon md-icon"></span>
  327. Advanced Features
  328. </label>
  329. <ul class="md-nav__list" data-md-scrollfix>
  330. <li class="md-nav__item">
  331. <a href="../advanced-features/props-variety.html" class="md-nav__link">
  332. <span class="md-ellipsis">
  333. Props for Variety
  334. </span>
  335. </a>
  336. </li>
  337. <li class="md-nav__item">
  338. <a href="../advanced-features/doors.html" class="md-nav__link">
  339. <span class="md-ellipsis">
  340. Doors
  341. </span>
  342. </a>
  343. </li>
  344. <li class="md-nav__item">
  345. <a href="../advanced-features/multiple-floors.html" class="md-nav__link">
  346. <span class="md-ellipsis">
  347. Multiple Floors
  348. </span>
  349. </a>
  350. </li>
  351. <li class="md-nav__item">
  352. <a href="../advanced-features/lock-key-system.html" class="md-nav__link">
  353. <span class="md-ellipsis">
  354. Lock & Key System
  355. </span>
  356. </a>
  357. </li>
  358. <li class="md-nav__item">
  359. <a href="../advanced-features/injecting-tiles.html" class="md-nav__link">
  360. <span class="md-ellipsis">
  361. Injecting Special Tiles
  362. </span>
  363. </a>
  364. </li>
  365. <li class="md-nav__item">
  366. <a href="../advanced-features/connection-rules.html" class="md-nav__link">
  367. <span class="md-ellipsis">
  368. Tile Connection Rules
  369. </span>
  370. </a>
  371. </li>
  372. <li class="md-nav__item">
  373. <a href="../advanced-features/attached-dungeons.html" class="md-nav__link">
  374. <span class="md-ellipsis">
  375. Generating Attached Dungeons
  376. </span>
  377. </a>
  378. </li>
  379. <li class="md-nav__item">
  380. <a href="../advanced-features/additional-collisions.html" class="md-nav__link">
  381. <span class="md-ellipsis">
  382. Avoid Collisions With the Scene
  383. </span>
  384. </a>
  385. </li>
  386. <li class="md-nav__item">
  387. <a href="../advanced-features/runtime-events.html" class="md-nav__link">
  388. <span class="md-ellipsis">
  389. Runtime Events & Code Execution
  390. </span>
  391. </a>
  392. </li>
  393. <li class="md-nav__item">
  394. <a href="../advanced-features/post-processing.html" class="md-nav__link">
  395. <span class="md-ellipsis">
  396. Custom Post-Processing
  397. </span>
  398. </a>
  399. </li>
  400. <li class="md-nav__item">
  401. <a href="../advanced-features/character-component.html" class="md-nav__link">
  402. <span class="md-ellipsis">
  403. DunGen Character Component
  404. </span>
  405. </a>
  406. </li>
  407. </ul>
  408. </nav>
  409. </li>
  410. <li class="md-nav__item md-nav__item--nested">
  411. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
  412. <div class="md-nav__link md-nav__container">
  413. <a href="../optimization/index.html" class="md-nav__link ">
  414. <span class="md-ellipsis">
  415. Optimization
  416. </span>
  417. </a>
  418. <label class="md-nav__link " for="__nav_6" id="__nav_6_label" tabindex="0">
  419. <span class="md-nav__icon md-icon"></span>
  420. </label>
  421. </div>
  422. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
  423. <label class="md-nav__title" for="__nav_6">
  424. <span class="md-nav__icon md-icon"></span>
  425. Optimization
  426. </label>
  427. <ul class="md-nav__list" data-md-scrollfix>
  428. <li class="md-nav__item">
  429. <a href="../optimization/culling.html" class="md-nav__link">
  430. <span class="md-ellipsis">
  431. Built-in Culling
  432. </span>
  433. </a>
  434. </li>
  435. <li class="md-nav__item">
  436. <a href="../optimization/tile-pooling.html" class="md-nav__link">
  437. <span class="md-ellipsis">
  438. Tile Pooling
  439. </span>
  440. </a>
  441. </li>
  442. </ul>
  443. </nav>
  444. </li>
  445. <li class="md-nav__item md-nav__item--nested">
  446. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
  447. <div class="md-nav__link md-nav__container">
  448. <a href="../pathfinding/index.html" class="md-nav__link ">
  449. <span class="md-ellipsis">
  450. Pathfinding
  451. </span>
  452. </a>
  453. <label class="md-nav__link " for="__nav_7" id="__nav_7_label" tabindex="0">
  454. <span class="md-nav__icon md-icon"></span>
  455. </label>
  456. </div>
  457. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
  458. <label class="md-nav__title" for="__nav_7">
  459. <span class="md-nav__icon md-icon"></span>
  460. Pathfinding
  461. </label>
  462. <ul class="md-nav__list" data-md-scrollfix>
  463. <li class="md-nav__item">
  464. <a href="../pathfinding/unity-navmesh.html" class="md-nav__link">
  465. <span class="md-ellipsis">
  466. Unity NavMesh Components
  467. </span>
  468. </a>
  469. </li>
  470. <li class="md-nav__item">
  471. <a href="../pathfinding/astar-pathfinding.html" class="md-nav__link">
  472. <span class="md-ellipsis">
  473. A* Pathfinding Project Pro
  474. </span>
  475. </a>
  476. </li>
  477. <li class="md-nav__item">
  478. <a href="../pathfinding/custom-adapters.html" class="md-nav__link">
  479. <span class="md-ellipsis">
  480. Custom Adapters
  481. </span>
  482. </a>
  483. </li>
  484. </ul>
  485. </nav>
  486. </li>
  487. <li class="md-nav__item md-nav__item--nested">
  488. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" >
  489. <div class="md-nav__link md-nav__container">
  490. <a href="../integrations/index.html" class="md-nav__link ">
  491. <span class="md-ellipsis">
  492. Integrations
  493. </span>
  494. </a>
  495. <label class="md-nav__link " for="__nav_8" id="__nav_8_label" tabindex="0">
  496. <span class="md-nav__icon md-icon"></span>
  497. </label>
  498. </div>
  499. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
  500. <label class="md-nav__title" for="__nav_8">
  501. <span class="md-nav__icon md-icon"></span>
  502. Integrations
  503. </label>
  504. <ul class="md-nav__list" data-md-scrollfix>
  505. <li class="md-nav__item">
  506. <a href="../integrations/sectr.html" class="md-nav__link">
  507. <span class="md-ellipsis">
  508. SECTR Portal Culling
  509. </span>
  510. </a>
  511. </li>
  512. <li class="md-nav__item">
  513. <a href="../integrations/playmaker.html" class="md-nav__link">
  514. <span class="md-ellipsis">
  515. PlayMaker Actions
  516. </span>
  517. </a>
  518. </li>
  519. </ul>
  520. </nav>
  521. </li>
  522. <li class="md-nav__item md-nav__item--nested">
  523. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" >
  524. <div class="md-nav__link md-nav__container">
  525. <a href="../troubleshooting/index.html" class="md-nav__link ">
  526. <span class="md-ellipsis">
  527. Troubleshooting
  528. </span>
  529. </a>
  530. <label class="md-nav__link " for="__nav_9" id="__nav_9_label" tabindex="0">
  531. <span class="md-nav__icon md-icon"></span>
  532. </label>
  533. </div>
  534. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
  535. <label class="md-nav__title" for="__nav_9">
  536. <span class="md-nav__icon md-icon"></span>
  537. Troubleshooting
  538. </label>
  539. <ul class="md-nav__list" data-md-scrollfix>
  540. <li class="md-nav__item">
  541. <a href="../troubleshooting/limitations.html" class="md-nav__link">
  542. <span class="md-ellipsis">
  543. Limitations & Considerations
  544. </span>
  545. </a>
  546. </li>
  547. <li class="md-nav__item">
  548. <a href="../troubleshooting/analysis.html" class="md-nav__link">
  549. <span class="md-ellipsis">
  550. Analysis
  551. </span>
  552. </a>
  553. </li>
  554. </ul>
  555. </nav>
  556. </li>
  557. <li class="md-nav__item md-nav__item--nested">
  558. <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_10" >
  559. <label class="md-nav__link" for="__nav_10" id="__nav_10_label" tabindex="0">
  560. <span class="md-ellipsis">
  561. Reference
  562. </span>
  563. <span class="md-nav__icon md-icon"></span>
  564. </label>
  565. <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
  566. <label class="md-nav__title" for="__nav_10">
  567. <span class="md-nav__icon md-icon"></span>
  568. Reference
  569. </label>
  570. <ul class="md-nav__list" data-md-scrollfix>
  571. <li class="md-nav__item">
  572. <a href="../reference/faq.html" class="md-nav__link">
  573. <span class="md-ellipsis">
  574. FAQ
  575. </span>
  576. </a>
  577. </li>
  578. <li class="md-nav__item">
  579. <a href="../reference/cookbook.html" class="md-nav__link">
  580. <span class="md-ellipsis">
  581. Cookbook
  582. </span>
  583. </a>
  584. </li>
  585. </ul>
  586. </nav>
  587. </li>
  588. </ul>
  589. </nav>
  590. </div>
  591. </div>
  592. </div>
  593. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  594. <div class="md-sidebar__scrollwrap">
  595. <div class="md-sidebar__inner">
  596. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  597. <label class="md-nav__title" for="__toc">
  598. <span class="md-nav__icon md-icon"></span>
  599. Table of contents
  600. </label>
  601. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  602. <li class="md-nav__item">
  603. <a href="#marking-the-tile" class="md-nav__link">
  604. <span class="md-ellipsis">
  605. Marking the Tile
  606. </span>
  607. </a>
  608. </li>
  609. <li class="md-nav__item">
  610. <a href="#setting-up-assets" class="md-nav__link">
  611. <span class="md-ellipsis">
  612. Setting Up Assets
  613. </span>
  614. </a>
  615. <nav class="md-nav" aria-label="Setting Up Assets">
  616. <ul class="md-nav__list">
  617. <li class="md-nav__item">
  618. <a href="#tile-set" class="md-nav__link">
  619. <span class="md-ellipsis">
  620. Tile Set
  621. </span>
  622. </a>
  623. </li>
  624. <li class="md-nav__item">
  625. <a href="#archetype" class="md-nav__link">
  626. <span class="md-ellipsis">
  627. Archetype
  628. </span>
  629. </a>
  630. </li>
  631. </ul>
  632. </nav>
  633. </li>
  634. <li class="md-nav__item">
  635. <a href="#dungeon-flow" class="md-nav__link">
  636. <span class="md-ellipsis">
  637. Dungeon Flow
  638. </span>
  639. </a>
  640. </li>
  641. <li class="md-nav__item">
  642. <a href="#understanding-the-flow-graph" class="md-nav__link">
  643. <span class="md-ellipsis">
  644. Understanding the Flow Graph
  645. </span>
  646. </a>
  647. <nav class="md-nav" aria-label="Understanding the Flow Graph">
  648. <ul class="md-nav__list">
  649. <li class="md-nav__item">
  650. <a href="#nodes" class="md-nav__link">
  651. <span class="md-ellipsis">
  652. Nodes
  653. </span>
  654. </a>
  655. </li>
  656. <li class="md-nav__item">
  657. <a href="#lines" class="md-nav__link">
  658. <span class="md-ellipsis">
  659. Lines
  660. </span>
  661. </a>
  662. </li>
  663. <li class="md-nav__item">
  664. <a href="#dungeon-length" class="md-nav__link">
  665. <span class="md-ellipsis">
  666. Dungeon Length
  667. </span>
  668. </a>
  669. </li>
  670. </ul>
  671. </nav>
  672. </li>
  673. <li class="md-nav__item">
  674. <a href="#recap" class="md-nav__link">
  675. <span class="md-ellipsis">
  676. Recap
  677. </span>
  678. </a>
  679. </li>
  680. </ul>
  681. </nav>
  682. </div>
  683. </div>
  684. </div>
  685. <div class="md-content" data-md-component="content">
  686. <article class="md-content__inner md-typeset">
  687. <h1 id="getting-started-dungeon-flow-basics">Getting Started: Dungeon Flow Basics</h1>
  688. <p>Now that we've created a basic room Tile and added Doorways, it’s time to give DunGen instructions on how to assemble those Tiles into a full dungeon.</p>
  689. <p>This is where the <strong>Dungeon Flow</strong> system comes in.</p>
  690. <hr />
  691. <h2 id="marking-the-tile">Marking the Tile</h2>
  692. <p>We need to add a <code>Tile</code> component to the root of our room (<em>Add Component &gt; DunGen &gt; Tile</em>). This component provides information about how DunGen should handle the tile. For now, the defaults are exactly what we need.</p>
  693. <p>Our tile GameObject now needs to be turned into a prefab. Drag the GameObject into a folder in the project window just like we did with the doorway.</p>
  694. <p>Before DunGen can use our room, we need to mark it as a Tile.</p>
  695. <ol>
  696. <li>Select the root of your room GameObject (e.g. "BasicRoom").</li>
  697. <li>Add the <code>Tile</code> component:<br />
  698. <code>Add Component &gt; DunGen &gt; Tile</code></li>
  699. </ol>
  700. <p>The default settings will work just fine for now.</p>
  701. <p>Now turn your room into a prefab by dragging it into a folder in the Project window—just like we did with the Doorway earlier.</p>
  702. <hr />
  703. <h2 id="setting-up-assets">Setting Up Assets</h2>
  704. <p>DunGen uses a few asset types to define how dungeons are generated:</p>
  705. <div class="grid cards">
  706. <ul>
  707. <li>
  708. <p><img Width="20" alt="Tile Set Icon" class="off-glb lg middle" src="../assets/images/asset-icons/tile-set.png" /> <strong>Tile Set</strong></p>
  709. <hr />
  710. <p>A collection of Tiles to choose from at random</p>
  711. </li>
  712. <li>
  713. <p><img Width="20" alt="Archetype Icon" class="off-glb lg middle" src="../assets/images/asset-icons/archetype.png" /> <strong>Archetype</strong></p>
  714. <hr />
  715. <p>A type or “biome” for a dungeon section</p>
  716. </li>
  717. <li>
  718. <p><img Width="20" alt="Dungeon Flow Icon" class="off-glb lg middle" src="../assets/images/asset-icons/dungeon-flow.png" /> <strong>Dungeon Flow</strong></p>
  719. <hr />
  720. <p>The master graph that controls structure and progression</p>
  721. </li>
  722. </ul>
  723. </div>
  724. <p>Let’s create each of these now.</p>
  725. <hr />
  726. <h3 id="tile-set"><img Width="20" alt="Tile Set Icon" class="off-glb lg middle" src="../assets/images/asset-icons/tile-set.png" /> Tile Set</h3>
  727. <p>Right-click in your Project window and choose:<br />
  728. <code>Create &gt; DunGen &gt; Tile Set</code></p>
  729. <p>This asset holds the list of prefab Tiles DunGen can randomly choose from.</p>
  730. <p><img align="right" alt="Simple Tile Set Setup" src="../assets/images/getting-started/simple-tile-set.png" width="300" /></p>
  731. <p>We just need to assign our tile prefab to the newly created tile set. With the Tile Set selected:</p>
  732. <ul>
  733. <li>Click <strong>Add New Tile</strong>, or</li>
  734. <li>Drag your Tile prefab directly onto the button</li>
  735. </ul>
  736. <div style="clear: both;"></div>
  737. <hr />
  738. <h3 id="archetype"><img Width="20" alt="Archetype Icon" class="off-glb lg middle" src="../assets/images/asset-icons/archetype.png" /> Archetype</h3>
  739. <p>An <code>Archetype</code> represents a segment of the dungeon path that allows us to have distinct sections. We could use these to create biomes (e.g. castle, graveyard), but we'll only need the one for this tutorial.</p>
  740. <p><img align="left" alt="Simple Tile Set Setup" src="../assets/images/getting-started/simple-archetype.png" width="300" /></p>
  741. <p>With the Archetype asset selected:</p>
  742. <ul>
  743. <li>Click <strong>Add New</strong> under the <strong>Tile Sets</strong> section, or</li>
  744. <li>Drag your Tile Set onto the button</li>
  745. </ul>
  746. <div style="clear: both;"></div>
  747. <hr />
  748. <h2 id="dungeon-flow"><img Width="20" alt="Archetype Icon" class="off-glb lg middle" src="../assets/images/asset-icons/dungeon-flow.png" /> Dungeon Flow</h2>
  749. <p>We have one final asset to create: the Dungeon Flow that ties everything together.</p>
  750. <p>Right-click in the project window once again and select:
  751. <code>Create &gt; DunGen &gt; Dungeon Flow</code></p>
  752. <p>This asset has a lot of options, but for now we're only concerned with the flow graph. With the dungeon flow asset selected, click on the <strong>Open Flow Editor</strong> button in the inspector and you will be greeted with the basic default graph containing just a <strong>Start</strong> and a <strong>Goal</strong> node, with a single line connecting them.</p>
  753. <figure>
  754. <p><img alt="Default Dungeon Flow Graph" src="../assets/images/getting-started/default-flow-graph.png" /></p>
  755. <figcaption>
  756. <p>The default dungeon flow graph</p>
  757. </figcaption>
  758. </figure>
  759. <hr />
  760. <h2 id="understanding-the-flow-graph">Understanding the Flow Graph</h2>
  761. <h3 id="nodes">Nodes</h3>
  762. <p>Nodes (such as <strong>Start</strong> and <strong>Goal</strong>) on the graph represent a <strong>single tile</strong>. Click on one of the nodes to edit it in the inspector. For now, we'll just add our only tile set to the list for both the <strong>Start</strong> and <strong>Goal</strong> nodes.</p>
  763. <p>Later, we might decide we want a specific tile at the beginning and/or end of the dungeon. This would be the place to do that. In future tutorials, we'll also look into adding additional nodes, allowing us to place specific rooms such as boss rooms that need to appear at certain points along the main path.</p>
  764. <hr />
  765. <h3 id="lines">Lines</h3>
  766. <p>Between the nodes is a single line and clicking on it reveals a simple list of archetypes in the inspector. As before, we'll assign our single archetype asset to this list. DunGen will make a path of random tiles between the two nodes connected by this line. In future tutorials, we'll split this line segment into multiple biomes.</p>
  767. <hr />
  768. <h3 id="dungeon-length">Dungeon Length</h3>
  769. <p><img align="left" alt="Dungeon Length" src="../assets/images/getting-started/dungeon-length.png" width="300" /></p>
  770. <p>The overall length of the dungeon is not determined by the graph, and is instead set inside the <code>Dungeon Flow</code> asset as a range of values.</p>
  771. <p>Based on these numbers (and taking into account any nodes in the graph), DunGen will automatically calculate how long the line segments in the flow graph should be.</p>
  772. <div style="clear: both;"></div>
  773. <hr />
  774. <h2 id="recap">Recap</h2>
  775. <p>You should now have three new assets in your project:</p>
  776. <ul>
  777. <li>A <strong>Tile Set</strong> with your room prefab</li>
  778. <li>An <strong>Archetype</strong> using that Tile Set</li>
  779. <li>A <strong>Dungeon Flow</strong> with a basic two-node graph</li>
  780. </ul>
  781. <figure>
  782. <p><img alt="All Assets Created" src="../assets/images/getting-started/all-assets-created.png" /></p>
  783. <figcaption>
  784. <p>All the assets we've created</p>
  785. </figcaption>
  786. </figure>
  787. <div class="admonition tip">
  788. <p class="admonition-title">Dungeon Validation</p>
  789. <p>To ensure we didn't make any mistakes along the way, we can validate the dungeon by selecting our <code>Dungeon Flow</code> asset and pressing the 'Validate Dungeon' button in the inspector. A message will appear in the console letting us know if any issues were detected.</p>
  790. <p>If you don't see the console window, go to <code>Window &gt; Panels &gt; Console</code> to open it.</p>
  791. </div>
  792. <p>All that remains is to generate the dungeon layout, which we'll be doing in the <a href="4-scene-setup.html">next section →</a></p>
  793. </article>
  794. </div>
  795. <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
  796. <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
  797. </div>
  798. <button type="button" class="md-top md-icon" data-md-component="top" hidden>
  799. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
  800. Back to top
  801. </button>
  802. </main>
  803. <footer class="md-footer">
  804. <nav class="md-footer__inner md-grid" aria-label="Footer" >
  805. <a href="2-doorways.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: 2. Doorways">
  806. <div class="md-footer__button md-icon">
  807. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
  808. </div>
  809. <div class="md-footer__title">
  810. <span class="md-footer__direction">
  811. Previous
  812. </span>
  813. <div class="md-ellipsis">
  814. 2. Doorways
  815. </div>
  816. </div>
  817. </a>
  818. <a href="4-scene-setup.html" class="md-footer__link md-footer__link--next" aria-label="Next: 4. Scene Setup &amp; First Generation">
  819. <div class="md-footer__title">
  820. <span class="md-footer__direction">
  821. Next
  822. </span>
  823. <div class="md-ellipsis">
  824. 4. Scene Setup & First Generation
  825. </div>
  826. </div>
  827. <div class="md-footer__button md-icon">
  828. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
  829. </div>
  830. </a>
  831. </nav>
  832. <div class="md-footer-meta md-typeset">
  833. <div class="md-footer-meta__inner md-grid">
  834. <div class="md-copyright">
  835. <div class="md-copyright__highlight">
  836. Copyright &copy; Aegon Games Ltd.
  837. </div>
  838. Made with
  839. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  840. Material for MkDocs
  841. </a>
  842. </div>
  843. </div>
  844. </div>
  845. </footer>
  846. </div>
  847. <div class="md-dialog" data-md-component="dialog">
  848. <div class="md-dialog__inner md-typeset"></div>
  849. </div>
  850. <script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "announce.dismiss", "header.autohide", "navigation.footer", "navigation.indexes", "navigation.top", "navigation.tracking"], "search": "../assets/javascripts/workers/search.f8cc74c7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
  851. <script src="../assets/javascripts/bundle.c8b220af.min.js"></script>
  852. </body>
  853. </html>