3DMidTex tutorial

From Eternity Wiki
Revision as of 20:34, 5 January 2006 by SoM (talk | contribs)
Jump to: navigation, search

Eternity provides the possibility of using the middle textures of linedefs as solid objects that can be walked over or under, and can block map object passage. Monsters can walk across them, and they can even be moved (with the assistance of some linedef specials) to create lifts, doors, anything you like. They are quite useful and easy to implement.

This feature is called 3DMidTex, and this tutorial covers the basics of how to use it. Once you are finished with here, you may want to read 3DMidTex advanced topics to learn about the use of 3DMidTex lines with switces, doors, and lifts.


Your first 3D bridge

For the purposes of this tutorial, I'll assume you are familure with Doom editing and your level editor, and with the use of middle textures. You will need to use an editor that either A. has support for Eternity features (IE. DoomBuilder) or an editor that allows you to manually change the flags value for linedefs. I use DoomBuilder, you should too ;)

First, open up a new Doom2 level for editing, create a simple room with a pit running through it.

3dmidtex tut1.jpg

(I added cool, ultra-hurty lava to mine)

Now you need to create the structure the player will eventually be able to cross to get to safety. Again, I assume you know how to create two sided lines and put middle textures in them.

3dmidtex tut2.jpg

So if you run this map, the player obviously falls down through your middletexture bridge. So we perform the final step: setting the lindef flag. Now the flag is 1024 (0x400 in HEX) so if you are editing the flags yourself just add 1024 to your flag value, if you are using Doombuilder, and you don't see the lindef flag called "3dMidTex", press F2 and make sure you are editing your map as an Eternity map. Once your flags are set for your linedefs, run the map and the player should now be able to cross the bridge as if the middle textures were solid objects.

Some things to watch out for

Holes in your structures

Each structure needs to be closed enough to support the objects running over it. That is to say, the lines need to be close enough together so that an object can't slip through the gaps.

3dmidtex tut3.jpg


Clipping

It is importaint to note that clipping is determined by the front side offset and texture height, so if both sides of the 3DMidTex aren't aligned to be in the same spot or the textures are different heights, the solid part of the line will be where the front side texture is.

Also please note that the entire height of the texture is considered solid reguardless of the transparency of the texture. So the player can't pass through a 64x32 unit hole in a texture. This would have required too much processor power to accomplish.


Monsters crossing

Because of the way monster AI in doom works, it can be VERY trickey to get monsters to cross a 3d bridge. When a monster contacts a line in a map with a drop that's too far for it, the monster will not cross that line because the engine assumes there is nothing on the other side for the monster to step onto. Here are some tips to help you overcome this.

Note: this is obviously unfinished. Check back later.