Mazes O.o

Moderators: Game Designers, Programmers, Art Dept., GLOSS Team

Mazes O.o

New postby 1Samildanach » Tue, 16 Sep 2008 1:31 am

How hard would it be to implement a randomly generated maze dungeon? If it'd be too hard*, what about a pre-constructed (grab one of the many maze generators, get images, model, export) one? The wall/ceiling texture could be a repetitive one (rough-hewn rock?), and it wouldn't have to have any kind of up/down stuff.

*"Too hard" is anything which a coder considers challenging enough to take too much time from more important things.


My thinking is that this is something that, with some (random?) monster spawns could add to playability without being particularly complicated, since people would have something to explore with monsters to kill, and the biggest task for it's implementation would be assembly of the mazes (or maybe the texturing of them). There's plenty of things out there which generate 2d mazes, complex models would be unnecessary, and quite simple textures (or a single one, even) would be sufficient.

It's also something which would be easily extended, you'd only need to chuck more level on the top of the pile or add more spawn points (loot spawns, for example). All in all, assuming it's easy enough to implement, I think it'd be a worthwhile addition to any demo we release in the nearish future.
Now, we're not trying to indoctrinate you. Well, we are, but we're not succeeding.
— Peter Sagal, Wait, Wait, Don't Tell Me
User avatar
1Samildanach
 
Posts: 541
Joined: Fri, 29 Jun 2007 10:08 am
Location: Australia

New postby Brendan_ » Tue, 16 Sep 2008 2:11 am

This is more a level design issue than a coding one, except for if we code a maze generator ourselves (or modify an existing one).

The basic concept is solid. Daggerfall dungeons were mazes in the sense that you could easily get lost in one and the auto-map was next to useless most of the time.
So.... yeah.
User avatar
Brendan_
Project Leader
 
Posts: 2317
Joined: Thu, 26 Apr 2007 8:50 pm
Location: Afghanistan

New postby 1Samildanach » Tue, 16 Sep 2008 2:27 am

Brendan wrote:This is more a level design issue than a coding one, except for if we code a maze generator ourselves (or modify an existing one).

Well, I was posting here with the idea that some/much of the work could be automated. The work would be in getting everything to fit together and be textured, since there's loads of things which do 2d mazes (example).

It may seem a bit obvious to do Daggerfall style dungeons, but that isn't quite what I'm talking about. These would be simple 2d ones transferred into a 3d environment, with monsters in. Doors, skulls, and the like would hopefully be added (probably by hand), but a basic automagical maze generator would allow us to cheat a lot with some dungeon creation.

It's not quite proper random dungeon generation, but it could potentially work as a decent stand-in 'till something better gets implemented.
Now, we're not trying to indoctrinate you. Well, we are, but we're not succeeding.
— Peter Sagal, Wait, Wait, Don't Tell Me
User avatar
1Samildanach
 
Posts: 541
Joined: Fri, 29 Jun 2007 10:08 am
Location: Australia

New postby Archwyrm » Tue, 16 Sep 2008 5:34 am

Not much point in doing "2D" dungeons in a 3D game, IMHO. As a start, certainly, but that is only until you have the other bits working well. Considering how many games have had a random dungeons/mazes, it really should not be too hard. Just depends on whether we want to do it or not. IMHO, we should populate the landscape with things to kill/be killed by first.
:wq
User avatar
Archwyrm
Programmer
 
Posts: 1995
Joined: Fri, 23 May 2008 7:32 am
Location: Salt Lake City, UT

New postby 1Samildanach » Tue, 16 Sep 2008 6:13 am

They would, hopefully, be adapted to better utilise the third dimension (amongst other things), but I thought I'd keep things very simple to start with.

Meh, we probably should just be putting monsters on the landscape for the moment. 'Twas just an idea I didn't think out as well as I should have :sigh:.

Maybe I've just been playing SLASH'EM/Vulture's Claw a bit too much...
Now, we're not trying to indoctrinate you. Well, we are, but we're not succeeding.
— Peter Sagal, Wait, Wait, Don't Tell Me
User avatar
1Samildanach
 
Posts: 541
Joined: Fri, 29 Jun 2007 10:08 am
Location: Australia

New postby Brendan_ » Tue, 16 Sep 2008 4:09 pm

While I generally agree that a DF-style "mating squids" 3D maze is my first instinct, there are some valid points to be aware of.

Mostly, it's that the human mind isn't very well adapted to navigating a fully 3D environment; we are not dolphins. We're really more 2.5D navigators with a strong preference for right angles if denied wide open spaces. The third dimension isn't something we really travel as land-based animals. There's just the ground rising or falling-- not alot of bridges, balconies, or tunnels in nature.
Just look at buildings the world over and you'll see things, on the whole, tend to be made of perpendicular intersections and separated into discrete floors where everything is on the same level. IRL buildings are rarely laid out anything like DF dungeons with ramps, spirals, and stairs and mixes of single and multi-storie rooms all over the place.

I'm generally in favor of gameplay less dominated by mindless violence (if you'd ever seen me play an ES game, you'd realize how ironic this comment is, but...). Mazes, though a bit maddening, could be a spice in a more diverse concoction of gameplay for DungeonHack.
User avatar
Brendan_
Project Leader
 
Posts: 2317
Joined: Thu, 26 Apr 2007 8:50 pm
Location: Afghanistan

New postby zingbat » Wed, 17 Sep 2008 12:07 am

Not all Daggerfall dungeons were of the mating octopus type, only a few horrible ones. The other blocks were very pleasant to explore. I think we all remember the room with the pyramid that opens on top into a fighting pit; the sunken towers which are sometimes half immersed under water; the subterranean river with two crossing bridges and a treasure room on the corner; the throne room in privateers hold; the wine cellars; the caves with an underground river that leads to an hidden section; the rift; the prison cells; the stacked rooms connected by an elevator that ends in a submerged room; the sacrificial altar room. These were very fun to explore and it was easier to orient ourselfs inside these sections.

I had an idea to do dynamic dungeons with the Oblivion TESCS but it was so painful and slow to work with that editor that i have give up. I think it's possible to use the new Blender game engine to do this and i may give a try one of these days.

The idea was to use blocks (big sections of dungeons) just like in Daggerfall and then randomize it's layout by moving a few pieces inside each section and add stuff to marked positions.

This would happen in several phases.

1- Chose the location and theme of the dungeons. The location tells me what texture set to use. The theme is like in Daggerfall where dungeons are tagged as ruined fortress, manor, castles, harpy nests, witch covens, wizard laboratories, abandoned mines, natural caves. With the theme i would also choose how the dungeon would be habited or not, with wildlife, daedra worshipers, witches, harpies, mad wizards, a gang of thieves, ghost and wraiths, smugglers.

2- Decide the size (in sections) and layout of the dungeon and choose those sections from a list of sections compatible with 1. Create a random layout with the exact number of sections placed contiguous to each other and then link them together by adding passages to the marked exit locations.

3- Randomize the interior of each section by changing movable walls and randomly add furniture and decorations in marked positions using models compatible with 1.

4- Populate the dungeon by adding npcs to marked positions in a way compatible with 1.

5- Generate the name of the dungeon and a textual description of it. The information obtained from steps 1 to 4 would be used for this.

It's a bit more complex than this. Each section must have some info attached that will indicate how to layout a dungeon properly.

locations - location names this section can be used
themes - list of theme names this section can be used
type - a name or names indicating a type of section
level - the level number or range where this section can be used, 0 is ground level, -1 is bellow ground one level
compatible_* - types than can be attached to the * where * is left, right, front, back, top, down
exits_* - same as compatible_* but further describes the types of exits that can be used for each side

This info could be put in a text file with the same name as the 3D scene that represents the section.

But this is not all. It's also necessary to store info about placeholders. A placeholder represents a location (x,y,z) in relation to the section it belongs and enumerates the objects or classes of objects that can be spawned in the placeholder location. It would be necessary to have a list of placeholders associated to the section.

Ok but this is still not everything. We would not want to have a random layout where sections of the dungeon would be inaccessible or a dungeon that was populated with ten loony wizards all in the same spot.

The solution was to save several possible good layouts for each section (both for population and wall/exits configurations) and have the layout procedure pick one randomly. This was a way to ensure that i would always get a good layout.

Choosing the exits to use between each side of two adjacent sections is granted if we make sure that when we pick up these sections they share a exit type (info given by exits_* and compatible_* attributes). For example dungeon1 exits_left list must have some names from dungeon2 exits_right. One of these names would indicated the name of the mesh to use to link dungeon1 to dungeon2.

That was the idea i had for Oblivion TESCS dynamic dungeons. The algorithm is simple enough even to be scripted. The biggest trouble is in designing each section in a flexible way and add the extra info to a text file for each section.
zingbat
 
Posts: 341
Joined: Fri, 13 Apr 2007 3:52 pm


Return to Ogre Engine

Who is online

Users browsing this forum: No registered users and 0 guests

cron