Loading...
5
Game
Greg RPG
9 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

Devlog 33: 12...18.08.2024

Summer

Greg RPG version 0.9.0

Inayah - Life After Gods is OUT NOW on Steam!

Celebrate the game's release by completing our quests!

You can play the demo or get the full game at https://bit.ly/steaminayah

Devlog 24: 10.06....16.06.2024

Great news! 📢 @Aya_Games has joined Game Jolt!

They're the indie studio behind the haunting & atmospheric horror platformer Ayasa: Shadows of Silence.

Follow the development of Ayasa: Shadows of Silence at https://bit.ly/AYASAGAME

@MewMarissa is a Jolter to Watch and and a game developer who takes pride in attention to detail and producing quality work! Follow @MewMarissa before the quest ends on April 8 and you'll get Coins!

Shoobies leave a sticky trail of mucus in their wake, which can impede movement for any creature that steps in it.

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Auto-chess meets Clash Royale in an intense strategic battle. Outsmart your opponent, hide your play and crush their armies! Empire Builder just got another major update, check it out! https://gamejolt.com/games/EmpireBuilder/558901