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

Greg RPG version 0.9.0

Devlog 24: 10.06....16.06.2024

@pm-studios ' Bandit Trap has an open beta RIGHT NOW! It's open until 3 am ET on Nov 30th.

Quests celebrating the beta have entered your quest log.

Play the game for FREE: https://bit.ly/BanditTrapSteam

Summer

πŸ†Meet the winners of the Narrative Jam presented by Game Jolt and @NEOWIZ_QUEST ! Where every story finds its voice!

πŸ₯‰βœ¨ I won 3rd place in the Narrative Jam! ✨πŸ₯‰

My game Luna Magica made it into the winners of the Game Jolt + NEOWIZ jam Γ’wΓ“ They really loved the worldbuilding and the dark magical-girl vibe, πŸŒ™

Thank you so much to everyone who played it! #GameDev #JotaDev

Just as Pecaminosa's musicians #improvise this rendition of #LittleSunflower 🌻, so do we improvise with this post you're reading. πŸ˜‚

What's coming out of your own improvs? πŸ€”

#Pecaminosa | #IndieDev | #OST | #Jazz

"Thanks guys for endless hours of fun." πŸ‘

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

What do you think guys in my robot?Just a beginner in 3d modeling..

My instagram https://www.instagram.com/rojhonbb/