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

Devlog 24: 10.06....16.06.2024

Summer

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

Greg RPG version 0.9.0

Lucky Tower Ultimate is a chaotic, comedy roguelite. Escape from an incredibly dangerous, randomly generated tower in a slapstick adventure that looks like a cartoon and feels like a joke. Slashy slashy! 

Wishlist the game now: https://bit.ly/LuckyTowerUltimate

#LuckyTowerUltimate is OUT NOW on Steam and Nintendo Switch! It's your turn to become the Chosen One and rid the land of Evelius’s tower for good! https://store.steampowered.com/app/1700270/Lucky_Tower_Ultimate/

Enemies can also suddenly spawn through Realm Rifts. These Rift Spawns are going to be stronger than the ones wandering around. TBD on the enemies... #screenshotsaturday #godstear #madewithunity

Today I was setting up the location of the first boss. His name is "Father" and he is the first of the Patagonians. His task is to guard the road to the House.🛡🗡 Bookmark pre-launch page🔖🔖🔖

https://www.kickstarter.com/projects/rdvindiegame/the-patagonian…

Finished a project I've been working on over the last few days!

Modeled and textured in Blender.

#3dart #lowpoly #npbr #fantasy #hut