Gary L. Simmons  rev 11/20/03  http://battlecatslitterbox.com/Forge/Chrisk/SwingingDoors.html
Litterbox  Forge Tips  Chris Komarnicki Tutorials


The Battle Cat's Litterbox


Forge Tips | Chris K Tutorials | Contrails | Moving Vehicles | Sliding Doors | Swinging Doors | Smashing Windows | Exploding Walls | Spaceship Landing | Flashlights | Laser Scope | Unique Terminals | Arches

Killing Time tutorials


Swinging Doors


These are not too different from the sliding doors in that they require a series of visible platforms and invisible trigger platforms. However, they are far less volatile, and much easier to create. The trick to getting this effect to work is to observe 2 things:

  1. Ensure that the door opens up at a good speed; not too quickly, or you'll miss it, but not too slowly, or the player might be able to run around the platforms and see how it's done.
  2. Take care not to create any "sticky" walls. Several smaller polygons are used to create this effect, which means there's gonna be a lot of concentrated polygon edges. Having two swinging doors on the same level, I found out, causes horrible problems with sticky walls...


Swinging door in Forge

Here's what the swinging door looks like in Forge. Remember that it can only be opened once, and from one side. The larger platforms are the visible ones, the first (closest to the left), is the only one controllable by players. These have essentially the same attributes as the sliding door platforms, so I won't delve into the integers.

Door broken down


A - The smaller platforms are very similar to the trigger platforms from the sliding doors. They must be condensed as closely as possible to the corner where all the vertices converge to remain invisible. Setting their speed will control the speed of the visible doors.
B - Notice how the outer vertices are dispersed. Having them converge too closely will cause sticky walls.

The final touchesThese are the final touches:

  1. Move the trigger platforms in towards the corner. Ensure that you don't cause any of the other polygons to become concave. (Don't move them until you've textured 'em! Trying to place a wall texture on a single-pixel-wide space can be almost impossible.)
  2. I've added a final touch here: a "split-poly" to create a shading effect. That's optional, of course... To do this, add a polygon along the outer edge of the room where you want the shadow to be. Make the floor and ceiling heights the same (at the height you want the shadow to come up to - in this case, 1 WU high). Now you can texture the wall with two different light intensities, or even 2 different textures altogether.


Heh, that was a bonus lesson...

I've created another swinging door in the next room. It moves slowly, and isn't contained behind a wall. This way you can see what's happening. In this version, all the platforms emit a sound. I've also textured the top of the trigger platforms with a more visible texture, for ease of viewing. They also haven't been moved in towards the corner.

To conclude this part of the tutorial, I'd like to say that swinging doors are significantly less glitchy than sliding doors, in my experience. However, they can easily cause sticky walls.

When I created the levels for the sliding doors, I found that I couldn't put two of them on the same level. I also found that I couldn't put one of each type of door on the same level. I THEN found that I couldn't put two swinging doors on the same level.

I think that part of the problem might be that I tried to put these polygon-intensive effects on a single, small map. Perhaps these problems wouldn't occur if the maps were larger. Anyway, for this tutorial, I used the same maps twice to save some time.

As with nearly all the effects I create, I maintain that there's probably better ways to go about doing them. I'm sure some mathematical wizard could come up with a way to have this door be closed from the other side once the door has been opened.

The next lesson is on smashing windows. This is probably the most complex of the four Forge effects I'll be covering in this tutorial. It requires modifications in the Physics and Shapes files.

With that said, I'll tack on my opinion that it is the most fun effect to see during gameplay.



Forge Tips | Chris K Tutorials | Contrails | Moving Vehicles | Sliding Doors | Swinging Doors | Smashing Windows | Exploding Walls | Spaceship Landing | Flashlights | Laser Scope | Unique Terminals | Arches

Top of page

Back to the Litterbox