Jump to content


Photo

Procedural dungeon (crawler) generation (swift mazes)

swift mazes dungeon crawler

73 replies to this topic

#1 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 21 September 2012 - 04:53 PM

*
POPULAR

Since it already has been mentioned in the forums, I'd like to announce a small project of mine.

A few weeks ago I was playing Legend of Grimrock and it struck me that their level design is extremely simple and modular, and yet, the player can spend quite a lot of time in the game. And it looks pretty, too!

So I wondered if it wouldn't be possible to create a modern "Dungeon Crawler" (solve puzzles, fight monsters, collect loot, progress your character, upgrade your equipment) type of game inside the TDM engine. The engine already supports a lot of things one needs for this, and the overal structure and assets work, too. And with prefabs, one might get the level layout done quickly.

However, building a few test prefabs in DR is easy, but creating a full mission out of them is quite painful. Not only needs it a lot of planning, but you can also spend a lot of time "upgrading" things later on. For instance if you later want to add a grime decal to the walls, you have to revisit the entire map. Even worse is if you find out later that your block size must be bigger or smaller.

So the idea was born to create a sort of framework that can assemble missions from prefabs. Preferable while getting the description of the mission from a text file. So far, this has been a lot easier than I thought. Here is what I got working so far: Overview:

swift_overview.png

You can describe your mission in a (Unicode) text file. This contains overall options, different locations (each location can have its own ambient light, music,name, fog), and the connections between the locations. Each location can have multiple "floor levels", these are stacked on top of each other. The config file also specifies which symbol means "use this prefab". It is also possible to specify links (per location), which means you can say "this lever with the symbol A opens the door with the symbol D".

The framework reads the prefabs, and then positiones them in the map. It also glues all the locations together, adds location_info entities, a player start, an exit, and an objective to reach the exit. The resulting map is then enhanced with script objects (all nec. assets are bundled together), and automatically dmapped via TDM. Everything then is packaged together into a working .PK4 file. My demo map takes about 20 seconds, where 15 are dmap.

In addition to the "basic" stuff I also managed to get a few things working, like a pressure plate, portcullies, and also made some puzzles. Oh, and per location fog (fading from location to location). Different difficulty levels are also supported, one can specify "this prefab appears only on easy" etc.

You can find more info and screenshots and demo here: http://bloodgate.com/swift/ There is also a developer diary where I will be posting interesting entries from time to time.

Here is an DR shot of a sample level, consisting of small modular prefabs and one large (the large hall on the lower left):

blocks.jpg

The next steps will be to add more randomness (either static at map generation, or at runtime, so the map is slightly different each time you replay it). Also, while it is already possible to "overlay" prefabs (e.g. "for this location, look first here before falling back to the default"), it is not yet possible to "reskin" prefabs. This would be something which is impossible in DR (you cannot really reskin worldspawn brushes, unless you live with the fact that it is all manual :)

For now I'm quite excited!
  • Sotha, 7upMan, jaxa and 6 others like this
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#2 i30817

i30817

    Member

  • Member
  • PipPip
  • 447 posts

Posted 21 September 2012 - 04:59 PM

You using the Prim's algorithm for mazes?

It would be kind of neat to have a random maze also with random points of interrest and routes that were generated with the maze.

Routes would be hard though. Maybe after building the maze into 'tiles' create the routes by 'solving' the maze randomly a few times and decide weather to plonk a guard in the a connected route if there are no more than 3 (for instance) guards passing?

And maybe if a guard can see all of his 'patrol' route - it's too small, or too near a corner - place him in a chair (napping or drunk/nap anim would be nice).

Edited by i30817, 21 September 2012 - 05:04 PM.


#3 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 21 September 2012 - 05:21 PM

No, actually the "maze" is manually generated. Generating the config file programmatically (aka random maze generator) is a second step. For now I worry about taking the maze and creating a working mission from it :)

However, just for the fun of it I did use an online maze generator and turned it into a working PK4, took about 5 minutes (I had to edit their generated maze text, as every column was doubled to make it look better on screen):

http://www.delorie.c...zes/genmaze.cgi (generate as text, save, remove every second column, paste into config file):

Then you get something like that:

http://bloodgate.com...-08-18_maze.jpg

(Yes, it works, you need to walk for a few minutes to reach the exit :)

Here is a (somewhat older) config file that I used to generate the demo map. It contains quite a lot of things already, probably later this needs to be split into different files to make it easier to edit:

http://bloodgate.com/swift/pub/dod.cfg

The basic idea is that the human specifies the overall layout, but some of the details are randomized – cobweb here, a rubble there, today a door in this wall, tomorrow at this wall.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#4 SeriousToni

SeriousToni

    Beginner Contest 2012 Winner

  • Member
  • PipPipPipPip
  • 2204 posts

Posted 21 September 2012 - 05:43 PM

So that's why you play no FMs - you build many mazes instead!! :P
"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

#5 jaxa

jaxa

    Advanced Member

  • Member
  • PipPipPip
  • 1325 posts

Posted 21 September 2012 - 06:15 PM

Well this is amazing.

I could see this approach making a small city (albeit not as good as most hand crafted ones).

#6 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8986 posts

Posted 21 September 2012 - 09:41 PM

I like this a lot.

Beyond the Dungeon Crawler use case, this could also be a way to get more non-mappers to build with TDM.
After they've gotten their toes wet, some folks are likely to move up to Dark Radiant for some custom flourishes.

If I can add this to TDM's Moddb page as a side-project that would be a cool way to gather some traffic though it would
also be good to have your own Moddb profile for the Dungeon Crawler specific aspect.

I wonder if the Arx End of the Sun folks would be interested in adding this framework?
Dungeon Crawling is a closer kin to that project.

If you can get folks into making these dungeons you might even pickup new TDM art assets from folks who are into
that style of game rather than stealth.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#7 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5398 posts

Posted 22 September 2012 - 12:42 AM

Looks fun, Tels. Might be cool if you go in a Rogue-like direction, with simple stuff you pick up on your way,maybe even some RPG abilities, and each level in the dungeon levels up in difficulty, with maybe 5 levels to the climax... be kind of fun for a quick game. It's just you have to dmap everything in advance & can't keep it growing in-game, but that's ok. Gamers can just run it themselves and get a new map to play each time.
Posted Image

#8 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5641 posts

Posted 22 September 2012 - 12:53 AM

I wonder if it goes towards nethack and others with final death and no saves. "Retrieve the amulet of Zot from dungeon level 20-25." Starting a new game would generate all the floors for that unique game.

And it is not necessarily limited to dungeons: I'm pretty sure one could make outside or city modules/tiles as well, they just need somewhat larger tile size.

This is quite a cool idea.
Clipper
-The mapper's best friend.

#9 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 01:29 AM

While indeed my focus is adding a moderate mix of RPG elements later, right now I'm still struggling with some basic infrastructure work. Like:

* having "secret" areas that are counted when you enter them and display a statistic.
* Or random ambient sounds (creaking, dripping, wind howling), that are either at static, predetermined places, or occur just "in your head" randomly.
* water puzzles, spike traps etc.
* player lantern that runs out of oil and needs to be refilled (no point of being stuck in a dark hall if you can just turn the lamp on all the time :)
* [endless list here]

In the direction of regenerating the dungeon randomly, this is a lot harder than it sounds. You can generate any kind of maze easily, but it needs to be fun, interesting, and not some cookie-cutter type of repetition. For me the reason why LoG works, is that the basic level building blocks are generic, cookie-cutter type, but they are arranged in interesting pieces, and that later step is probably manual (and much harder to automate).

The idea of "nethack and rogue" is definitely there. But there is also the technical problem of map geometry havign to be dmapped - that alone prevents a lot of interesting "re-arrange the map at start" situations. Just building one big room and inserting everything as func-statics does not work, either, as it would kill performance.

But anyway, now that I have a working demo level (see website :), the next step will be some modest randomizations performed at map start.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#10 jaxa

jaxa

    Advanced Member

  • Member
  • PipPipPip
  • 1325 posts

Posted 22 September 2012 - 01:53 AM

I'd also compare it to Torchlight (haven't played II yet). The maps are randomly generated (much moreso than say, Diablo II), but contain themed elements, traps, puzzle elements, and particularly interesting use of the elevation.

And, nice diary.

Edited by jaxa, 22 September 2012 - 02:07 AM.


#11 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 04:54 AM

I'd also compare it to Torchlight (haven't played II yet). The maps are randomly generated (much moreso than say, Diablo II), but contain themed elements, traps, puzzle elements, and particularly interesting use of the elevation.


Didn't know there is a Torchlight game, is it related to the television series?

And, nice diary.


Thanx :) There is a new diary entry up, detailing how per-location fog works.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#12 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 06:25 AM

If I can add this to TDM's Moddb page as a side-project that would be a cool way to gather some traffic though it would
also be good to have your own Moddb profile for the Dungeon Crawler specific aspect.


I'd think its better on is own page, but apart form never having done this, I don't have a good name for it yet :) Swift Mazes is just the generator, not the final product.

I wonder if the Arx End of the Sun folks would be interested in adding this framework?
Dungeon Crawling is a closer kin to that project.

If you can get folks into making these dungeons you might even pickup new TDM art assets from folks who are into
that style of game rather than stealth.


Yeah, do you have any contact to these guys?
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#13 i30817

i30817

    Member

  • Member
  • PipPip
  • 447 posts

Posted 22 September 2012 - 06:33 AM

You can try to make a underwater 'elevation' to shake it up. It's a bit hard to make sure that the player can 'solve' the maze then though.

Level up stairs, rope arrow zones, and pits would be nice too... Even better if there is no actual zone transition but just a portal (because using rope arrows would be consistent, though i guess it can be faked by placing one on the levels 'descending').

I don't know how you can do typical increase in difficulty with pure stealth. BTW, i'd love if you or TDM stole/tweaked the arx fatalis magic system - it's even open source...
The runes would be great 'highlevel treasure' in such a system, though they have the problem of being combinatory unlike the books system in nethack derivatives (in a combinatory system at first finding a rune is bloody useless unless it can already do something very weak - arx fatalis doesn't - and by midway you're probably casting everything you will since the late game spells tend to be complex to cast for taking many runes. BTW, if you do add a spell system, please please don't add fireballs or other wide radius spells.

Edited by i30817, 22 September 2012 - 06:47 AM.


#14 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 07:01 AM

You can try to make a underwater 'elevation' to shake it up. It's a bit hard to make sure that the player can 'solve' the maze then though.
Level up stairs, rope arrow zones, and pits would be nice too... Even better if there is no actual zone transition but just a portal (because using rope arrows would be consistent, though i guess it can be faked by placing one on the levels 'descending').


I am not sure what you are getting at here, tho? Are you talking about making "multiple levels"? That would probably better if you have different maps, where each "game level" is one map. In LoG it works that way, you go down some stairs and are in the next level. There is a loading transition, but you can always go back.

I don't thinkone could implement "5 levels in one map", tho, as this might reach the memory and entities limits.

I don't know how you can do typical increase in difficulty with pure stealth. BTW, i'd love if you or TDM stole/tweaked the arx fatalis magic system - it's even open source...
The runes would be great 'highlevel treasure' in such a system, though they have the problem of being combinatory unlike the books system in nethack derivatives (in a combinatory system at first finding a rune is bloody useless unless it can already do something very weak - arx fatalis doesn't - and by midway you're probably casting everything you will since the late game spells tend to be complex to cast for taking many runes. BTW, if you do add a spell system, please please don't add fireballs or other wide radius spells.


I have not decided yet if I can implement spells. It depends on how much resources it eats, how to make it work properly, still be fun and not cumbersome etc. Adding physics puzzles comes first :)
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#15 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1588 posts

Posted 22 September 2012 - 07:18 AM

As I said before in conversation with Tels, I think this project definitely has a lot of potential in terms of gameplay - I'm not a fan of dungeon crawlers, never been, because of how the old school ones were nothing but endless mazes filled with "statistics" fights and item/key hunts in my eyes; but if you can get this type of universe (traps and dangers inside a dungeon) and mix it with TDM's gameplay of AI with realistic senses, physical coherence (be it awereness to light levels, sounds and interaction with the (moveable) environment), combat system and player's abilities, and I can picture an interesting game where the puzzles and traps could be complemented by organic enemies (you can sneak past them or fight) and a responsive environment/architecture that you can actually interact with, climb, push, knock over, etc.

Thanx :) There is a new diary entry up, detailing how per-location fog works.


I'm VERY much interested in this feature, as well as the player light. With different fogs per location you make it possible to create smooth differences in places like a big room with abundant light (very thin fog), a normal, dark corridor (medium), or a pit or scary crypt that is pitch black (heavy), all the while keeping a gradual limit to how far the player can see (right now, impossible due to the way ambient lights work).

PS: The link to your demo is broken, it seems.

Edited by RPGista, 22 September 2012 - 07:20 AM.


#16 i30817

i30817

    Member

  • Member
  • PipPip
  • 447 posts

Posted 22 September 2012 - 07:19 AM

Yeah i'm talking about multiple maps. I thought of this because one of my favorite dungeon crawl game series (Realms of Arkania) used ropes so you could go up and down pits.

Realms of Arkania had a really neat hardcore survivalist aspect where most game objects had one or two uses (though it was mostly passive so bad things don't happen). It was not as ridiculous as Nethack (i suspect because of the saves), but much more nature agression focused than monsters - you are much more likely to get pneunomia and die from a river crossing than a strange disease from a fight

BTW RPGista, not all roguelikes are like that (all aleatory). Try Tome4 or liberal crime squad. One is very tradictional in that it's combat focused, but still quite filled with quests (and favors the nice approach of unlocking classes and abilities in-game). The other doesn't have quests per-se and it's definitely combat focused but it's very... thematic.

Posted Image

Edited by i30817, 22 September 2012 - 07:36 AM.

  • Tels likes this

#17 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 07:26 AM

Yeah i'm talking about multiple maps. I thought of this because one of my favorite dungeon crawl game series (Realms of Arkania) used ropes so you could go up and down pits.


Since the generated maps are 3D, there is really no reason why one "level" can't be 8km deep (engine limits nonwithstanding :)

The basic "you need to go to the next level" is here more a design choice, the "next level" could be "up", or "down", or "sideways" or "behind this door".

The demo map already contans a "pit", just try it :)
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#18 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 08:23 AM

PS: The link to your demo is broken, it seems.


Ooops. :blush: Restored the file. Note it's a slightly older version w/o the fog as the current version uses features from v1.09 and I first need to find a way to backport them via scripting to v1.07.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#19 jaxa

jaxa

    Advanced Member

  • Member
  • PipPipPip
  • 1325 posts

Posted 22 September 2012 - 01:08 PM

Didn't know there is a Torchlight game, is it related to the television series?


Torchlight was basically an indie game that copied a lot from Diablo 2 (included some ex-Blizzard on the team). Torchlight 2 was released 2 days ago and adds multiplayer elements, among other things.

It's on the current Humble Bundle: http://www.humblebundle.com/
http://en.wikipedia....wiki/Torchlight
http://www.torchlightgame.com/
http://www.torchlight2game.com/
Reddit AmA: http://www.reddit.co...omments/105md1/

As I said before in conversation with Tels, I think this project definitely has a lot of potential in terms of gameplay - I'm not a fan of dungeon crawlers, never been, because of how the old school ones were nothing but endless mazes filled with "statistics" fights and item/key hunts in my eyes;


I'd also check out Ancient Domains of Mystery (ADOM):

http://en.wikipedia....ains_of_Mystery
http://www.adom.de/

Looks like the creator latched onto the Kickstarter craze and is remaking the game this month. So this game has had on/off development for about 18 years.

Edited by jaxa, 22 September 2012 - 01:09 PM.


#20 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 22 September 2012 - 01:31 PM

I'd also check out Ancient Domains of Mystery (ADOM):

http://en.wikipedia....ains_of_Mystery
http://www.adom.de/

Looks like the creator latched onto the Kickstarter craze and is remaking the game this month. So this game has had on/off development for about 18 years.


Fantastic stuff. I fear I'd buy it Toprchlight, I'd never get out of playing anymore :)

Not sure about ADOM, tho, ASCII interfaces are not my thing.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#21 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1588 posts

Posted 22 September 2012 - 02:40 PM

Sorry guys, I actually never played any roguelike games (yeah I know, played a lot of real text-based rpgs though (books) ;) ), I was actually meaning games like Eye of the Beholder, or games "in which heroes navigate a labyrinthine environment, battling various monsters, and looting any treasure they may find" (wikipedia). They just are a tad too simplistic for me. It wasnt even the actual navigation, I loved Dragon Lore 2 and it was also "constrained, chunk by chunk movement", but with varied environments, npc interaction and strong story elements (btw, just took a look, the city is so old but still has some quite detailed architecture:)



The point I was trying to make is that even though the classical dungeon crawl experience is not my cup of tea, I still think this project has several points of interest, the gameplay I was talking about, the proccess of creating a basic map framework without even going inside DR and then taking it from there (possibly saving a good chunk of work depending on what kind of map you have in mind), and technical features like we are seeing already (player light, location-based fog densities, etc).

Edited by RPGista, 22 September 2012 - 02:49 PM.


#22 jaxa

jaxa

    Advanced Member

  • Member
  • PipPipPip
  • 1325 posts

Posted 22 September 2012 - 03:00 PM

I still think this project has several points of interest, the gameplay I was talking about, the proccess of creating a basic map framework without even going inside DR and then taking it from there (possibly saving a good chunk of work depending on what kind of map you have in mind), and technical features like we are seeing already (player light, location-based fog densities, etc).


More like, this project is the best thing since unsliced bread.

#23 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 September 2012 - 03:34 PM

More like, this project is the best thing since unsliced bread.


:D

Speaking of goodies, I spent all day trying to figure out how to emulate some features on older TDMs, or even finding out which version TDM you are actually running at. In the end I learned a LOT about scripting, and found a few working solutions for hard problems, and also learned more about object oriented scripting (which is great!) and the limits of D3 scripting (which is not so great...)

However, with all that (and the general TDM debugging I did today) I didn't manage to actually get anything backported to v1.07 or got any work on randomization done. BUT when testing I saw that the PK4 on bloodgate actually does not include torches in v1.07 - so the entire level is black. In v1.08 or current, it has torches... Whooops! That is not how it was meant to be.

I included a small fix in the PK4, so please redownload and try it again if you are testing with v1.07.

More on all that next weekend.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#24 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 29 September 2012 - 01:57 PM

I'm not dead yet :)

The last week I was busy finishing up some details. For a prototype, it is often enough to get a working proof-of-concept. However, for a stable software, things must be more robust.

For instance, as a first shot the included ambient light was placed where the player started and had a size of 2000 units. This is enough for small testmaps, but gives artefacts on real maps. So now the generator figures out how big the generated map is, where the closest non-empty block to the center is, then places the ambient light there, and then resizes it so it still covers the entire map - but not more. Phew!

A lot of work, but now it works. In the same line I have made parsing more robust, fixed some small problems, reducing debug output, and and and. I also started refining some of the prefabs and experimented with wall grimes.

Of course, there are some new exciting features :)

The first is "location shift". Each location can now have an offset associated with it. So you can f.i. make one or two "connector prefabs" and then move a location half a block up, down, right or even a combination of the two.

Here is an example:

[Location 0]
name=Entry level

[Connects]
1	   separator_stairs_east   2 on Location 1				 Leads up

[Level 0]
········
·┌─┐···
·│S1···
·└─┘···
········

[Location 1]
name=Loft
offset=0 0 36

[Connects]
2	   air			 1 on Location 0				 Back
3	   air			 4 on Location 2				 Exit

[Level 0]
·······
··───··
·2   3·
··───··
·······

[Location 2]
name=Exit

[Connects]
4	   separator_stairs_west   3 on Location 1				 to the loft

[Level 0]
········
·┌──┐···
·4  │···
·└┐X│···
··└·┘···
········

And the resulting map:

2012-09-29_loction_offset.jpg

You can see that the location in the middle is shifted up, even tho the map still consists of only the basic blocks (labeled with A, B, C and D are the prefabs in the image). That breaks free from the grid-size and makes for more interesting levels. Here two prefabs with steps are used to connect the locations together.

The nice thing is that inside the location you can use the same prefabs, which means you don't have to produce every prefab in two (or more) versions depending on wether you want to use them in a "normal" or a "shifted" location.


The second feature is reskinning of worldspawn and func_statics. (Entities like moveables will be done via spawnarg support later). Basically, it lets you change the texture on everything inside a prefab in a specific location. So the sewer can get dirtier the lower you come, or the tunnels use sandstone instead of lime somewher e else.

This basically also lets you re-use the same prefab more often, adding varity without having to redo the work. And it is something that is impossible in DR - switching the texture on worldspawn or func_static is only possible with a lot of manual labour.

Here is the definition:

; change all textures on worldspawn brushes and patches in this location
all worldspawn: brick/grainy_blocks01=brick/even_small_blocks01
; change all textures on entity (func_static) brushes and patches in this location
all entities: brick/grainy_blocks01=brick/even_greyish01
; change all textures in the prefab ceiling_hole (regardless of worldspawn, or entity)
ceiling_hole: brick/grainy_blocks01=brick/bricks_dirty_yellow
; change all worldspawn textures in this prefab only
empty worldspawn: brick/grainy_blocks01=brick/bricks_ind_grey

Here are two images that hopefully explain it :)

With the definitions used (it's an example, excuse the horrible mix of textures :)

2012-09-29_prefab_skins.jpg

Without the reskin section:

2012-09-29_prefab_noskins.jpg
  • nbohr1more and i30817 like this
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#25 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1588 posts

Posted 30 September 2012 - 07:21 AM

It is very interesting to see the modules starting to go full 3D on that perspective shot! Not only that but the prototype also shows a cool attempt of creating a "place" (the small steps, the altar and the light coming from above), which is beyond the proof of concept and goes directly to a practical use example. ;) I can see the maze getting "vertical" now, with the player moving down or up as he advances. I guess the next step would be to have floor over floor, like you suggested before?

Reskinning seems like a huge time saver, but I wonder if the stress of creating the system you described and using it (without being a programmer I mean) would be heavy? Would it be possible to load the prefab in an interface (like how we have now in DR), apply changes to the surface textures, and then save it in your modules set for use in the map? Of course, changing the whole module at once (or just the floor, or walls) can be done remotely by code and save you a lot of effort, but being able to load the prefab and change it by hand (aligning tough textures, changing their scale, all that manual work), and then save it and instantly use it in the map as a personalised set is also a reasonable way of doing it, I would think.

PS: I was taking a look at the page, I was wondering if it would be possible to translate your fog mechanics to any map, or is it done with particular code? I would be really interested in giving it a try, whenever it is available! :)



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users