Skip to main content

Real dungeons.



Progress  as of this afternoon. Some areas are still not being linked. I'll have to take another look at the linking algorithm. There's also something funky going on with the tunneling algorithm. In some cases it seems to be going a few squares in the wrong direction before doubling back. I think I left out a stage in the old A* script that I used, I'll have to switch it with the more developed (but more complicated) one I was using for movement in the main game.

Anyway, today I want to talk a bit about dungeons.


What does a dungeon look like? I've chosen perhaps a rather strange style of dungeon, with small packed areas linked by winding corridors. You don't need me to show you a roguelike dungeon from times past but here it is anyway:


Long corridors and rooms. Nothing special. other roguelikes from more recent times have used different types of dungeon generation. Often a theme is to try to pack in more rooms in to the smallest space to get the most of your array. Empty space is often seen as a bad thing. Sometimes I've seen levels made up of only rooms, with doors linking directly to other doors. Maybe this plays really well as a roguelike dungeon. Maybe it makes things like pathfinding and AI more efficient.

Do real dungeons look like that? Surprisingly not.

What is a real dungeon? Well there are lots of reasons for building underground. The catacombs of Paris, the tomb of Tutankhamen, the underground bunkers of the cold war, storage and living areas below WWI fortifications. Each example is different and has a different layout but they share some key features. I've walked round several castle dungeons in the past, both here in Korea, Japan and back in England and each has its own design philosophy.

Here are some examples of underground structures:





You'll notice that they are usually built as a long rectangle rather than a square, and that the usual layout is long tunnels joining smallish rooms or groups of rooms. In fact a usual method of building an underground structure is to make a long tunnel, enlarge a section of it and then partition that section in to smaller rooms. It's easier to make a large room first and then put in dividing walls than to make several rooms in different parts of the tunnel because of the way tunnels are built. Also when people live underground they like to make areas for different functions, just like in a castle above ground. You really do have torture chambers, food storage areas, underground libraries and war rooms which are not just a single room, but a collection of rooms close together.

There are other reasons why I've designed my maps like this. If you look at traditional pencil and paper roleplaying maps they follow a similar layout, but not always for the same reasons.

For a dungeon master it's important to be able to control progression through the dungeon to allow them to follow a narrative. There will be points where the players can make a choice about where to go next, take the left or right turning for example, but they will be placed between narrative encounters. You can't have players running around opening every door in the place and having all the different monsters and NPCs come running out to find out what's happening.

Areas or levels of a large dungeon are also often set up so they will take a single gaming session to complete. You don't want to have to go home halfway through an encounter.

These are issues that affect my game too. I want the game to be in manageable chunks. You can clear out a section of the dungeon, check out the loot and then save the game and quit, all in a short time. Narrative areas are important too. In my project prefabs are the way I control narrative and create puzzles. Prefabs are set up to have an entrance and exit (sometimes the same place) and many have a puzzle element. For example you kill a boss and get the treasure. You find a room with a locked door, on the floor is a key, but it doesn't fit the door. Nearby you discover a hidden door to a room which has the real key. I need these prefabs to flow and changing the position of the door, or having a linking corridor cut through in to a room will disrupt a prefab and kill the puzzle.

There are other factors too. In this game you'll be controlling a party of adventurers, not just a solo hero. Formations and character placement are important, so a mix of different types of rooms and corridors is important to tactical considerations. A corridor is two characters wide, this means you can make a shield wall there. But you can't fire arrows or cast spells through another character, so corridors are not good locations for ranged combat unless you're ready to reposition your characters quickly.

There are many different ways of generating a dungeon, I have to choose one that works for my game, even though another might be more popular for other types of games. If it looks real or not, or if it looks good is not important, the important thing is if it is suited to the game play. Hopefully we'll find out about that sooner or later.

Comments

Post a Comment

Popular posts from this blog

Advice needed on tilesets...

I need some advice on which is the best way to handle building the dungeon. Right now I'm using prefabs for my dungeon, they have a north south east and west section for each "room": The basic tileset. This has several advantages, and also several disadvantages. Firstly I can have curved rooms, I can have tunnels and other interesting shapes. The tilesets can look quite nice with a little work. On the other hand I can't easily get the navigation data before building the map and once the map has been built I can't make changes to the layout, like having active pit traps or believable secret doors. Although the rooms are interesting, they are quite repetitive, and it takes a lot of effort to make even a few different variations. Also rooms are constrained to one size. A newer version of the tileset with a lot of variant parts for making more interesting rooms. To create a tile set is a real headache too. Planning how to lay out the UVs, trying to cra...

Upstairs / Downstairs.

I've decided to make my prefabs multilevel. Later this should allow me to add pit traps and other great stuff. It also makes it easier to line up stairs so that you can exit them on the same co-ordinates where you entered them. The prefab editor is pretty much finished, it just needs some code for loading up prefabs from a saved dictionary, so that they can be checked or edited. The entries will need to be forwards compatible, so I'll be loading each tile and then translating the indexes to a new array, that way if I add extra indexes or extra info (like traps or puzzles) I'll be able to update existing prefabs to work with the new standard. Click for a video.

Video Diary 8

Things are moving along well, there's been a lot of progress on the action manager side of things. Actions have finally moved to the UI, so you can initiate actions by clicking the appropriate button. I've set up some dummy actions to show what happens visually when actions are taken, but the actual dice rolls and such are yet to be integrated. The UI objects are also being added, though some are non functional or empty at the moment. Click on the image to see this week's development video. Every time I add something big I also add about a dozen small things. Like the selection box visualization. Previously this was using render.drawline, and old fashioned Blender function which can be impossible to see at certain resolutions, or at certain frequencies. I replaced it with a function that adds planes of the right size and scale in the right location. I also made all characters a little bigger. I still need to do some work with vectors and final target locations t...