Loading...
5
Game
Greg RPG
10 months ago

Using binary space partitioning to make my dungeon layout!


I needed to make a dungeon area for my game and didn't feel like making it by hand - enter procedural generation!

Binary space partitioning, if you read its Wikipedia page, is something super complicated and nerdy in actuality. What I've implemented should techically count as BSP, though!

My algorithm is basically:

  • have an array of rectangles (size one to begin with)

  • in that array, split each rectangle in 2 and add to a new array

  • run the operation again on that new array

And then I can build room objects and walls after I have all that data set up.

I keep all rooms above a certain size threshold so that they don't get too small.

My implementation seems pretty fast too! The decoration phase is the slowest part that I have any control over. Sadly, the built-in Godot tilemap functions are really slow.

Greg greg greg Greg Greg



0 comments

Loading...

Next up

Greg RPG version 0.9.0

Devlog 33: 12...18.08.2024

Devlog 24: 10.06....16.06.2024

Last week at LVL UP EXPO, we celebrated great games made by Jolters including Baldi's Basics Plus by @BasicallyGames !

Buy it on Game Jolt: https://gamejolt.com/games/baldis-basics-plus/481026

Thanks to Razer for providing the laptops and peripherals!

Summer

Last week at LVL UP EXPO, Game Jolt celebrated great games made by Jolters including The Wild at Heart by @moonlightkids !

Check out the game: https://gamejolt.com/games/the-wild-at-heart/500465

Thanks to Razer for providing the laptops and peripherals!

Last week at LVL UP EXPO, Game Jolt celebrated great games made by Jolters including Yellow Taxi Goes Vroom by @thoseawesomeguys !

Play the demo: https://gamejolt.com/games/yellowtaxigoesvroom/918960

Thanks to Razer for providing the laptops and peripherals!

We are under attack!

We made a lot of improvements on the Freezing Plains visual. Things like pine trees, tiny bushes, some rocks, and others game props!

#IndieGame | #IndieDev | #GameDev | #PixelArt | #WaifuQuest | #WifeQuest | #screenshotsaturday