Comments (2)
How to add corridors
When doing the BSP to create the rooms, build a kd-tree. Each node of the tree will contain all its child rooms.
We will guarantee that all rooms in a subtree are connected.
Proof
Leaves are connected because they contain only 1 room.
The partition one level up from leaves contains at most 2 rooms.
- If there are 2 rooms, connect them directly using a straight corridor
At each successive parent level, ensure that there is at least one corridor that connects rooms in adjacent child partitions. - in top/left partition, find all rooms closest to the bottom/right side
- in bottom/right partition, find all rooms closest to the top/left side
- for these 2 sets find rooms that are as close to adjacent in the vertical/horizontal direction. Depending on a "connected" parameter add between 1 and a maximum number of connections. In some cases, there may not be any rooms that are adjacent in the vertical/horizontal direction. In those cases, create a right-angled corridor based on room centers.
Add option to have extra hallway between partitions that allow connecting many rooms to that perpendicular hallway.
from bb4-simulations.
This simulator has been added. Support for multiple biomes is a future feature.
from bb4-simulations.
Related Issues (20)
- Simulations should start running immediately HOT 1
- Cave static/noise when moving ui controls HOT 2
- add auto-fit to LSystems
- in Fluid sim, have grid resize as the panel is resized HOT 1
- Reaction Diffusion, add drop list for different initial conditions HOT 1
- ReactionDiffusion reset does not completely reset HOT 2
- times table on circle (cardiod) simulation
- Add WaveFunctionCollapse simulator HOT 2
- WFC: slider for number of steps per frame HOT 1
- WFC: more robust HOT 1
- WFC: Overlapped not iterating HOT 1
- WFC: NPE for Flowers model HOT 1
- WFC: add concurrency and or backtracking
- WFC: scale overlapping image result
- WFC: Avoid inconsistency by allowing some inconsistent patterns with low probability HOT 1
- Use union-graph strategy to generate random dungeon HOT 2
- DungeonExplorer: organic generator strategy HOT 1
- Trebuchet enhancements
- In habitat sim, add tabbed panels for animal props in UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bb4-simulations.