• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Lith

Dungeon Generation Problems

4 posts in this topic

Hello.

I am working on a [i]simple[/i] method of generating dungeons for my game. So far, I have a system that will generate rooms in random places of random sizes but I need a way to connect them to eachother with corridors.

I read that the way in which I connect the rooms and make corridors will give the feeling of the dungeon, so I don't think that using a pathfinding algorithm that connects the midpoints of all the rooms would be very interesting. There is also the problem of making sure every place is reachable.

Can someone suggest how I could connect the rooms?
0

Share this post


Link to post
Share on other sites
I remember reading a few ideas about this [url="http://pcg.wikidot.com/pcg-algorithm:dungeon-generation"]here[/url]. Give it a try.
1

Share this post


Link to post
Share on other sites
Your dungeon generator needs to consider a number of factors.

I'd first by saying I'd consider having a tiled type map/grid where I give the generator 1000x1000 blocks to work with. Each room can consume a specific minimum/maximum number of blocks in my grid. Each room generated has both an entry point and an exit point that the generator uses to connect them after rendering the location and size of the room. The generator uses the grid to place the rooms somewhat adjacent to one another and after you know it's placement, the generator would use smaller blocks to create corridors between the rooms.

Another idea would be that your dungeons aren't randomly generated but part of the designer developed map. What actually becomes random would be the creatures that you want to have spawn in your dungeon as your players move through them. Another variety is you use a variety of static maps you design and with the use of "teleporters", the dungeon spawner determines which of the static maps are chained together and in what order and your players traverse the dungeon this fashion.

A few good examples of the later exist in the latest World of Warcraft model which adds some variety to the same dungeon while keeping it somewhat familiar and consist to the player when they return back to that dungeon.

Both all models would work well depending upon your intent.
Good luck!
0

Share this post


Link to post
Share on other sites
Probably the simplest I can think of that produces good results (depending on your needs, that is) is using a binary space partition tree, like what is described here: [url="http://roguebasin.roguelikedevelopment.org/index.php/Basic_BSP_Dungeon_generation"]http://roguebasin.roguelikedevelopment.org/index.php/Basic_BSP_Dungeon_generation[/url]. It guarantees connectivity, and also allows a simple way to designate separate areas of the map for containing, for example, entrances and exits. You can also look through the other articles on that site for other ideas.

However, I must say that having experimented with all of this before, getting truly random dungeons while maintaining good results (variety, consideration of other gameplay elements, etc.) can get very complicated very quickly.
2

Share this post


Link to post
Share on other sites
I would really use a path finding system to connect the rooms. You could "force" it to travel a certain direction before it changes so you won't get very "wiggly" corridors. Just give your rooms numbers and once you connect a room scrap the number from the list. You could also start with 1 room then a corridor add another room and corridor and loop. With this way you will get a linear dungeon or if you make multiple corridors from a single room you end up with a lot of dead ends, this could be fixed with some extra logic though. While defining your rooms you could add a doorway to use for the pathfinder. Also keep in mind to leave tiles in between rooms for corridors and walls.

for natural caverns you could use somekind of brush that travels the map and paints the dungeon. I used a rectangle that represented tiles, make a random length for it to travel then check if there is room for it and travel that length while you adjust the width of the rectangle and "paint" each step. Make it so it sometimes overlaps already painted sections and when it gets close to the edge of the map it should prefer a opposite direction a couple of steps. This could end up in really long narrow caves with larger open area's.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0