# Knowledge Base - Kurt Kesler's 3-D Bridge (K²Bridge)

## Kurt Kesler's 3-D Bridge (K²Bridge)

Figure 1: K²Bridge in Action

Kurt is quite well known in the Doom community for his excellent work. While working with ZDoom Kurt discovered that he could make a true, over-under 3D bridge, or as I call it the K²Bridge, using sprites. Yes, we now have a true 3D bridge that you can stand under and over at the same time. Also, because the K²Bridge is sprite based, they are stackable as well. Of course, with a little imagination, this technique could be used for multi-story buildings and other structures. I want to thank Kurt for releasing this information to the public and allowing me to write the tutorial on it. To see the K²Bridge in action, be sure to get Kurt's bridge.wad.

The key to this technique is using a blocking player sprite. Why blocking? So the player can stand on it. In Hexen, interactive things were an integral part of the game. In some areas, you had to push a thing into place and then stand on it to get where you needed to go next. This behaviour has been carried over in ZDoom.

Figure 2 shows the thing setup in bridge.wad in WinTex. The sprite replacement is a simple square 128x64 and colored cyan (0, 255, 255) so that it is transparent in the map.

Once the sprite has been loaded into the wad, it is ready to be used in the map. Figure 3 shows the map setup of bridge.wad in WadAuthor.

Figure 3: WadAuthor Map Layout

The main sector has a floor of 0 and a ceiling of 384 units to comfortably hold the bridge. The two facing sectors for the bridge have a floor of 128. This will be the "height" of the K²Bridge. The K²Bridge "sectors" are not sectors at all but simply linedefs that reference sector 0 on both the front and back. They are used simply as placeholders for the step texture as illustrated in Figure 4.

Figure 4: K²Bridge Linedefs

The next step is to create the K²Bridge itself, using the modified sprite.

Figure 5: Sprite Setup in WadAuthor

Figure 5 shows the sprite placement dialog in WadWathor. The key here is the Z parameter. In ZDoom, things exist in three dimensions and can have Height associated with them as well as an x, y coordinate. By setting the sprite to a height of 256, this gives enough clearance for players and monsters to go under the K²Bridge as well as on top of it, as is illustrated in Figure 1.

That is all there is to the K²Bridge. One caveat though: you can shoot through the K²Bridge except with rockets, although you can shoot under or over with rockets just fine.

Marc Pullen sent along some additional info:

The cyan pic only needs to be 1 pixel. It's not incorrect to make it as big as Kurt did it (the 128x64), but since cyan is invisible, one pixel is fine, and wastes much less space.

You can also use DeHackEd to modify an existing thing, or DDF to code a new thing. You just need to make it blocking, unshootable, non-moving, but make it 1 high and 64 wide, even 128 wide.

The only problem is you cannot set the height for the creature to sit at. That's VERY cool that ZDOOM allows the Z placement of an object.

But the DeHackEd and DDF thing are essentially cut in half. You have to have a sector with a ledge, you place the invisible thing you walk on RIGHT on the edge. Half the radius is on the upper sector, and the other half provides a walking surface over the area that is walkable over and under.

There was another tutorial on the Legacy site here:

http://www.frag.com/doomlegacy/editwads.htm#3dbridge [The original page is long gone, but fortunately it still exists on the Wayback Machine]

This method isn't as good as ZDOOM's, but will work just the same. You have to be careful about where you put sectors for supports to allow the "bridge things" to sit on. So if you have a long bridge, you will have to have supports about every 64 or 128 units to allow the things to sit on to cover the open bridge space.

### Sources

This tutorial was based upon work by Kurt Kesler.
Additional information by Fanatic.

Back