...menustart
...menuend
Roguelike Dungeon Comparsion
Procedural Generation in Game Design Tanya X.Short and Tarn Adams
Game Programming Patterns Robert Nystrom
- tile
- block path = boolean
- block sight = boolean
- type = Sand , Dirt ?
bitmasking tiling : mathematically find out what every single tile is
- tunneling
- BSP , 和 tunneling 有点像,但是更好的 填充整个空间
- random walk 一整个cave
- cellular automata , beautiful cave
- room additon , cave + room
- city building , building + doors
- maze with rooms , complicated corridors
- Messy BSP , sort of mixing room addition and BSP, i'm not sure
- fill entire space with wall
- randomly try to dig a room
- if it intersects with other rooms , skip this room
- otherwise , place that room
- and now it need a tunnel to the other rooms (the previously added one)
- it always tunnel from its center.
- init whole room with wall
- start from center of room, set room center as floor
- choose a initial direction
- iteration for some steps
- 75% keep direction
- 25% change direction
- walk 1 step, set as floor
http://roguecentral.org/doryen/articles/bsp-dungeon-generation/
- We start with a rectangular dungeon filled with wall cells.
- We are going to split this dungeon recursively until each sub-dungeon has approximately the size of a room.
- The dungeon splitting uses this operation :
- choose a random direction : horizontal or vertical splitting
- choose a random position (x for vertical, y for horizontal)
- split the dungeon into two sub-dungeons ( to all existing rooms )
- When choosing the splitting position, we have to take care not to be too close to the dungeon border.
- for example, we would say all right for every room , choose a spot from 30% to 70% in percentage and make the cut there
- i.e. After 4 splitting iterations
- Now we create a room with random size in each leaf of the tree.
- To build corridors, we loop through all the leafs of the tree, connecting each leaf in bottom level of tree to its sister.
- If the two rooms have face-to-face walls, we can use a straight corridor.
- Else we have to use a Z shaped corridor.
Connecting the level 4 sub-dungeons
- Now we get up one level in the tree and repeat the process for the father sub-regions.
- Now, we can connect two sub-regions with a link either between two rooms, or a corridor and a room or two corridors.
Connecting the level 3 sub-dungeons
- We repeat the process until we have connected the first two sub-dungeons A and B :
https://indienova.com/indie-game-development/tile-based-line-of-sight-explained/