Game Development Community

Cave-like environmnet

by Josiah Wang · in Game Design and Creative Issues · 02/06/2005 (2:52 pm) · 8 replies

I'm trying to make a cave-like/tunnel environment for my game, but I don't know the best way to do this. The hard part about this is taht I want a rockish feel to it (like one of those mines you see in the cartoons), but I don't know how to approach it. I can either do it directly into the terrain, which would be a lot easier for the rock-like feel but have no covering on the top (which would totally defeat the meaning of a cave), or i can do it as a .dif so that i would have coverings, but I would lose the rocky feel.

The workarounds for doing it in terrain is to just have a dts/dif thingie hanging over it to make it look like it's fully covered, but I'm not too sure about that. The workaround for a diff might be textures (which frankly I'm not too fond of) and possibly using prefabs/dts to make the stray rocks...

which way would you do it?

PS: Oh yeah, does terrain/dif affect the AI Pathfinding? I'm planning to have flying bats....

#1
02/06/2005 (2:59 pm)
What POV is your game? Are you sure you want to show the top, might be better to just have that off the top of the screen andd use shadows to give an enclosed feeling. What's your light source in these caves?
#2
02/07/2005 (1:18 pm)
POV is going to be default 1st/3rd person switchable. I thought about doing htat as well, but since this is going to be a maze-like area that connects one side of a mountain to another, I was thinking that maybe might expose more of the maze than I want...the light source i'm going to implement by using my soon-to-be-purchased synapse lighting pack...
#3
02/07/2005 (7:13 pm)
@Josiah: I've heard of people using two terrain blocks with one inverted for the cave effect. Haven't tried it yet, so I can't vouch for it, though it's something you can probably test in a half hour or less to see if it works :)
#4
02/07/2005 (7:37 pm)
There is a either a resource/tutorial, or more probably a forum thread covering that technique somewhere around here. He went into some pretty good detail as to how to achieve it, but I can't find it at the moment.
#5
02/07/2005 (8:02 pm)
We need a HUGE cave. we've tried a couple of things with varying results..
cave interior skybox - here you gotta be mindfull of where you player can and can't go as to not dispel the suspention of disbelief. And you must have the whole mission take place in the cave..
Anoter way is a huge dts with normals flipped (so you dont see through it). The problem here is with texturing as dts don't (out of the box) tile textiures.
It wouldnt be hard however to derive a class that did..

edit:
about a 2-3% drop in fps..on a (middle of the road) gaming system - athlon 2ghz with FX5900


If your looking for smaller caves this may be just the thing:

Creating a DTS shell for your interior for use in the Torque Game Engine


The 2 terrain blocks sounds intersting..but again im pretty sure youd need to flip the normals here as well o(r as ted said invert it). But that would be pretty cool..you'd get detailmaps and emboss bump mapping.. i must explore this further..
#6
02/08/2005 (9:30 am)
Hehe, my own tut! Since then I've actually toyed with making my interiors as DTS objects and just having DIF collisions, but I haven't yet got the minerals to put it into action, haha ;)

That's actually not a bad idea, using that method, though you'll probably find yourself chopping up the cave into pieces, or using a set of "cave tiles" to do your tunnels and whatnot. The collision modelling for it in gameSpace/trueSpace can be in the same exact scene, so you know what you're working with. For using two or more apps to do this though, you might want to import a 3ds file into CShop or one of the other apps if they support it, then model your collision brushes over that, delete the 3ds file and export your .map file. About the same result.

Now for the terrain block method, you need to rotate your terrain so that it's upside down and then invert the bitmap used for the heightfield.
#7
02/10/2005 (2:25 pm)
Yah ted.. after reading your tuts and various threads on the subject were prototyping now alot of our areas that need to have an organic feel using dts with dif collisions.. It seems to be working very well. The "new" look is well worth a couple of FPS (at least so far) Our game is a 3rd person lever pulling button pusher..
#8
02/10/2005 (2:54 pm)
And another thing about using DTS with DIF collision is that you don't have to have the entire object covered in collision brushes. If your game doesn't allow for anyone to get up on the roof of your cathedral, then you only need to create collision brushes for the areas that they'll collide with, making it just slightly more economical.