amethyst / amethyst/rustrogueliketutorial

4.3: BSP is ... not a BSP?

Đang mở
#156 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
970
Fork
166
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

(Still) having an awesome time following along the tutorial, thank you so much for writing it!

Section 4.3 got me confused. For context: I've heard of BSP before, but never implemented one / looked at it very closely.

The first thing that confused me was that the "B" in BSP stands for "binary", but the algorithm in the tutorial seems to subdivide each region into 4 parts, so this would be more like ... quaternary? Given that confusion, I did some quick searching and read http://www.roguebasin.com/index.php?title=Basic_BSP_Dungeon_generation. Based on that, there seem to be (at least) two major differences between the algorithm in 4.3 and BSP as described on roguebasin:

* Dividing each region into 2 vs 4 subregions
* The roguebasin description uses the tree of regions to generate corridors: it connects sister regions. The algorithm in the tutorial "just" directly connects rooms in an almost-arbitrary order. One notable difference is that the roguebasin approach allows connections between corridors, not just rooms (effectively creating junctions in corridors), providing a slightly more organic feel.

I'm pretty new to procedural generation, so first, a question: do I just have a too-narrow idea of what BSP *is*? If not, it may be good to note how exactly the algorithm given deviates from "canonical" BSP. And second: I've directly implemented the roguebasin flavor of BSP at https://github.com/abesto/rktrl/blob/f923a14d1f00216f807768c43c402fa5e11d91b4/src/mapgen/bsp_dungeon.rs within the framework set up by the previous chapters. If useful, feel free to use / share.

![bsp](https://user-images.githubusercontent.com/59982/103484981-da97ce80-4dea-11eb-9a15-1cb40692d148.gif)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.