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

Summer

Devlog 33: 12...18.08.2024

Devlog 24: 10.06....16.06.2024

@NEOWIZ_QUEST 's NARRATIVE JAM has begun!

Create an original narrative / story game in 10 days for a chance to win cash! 

Join the game jam: https://bit.ly/GameDevCommunity

Start Narrative Jam-inspired quests: https://bit.ly/narrativejamquests

#gjbroadcast

Greg RPG version 0.9.0

@NEOWIZ_QUEST 's NARRATIVE JAM is underway!

Create an original narrative / story game in 10 days for a chance to win cash! 💸

Join the game jam: https://bit.ly/GameDevCommunity

Start Narrative Jam-inspired quests: https://bit.ly/narrativejamquests

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

Successful landing

#screenshotsaturday

Protege el conocimiento, salva la historia. Guardian of Lore es un platformer 2D en el que debes luchar para mantener viva la memoria de la mitología latinoamericana. El juego llegará a Steam el 18 de mayo: https://steam.pm/app/1211740 #ScreenshotSaturday

A Shiny Mega Gengar 🌟 For @ManutkArt 's #ThreeColorsChallenge!