Dungeon generation (BSP) part 1
Hey folks!
As I'm learning new data-structures, I've decided to apply my knew knowledge to create randomly generated dungeons. This time I'm planning to use binary space partitioning. There are huge advantages of this method over my previous algorithms, since tree data structure will allow me to manage level generation process (f.e. start/finish positions, switches/keys, closed doors, etc) more easily. The basic idea is quite simple: I recursively divide the surface available for dungeon generation and each iteration will divide the surface randomly either horizontally or vertically. Each new partition that we get as a result of such division is going to be used as a node in the tree data structure.
The main challenge for me is going to be writing such a data-structure in LiteC since Game Studio doesn't provide any data-structure libraries and only fundamental fixed-length arrays are available out of the box. I'd say it's quite close to coding in C, but with a wanky compiler.
Here are some great articles that inspired me:
https://eskerda.com/bsp-dungeon-generation
https://www.roguebasin.com/index.php/Basic_BSP_Dungeon_generation
In the next part, I'm going to be handling the room placement in the each leaf of our binary tree data structure.
Best regards!
gamedev
programming
devlog
conitec
acknex 8
litec
dungeon
generation
algorithm
binary tree