Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Simple organic and brute force dungeon generation

Simple organic and brute force dungeon generation

19,887 4

Subscribe to our subreddit to get all the updates from the team!

Last month, I made a pretty simple dungeon generator algorithm. It's an organic brute force algorithm, in the sense that the rooms and corridors aren't carved into a grid and that it stops when an area doesn't fit in the graph.

Here's the algorithm :

  1. Start from the center (0, 0) in 2D
  2. Generate a room
  3. Choose a side to extend to
  4. Attach a corridor to that side
  5. If it doesn't fit, stop the generation
  6. Attach a room at the end of the corridor
  7. If it doesn't fit, stop the generation
  8. Repeat from steps 3 to 7 until enough rooms are generated

It allowed us to test out our pathfinding algorithm (A* & String pulling).

Here are some pictures of the output in 2D and 3D :





Recommended resources

3D Art

See full guide
3D Environment Design with Blender 5 cover
Editor pick

3D Environment Design with Blender 5

Amazon · Book

Based on Blender 5, this updated second edition simplifies the complexities by guiding you through clear, practical workflows to overcome those challenges. You’ll start by addressing common modeling and proportion mistakes, then move on to realistic texturing and unwrapping to create stunning scenes based on actual references.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

Low Poly 3D Modeling in Blender cover
Editor pick

Low Poly 3D Modeling in Blender

Amazon · Book

Step into the world of low poly 3D art with Low Poly 3D Modeling in Blender—your entry point into Blender and mastering the fundamentals of 3D art. This beginner-friendly guide ensures that you’re fully prepared for the creative adventure that follows. Through a step-by-step learning process starting with the principles of low poly art, this book gradually immerses you in the intricacies of modeling. As you progress, you’ll gain hands-on experience creating diverse projects ranging from designing a simple 3D crate to rendering complete low poly scenes. The book covers a wide spectrum of topics as you navigate Blender's interface, mastering essential modeling tools and exploring both basic and advanced modeling techniques. Advancing to the final chapters, you’ll find ways to breathe life into your models with material creation and gain practical insights into modeling a variety of low poly objects. From end-to-end scene construction to configuring Blender for rendering high-quality images, you’ll be equipped with the foundational skills to propel your career in 3D modeling and explore the boundless creative possibilities that Blender offers. By the end of this book, you'll have a solid understanding of Blender, 3D modeling, low poly methodologies, material design, 3D rendering techniques, and the broader world of 3D art.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

Discussion

Loading comments...