From Algorithm to Playable Space: A Technical Note on BSP-Based Dungeon Design

Main Article Content

Jing Ming Yap
Nian Chein Woo
Bee Sian Tan
Kim Soon Chong

Abstract

Procedural content generation (PCG) is widely used in game development to enhance replayability and reduce manual design effort. This paper presents a practice-oriented case study of a procedural dungeon generator implemented in Unity, using Binary Space Partitioning (BSP) as the core algorithm. The generator exposes adjustable parameters through the Unity Inspector, enabling designers to control dungeon dimensions, room density, offsets, corridor width, and decorative elements without altering code. To ensure reliable connectivity, a depth-first search (DFS)-inspired method is applied to corridor generation, overcoming instability found in standard BSP approaches. Additional features, such as decorations, torches, shrines, and enemy placement, illustrate how the generator can be extended to enrich atmosphere and gameplay. Importantly, the system separates generation logic from gameplay logic by working with prefabs rather than embedded scripts, providing developers with flexibility to adapt the tool to their own mechanics and project requirements. Demonstrations show how small parameter adjustments, particularly in corner modifiers and offsets, produce distinct dungeon layouts, ranging from dense and compact to spacious and exploration-oriented. The generator has also been applied in tutorial-level and regular gameplay scenarios, highlighting its adaptability.  Overall, the system contributes as a practical prototyping tool for developers and an instructional resource for educators and students. By combining algorithmic clarity with implementation detail, it offers an accessible foundation for applying PCG in both development practice and teaching contexts

Article Details

How to Cite
Yap, J. M. ., Woo, N. C. ., Tan, B. S. ., & Chong, K. S. . (2025). From Algorithm to Playable Space: A Technical Note on BSP-Based Dungeon Design. International Journal of Creative Multimedia, 6(2), 287–308. https://doi.org/10.33093/ijcm.2025.6.2.16
Section
Articles