Idea for a new dungeon.
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

-
- Novice
- Posts: 10
- Joined: Thu Oct 19, 2006 2:57 am
- Location: Cleveland, Ohio, USA
- Contact:
Idea for a new dungeon.
I mess around with modding games here and there; I've done a lot with Super Metroid for the SNES, I've unsuccessfully played around with Diablo II's engine, and I've built a few crappy games in gamemaker, among a few other things. In hindsight, I think my poorest skill in game modding is probably level design. I either try to do one thing well and end up botching everything else, or I lose enthusiasm. Programming or debugging an engine is another thing altogether though. I don't lose interest quite as fast, possibly because it's more of a flexing of the problem solving muscle than of the art muscle.
Lately, a Linux-head friend of mine got me hooked on NetHack. I can't really explain what I love so much about it, but it's the same pleasure I got from Dungeon Master on my first playthrough, and then from Chaos Strikes Back, and then from Conflux III. You never know what's lurking behind that corner, you don't know what this item will do, etc.
All of that being said...
I think I've thought of a potential project. I love Dungeon Master, but I build poor dungeons. I like NetHack's UI enough to love the game, but I love Dungeon Master's UI so much more.
Here's my idea, what if I attempted to implement something much like Nethack or Rogue in Dungeon Master's UI? I think I wouldn't go for a complete conversion, but I'd try to preserve the feeling. The lack of saving, the danger from so many things, and the randomly generated dungeons are a must.
So, I have a few questions:
What engine do you think I should use? I might just go from scratch or edit the original DM. In the end, I'll probably go with whichever one has more documentation on, or flexibility within its engine.
How do randomly generated dungeons work, anyways? I remember seeing a ROMhack of Super Mario Brothers that randomly propagated tiles everywhere, and many of the levels end up being unbeatable. Are there a bunch of level segments that are pieced together by the game on demand, or something more sophisticated?
What are the engines I have to choose from programmed in? DM Java is Java I take it. The originals are probably in ASM. RTC is probably a compiled HLL type thing... Except for markup, all of my experience is in ASM. I've never had much reason to learn a HLL, but I could probably pick one up if I need to.
Any other things you may want to mention?
...and I wouldn't want to do a DM style frontend for NetHack.
Lately, a Linux-head friend of mine got me hooked on NetHack. I can't really explain what I love so much about it, but it's the same pleasure I got from Dungeon Master on my first playthrough, and then from Chaos Strikes Back, and then from Conflux III. You never know what's lurking behind that corner, you don't know what this item will do, etc.
All of that being said...
I think I've thought of a potential project. I love Dungeon Master, but I build poor dungeons. I like NetHack's UI enough to love the game, but I love Dungeon Master's UI so much more.
Here's my idea, what if I attempted to implement something much like Nethack or Rogue in Dungeon Master's UI? I think I wouldn't go for a complete conversion, but I'd try to preserve the feeling. The lack of saving, the danger from so many things, and the randomly generated dungeons are a must.
So, I have a few questions:
What engine do you think I should use? I might just go from scratch or edit the original DM. In the end, I'll probably go with whichever one has more documentation on, or flexibility within its engine.
How do randomly generated dungeons work, anyways? I remember seeing a ROMhack of Super Mario Brothers that randomly propagated tiles everywhere, and many of the levels end up being unbeatable. Are there a bunch of level segments that are pieced together by the game on demand, or something more sophisticated?
What are the engines I have to choose from programmed in? DM Java is Java I take it. The originals are probably in ASM. RTC is probably a compiled HLL type thing... Except for markup, all of my experience is in ASM. I've never had much reason to learn a HLL, but I could probably pick one up if I need to.
Any other things you may want to mention?
...and I wouldn't want to do a DM style frontend for NetHack.
yeah, well, to make a roguelike-DM-style game is even possible in CSBwin, if you`re tricky (I`m not talking about a randomly generated maze).
A roguelike must have:
- random dungeon,
- monsters randomly placed in a dungeon,
- items randomly spread through dungeon.
I guess you`d like the engine to generate random dungeon each time the game is started, right..?
Second and third thing is easily doable using DSAs. For example you`ve got a group of monsters selected to spread randomly trough level 1, tougher group of monsters for level 2, yet tougher for level 3, etc.
Items could be spread through certain places, but there can be a hundreds of the items to be spread at dozens of places.
These two things could be even done WITHOUT using DSAs, but then it`s all much harer.
You could set a probability that certain item can be found in the given level, say there`s 5% probability, that you can find Helm of Ra on level 2, but 15% that it`ll be somewhere on level 3. Same with the monsters.
What you`d have to do is to assign all the items to several cathegories to be spread through the level. For example 3 helms (of a random type) will be put somewhere in level 1, 6 helms on level 2, etc.
Things got harder with building a random dungeon; the engine itself cannot do that. However, I know that Paul made something like a "random maze builder" once (you could set few parameters on a 32x32 tiles maze and it would build a dungeon using these parameters). As far as I know it`s not yet implemented to CSBwin. I think there`s a similar feature in RTC.
-----------------------------------------------------------
There`s another thing that would require to be solved: pits and doors. Even if we have something like a "random maze builder" implemented to the engine, I doubt it could generate pits and doors properly: imagine that there was level 1 generated where you start at point A and you have to get to point B. A pit, put in the wrong place, could make the game unpassable (say, if placed in a corridor leading to the "exit"). Also, there`s a problem of pits leading to "dead ends"?
Same problem with doors and keys. If the RA key to open RA door apper in an impassable place, you won`t finish the level.
Placing randomly placed wall decorations wouldn`t be a problem here.
And, of course, each level has to use its own wallset
I`m not sure, but I think there was a discussion about those somewhere.
Oh, and as for the lack of savings: there`s no need. The saves might be disabled in the whole game but the few certain places randomly spread though the levels. Say 1 or 2 save points for the level.
A roguelike must have:
- random dungeon,
- monsters randomly placed in a dungeon,
- items randomly spread through dungeon.
I guess you`d like the engine to generate random dungeon each time the game is started, right..?
Second and third thing is easily doable using DSAs. For example you`ve got a group of monsters selected to spread randomly trough level 1, tougher group of monsters for level 2, yet tougher for level 3, etc.
Items could be spread through certain places, but there can be a hundreds of the items to be spread at dozens of places.
These two things could be even done WITHOUT using DSAs, but then it`s all much harer.
You could set a probability that certain item can be found in the given level, say there`s 5% probability, that you can find Helm of Ra on level 2, but 15% that it`ll be somewhere on level 3. Same with the monsters.
What you`d have to do is to assign all the items to several cathegories to be spread through the level. For example 3 helms (of a random type) will be put somewhere in level 1, 6 helms on level 2, etc.
Things got harder with building a random dungeon; the engine itself cannot do that. However, I know that Paul made something like a "random maze builder" once (you could set few parameters on a 32x32 tiles maze and it would build a dungeon using these parameters). As far as I know it`s not yet implemented to CSBwin. I think there`s a similar feature in RTC.
-----------------------------------------------------------
There`s another thing that would require to be solved: pits and doors. Even if we have something like a "random maze builder" implemented to the engine, I doubt it could generate pits and doors properly: imagine that there was level 1 generated where you start at point A and you have to get to point B. A pit, put in the wrong place, could make the game unpassable (say, if placed in a corridor leading to the "exit"). Also, there`s a problem of pits leading to "dead ends"?
Same problem with doors and keys. If the RA key to open RA door apper in an impassable place, you won`t finish the level.
Placing randomly placed wall decorations wouldn`t be a problem here.
And, of course, each level has to use its own wallset

I`m not sure, but I think there was a discussion about those somewhere.
Oh, and as for the lack of savings: there`s no need. The saves might be disabled in the whole game but the few certain places randomly spread though the levels. Say 1 or 2 save points for the level.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
oh, I forgot to mention about more complicated structures, like pads, switches and relays. When you press the wall switch, the wall at (23,17) opens. When a monster steps on a pressure pad at (3,12) there`s a 50% chance to open door leading to a treasure. That`s more complicated things that MUST be implemented by a human, not the engine. So the maze should be generated with the exception of the tricky structures implemented by the designer.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
- Gambit37
- Should eat more pies
- Posts: 13769
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
No he's not!ian_scho wrote:You're talking about Dungeon Hack
http://www.nethack.org/
http://www.bbc.co.uk/dna/h2g2/A2266805
- Paul Stevens
- CSBwin Guru
- Posts: 4322
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
If you don't want to stare at the Nethack source code to figure out how it generates its map, here's an explanation of how Captive does it. Joramund has tried a randomly generated dungon with DSB, which is probably the clone that is the most amenable right now to this type of mods.
You probably want to think carefully about what you want that dungeon to do, though. As Ian_scho said, what you are aiming for is basically Dungeon Hack, and it's not a very interesting game. But hey, Nethack bores me to tears, who am I to tell you what you should find interesting?
Bogged down as I am with my current custom dungeon, here's an idea that I'll probably never get around to implementing (this is for DSB, I don't think any other clone can pull it off right now.) Use a cutscene screen to display a large-scale map of the game world, with the current position of the party marked. Clicking on the map makes the party move towards the point clicked. You must keep track of the party's global coordinates, and you can even implement a passage of time system, (the tactical game will be frozen as long your are on that screen.) Some map coordinates can correspond to fixed locations, for which the maps are stored (cities, plot elements), while a stochastic system generates random encounters for the party. When the party either gets a random encounter or 'walks' to a special map point, it is teleported to the appropriate location and you exit the cutscreen to go to the tactical view, the usual dungeon view. When the party exits the tactical view you go back to the cutscene map.
The key challenge here, which I'm not sure even DSB can do, is being able to generate random tactical maps and populate them with monsters and items during the game. That's the crux of the random encounter system, but it's the only real technical question. Everything else I know for sure DSB can do. So yea, anyone who wants to take this idea and run with it, be my guest. At my current pace, my first custom dungeon won't be ready for another decade at the very least. But if nobody's interested in doing it first, look for an update on this custom dungeon, oh, sometime around 2050?
You probably want to think carefully about what you want that dungeon to do, though. As Ian_scho said, what you are aiming for is basically Dungeon Hack, and it's not a very interesting game. But hey, Nethack bores me to tears, who am I to tell you what you should find interesting?
Bogged down as I am with my current custom dungeon, here's an idea that I'll probably never get around to implementing (this is for DSB, I don't think any other clone can pull it off right now.) Use a cutscene screen to display a large-scale map of the game world, with the current position of the party marked. Clicking on the map makes the party move towards the point clicked. You must keep track of the party's global coordinates, and you can even implement a passage of time system, (the tactical game will be frozen as long your are on that screen.) Some map coordinates can correspond to fixed locations, for which the maps are stored (cities, plot elements), while a stochastic system generates random encounters for the party. When the party either gets a random encounter or 'walks' to a special map point, it is teleported to the appropriate location and you exit the cutscreen to go to the tactical view, the usual dungeon view. When the party exits the tactical view you go back to the cutscene map.
The key challenge here, which I'm not sure even DSB can do, is being able to generate random tactical maps and populate them with monsters and items during the game. That's the crux of the random encounter system, but it's the only real technical question. Everything else I know for sure DSB can do. So yea, anyone who wants to take this idea and run with it, be my guest. At my current pace, my first custom dungeon won't be ready for another decade at the very least. But if nobody's interested in doing it first, look for an update on this custom dungeon, oh, sometime around 2050?
-
- Novice
- Posts: 10
- Joined: Thu Oct 19, 2006 2:57 am
- Location: Cleveland, Ohio, USA
- Contact:
Dungeon Hack is indeed exremally boring and creepy.
Yes, I think that DSB (Dungeon Strikes Back, a Sophia`s new clone) is what you`re looking for to make a Dungeon Hack-based game in a DM style. It has the greatest flexibility of`em all (if you know Lua of course)
Yes, I think that DSB (Dungeon Strikes Back, a Sophia`s new clone) is what you`re looking for to make a Dungeon Hack-based game in a DM style. It has the greatest flexibility of`em all (if you know Lua of course)

Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
- Sophia
- Concise and Honest
- Posts: 4306
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Provided the encounters are "one-shot", that is, you don't need to go back to them, DSB can do it. You'd just create a blank level at compile time and then and use dsb_set_cell to set walls and dsb_spawn to fill the area with stuff whenever needed. DSB can't dynamically create levels, but it can certainly change them around to your needs while the game is in play.Parallax wrote:The key challenge here, which I'm not sure even DSB can do, is being able to generate random tactical maps and populate them with monsters and items during the game.
When the encounter is over, you could just scan through the area and destroy dead monster parts or whatever, and totally reconfigure the area every time a fresh encounter happens, so it'd look like a bunch of different random areas.
The downside is that if the party drops something important in one of these one-shot encounters, it'd vanish too, so you might have to do something about that...
Anyway, to answer the original question, DSB is capable of this too.

- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
Believe it or not, that's not the hard part. What's likely to take me the next 40 years (not ten, I said 2050) is all the custom graphics.Ian_Scho wrote:Wow man. Will wait around for you to finish in the next 10 years then.
Put an exvar on the essential items. When destroying the contents of a random encounter map, check every instance for that flag. If found, don't destroy the item, but place it in a "reserve" (limbo, for instance, or a special section of the dungeon.) When generating a new battlemap, have a small chance that an item from the reserve be placed on one of the monsters.Sophia wrote: The downside is that if the party drops something important in one of these one-shot encounters, it'd vanish too, so you might have to do something about that...
Well, since it's not a problem for DSB, let's up the ante. In my mind, that particular dungeon has a panoramic view, and hexagonal tiles, in the tactical map.

so it is/will be a tactical game then?
I don't quite get it, Parallax..
you have a screen like moonstone has
http://moonstone.classicgaming.gamespy. ... es/map.gif
and then enter a tactical map?
what do you mean by panoramic view- widescreen format???
perhaps you could tell a bit more about all the kinds
of maps you consider, if you like.
I thought the tactical map would be the world map, but
that is hardly dungeon master view...
thanks
I don't quite get it, Parallax..
you have a screen like moonstone has
http://moonstone.classicgaming.gamespy. ... es/map.gif
and then enter a tactical map?
what do you mean by panoramic view- widescreen format???
perhaps you could tell a bit more about all the kinds
of maps you consider, if you like.
I thought the tactical map would be the world map, but
that is hardly dungeon master view...
thanks
- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
By tactical, I mean the DM-style view, where you can interact with the decor, kill monsters, manipulate inventory, etc... The screenshot you posted is a good representation of what the "strategic" map (as opposed to "tactical"), or the "world" map in the cutscene might look like. DSB automatically freezes the main game (the "tactical" map) when you go into one of these screens, but that doesn't mean you are restricted to a static screen. Someone (Remy, I think) made a pong game in a screen like this, for instance.
What I have in mind is to give the party an extra set of coordinates, that corresponds to their geographical position on the world map. These coordinates are marked on the world map, say with a red dot. When you click on the world map, the red dot moves until it one of three things happen:
1) The program determines that a random encounter should occur.
2) The red dot gets within a set distance (very close) of a special map location such as a town or a dungeon.
3) The red dot reaches the point you clicked.
If 1) happens, a dungeon level is generated to serve as the battle map, complete with monsters and loot, then the party (the real one, not the red dot) gets teleported to the center of that map, and the cutscene exits. This results in the usual DM game, on a randomly generated map, with the extra tidbit that, if the party steps all the way to the edge of the map the cutscene kicks in again, and you go back to the world map, the encounter is over.
If 2) happens then the party is teleported to a pre-defined tile of a pre-defined level, and the cutscene exits. Towns and dungeons are statically defined, generated at compile time. These are the places where the plot-related stuff happens. There should be at least one tile here that triggers the world map cutscene, and stepping on it allows the party to travel from this location to a different one.
If 3) happens, then you just wait in the cutscene for the player to click somewhere else. Some routines get executed every frame, so that's how you update the red dot's coordinates when the party travels, and lower the food/water gauges, and also measure the passing of time if you wish to have a day/night cycle (or even a seasonal one
!) You may establish a correspondance between dungeon ticks on the tactical map and the global passing of time, so that you take the time the party spends in tactical maps (including sleep) into account on a global scale. It's slightly involved but not too bad.
Basically, the idea is that each fixed location on the world map is a set of levels that are not connected to one another. In order to move from one set to the other you have to go through the world map (or be teleported directly, in which case the teleporter has to update the red dot coordinates as well.) The random encounter map is a special dungeon level that gets remade every time there is a random encounter.
In the end, it's mostly DM but with extra bells and whistles.
As for the panoramic view, I meant the dungeon view, where you see the walls, and items, and monsters. I think it would look better in exteriors if it were wider. Maybe twice as wide as it is high, so that the field of view can be expanded a bit. Which means rewriting the renderer so, while I am at it, hexagonal instead of square tiles would make exteriors (and natural caves) look more genuine. But then, of course, it makes the flight of projectiles slightly more complicated, and completely changes the structure of everything since a tile now has seven sub-tiles, so seven party (and monster) positions (good luck with the size 2 monsters like the worms!
) etc... Mostly it prevents Sophia from getting bored. 
What I have in mind is to give the party an extra set of coordinates, that corresponds to their geographical position on the world map. These coordinates are marked on the world map, say with a red dot. When you click on the world map, the red dot moves until it one of three things happen:
1) The program determines that a random encounter should occur.
2) The red dot gets within a set distance (very close) of a special map location such as a town or a dungeon.
3) The red dot reaches the point you clicked.
If 1) happens, a dungeon level is generated to serve as the battle map, complete with monsters and loot, then the party (the real one, not the red dot) gets teleported to the center of that map, and the cutscene exits. This results in the usual DM game, on a randomly generated map, with the extra tidbit that, if the party steps all the way to the edge of the map the cutscene kicks in again, and you go back to the world map, the encounter is over.
If 2) happens then the party is teleported to a pre-defined tile of a pre-defined level, and the cutscene exits. Towns and dungeons are statically defined, generated at compile time. These are the places where the plot-related stuff happens. There should be at least one tile here that triggers the world map cutscene, and stepping on it allows the party to travel from this location to a different one.
If 3) happens, then you just wait in the cutscene for the player to click somewhere else. Some routines get executed every frame, so that's how you update the red dot's coordinates when the party travels, and lower the food/water gauges, and also measure the passing of time if you wish to have a day/night cycle (or even a seasonal one

Basically, the idea is that each fixed location on the world map is a set of levels that are not connected to one another. In order to move from one set to the other you have to go through the world map (or be teleported directly, in which case the teleporter has to update the red dot coordinates as well.) The random encounter map is a special dungeon level that gets remade every time there is a random encounter.
In the end, it's mostly DM but with extra bells and whistles.
As for the panoramic view, I meant the dungeon view, where you see the walls, and items, and monsters. I think it would look better in exteriors if it were wider. Maybe twice as wide as it is high, so that the field of view can be expanded a bit. Which means rewriting the renderer so, while I am at it, hexagonal instead of square tiles would make exteriors (and natural caves) look more genuine. But then, of course, it makes the flight of projectiles slightly more complicated, and completely changes the structure of everything since a tile now has seven sub-tiles, so seven party (and monster) positions (good luck with the size 2 monsters like the worms!

