Edge portals

From Eternity Wiki
Jump to navigationJump to search

Edge portals are portals placed on linedef top or bottom edges, replacing the upper or lower textures. Whereas the line or wall portals replace the middle part of a linedef (normally occupied by a middle texture), these edge portals replace one of the other parts.

They are supported under UDMF, and under the Doom format by using ExtraData. They are set using the UDMF upperportal and lowerportal boolean linedef properties, and under ExtraData by using the UPPERPORTAL and LOWERPORTAL linedef extflags.

Usage and requirements[edit]

Edge portals simply copy the back side sector surface portal into the front side corresponding edge. So the back side floor portal will be copied into the front side lower edge, and similarly can be done for the ceiling. Currently you can't make the edge portal different from the back side sector portal. It's also limited to appear on front side's edge, not the back side.


Currently edge portals must delimit orthogonal/rectangular areas. Otherwise rendering errors will occur. So to avoid any surprise, all edge portal lines must be horizontal or vertical, and the sector portal covered by them must be convex on the edges.

Currently you can't have edge portal - edge portal connections. Only edge - wall portal links are possible.

Edge linked portals[edit]

The main motivation for these portals is that they can be used to delimit sector linked portals to local areas within larger rooms. Until now, a sector floor or ceiling portal needed to extend horizontally by the entire room, and this would have adverse effects on the level design. Any extra floor or level in the architecture would require cutting the entire room horizontally. There was no way to delimit these sector portals without showing solid textures or HOM.

Edge portals solve this delimitation problem by allowing the sector portals to continue vertically into the floor or ceiling of the room. This makes it much easier to add new passages and hallways over other rooms, without affecting unrelated areas in the level design.

Walking into an edge linked portal works as expected: you enter into the area shown by the portal. Getting back from that area is done by using regular line portals (UDMF portal linedef property or Doom format special 376). Basically each edge portal leads into a line portal on the other side. What follows is details on how to set this up.


You mark the linedef with the edge portal with the lowerportal or upperportal property set to true (in some editors it's called "line copies back sector's floor/ceiling portal"). You do not set the portal property: this is only meant for wall portals (middle texture part).

On the corresponding opposite linedef, you do set the portal property to the same portal ID as the sector portal that brings you back. Make sure that if it's a 1-sided line that its length is exactly the same as the edge portal line's.

Doom format[edit]

The Doom format requires ExtraData. Set the ExtraData control special (270) on the edge portal lines. Edge portal lines have the LOWERPORTAL or UPPERPORTAL flag set in extflags.

The corresponding opposite linedef needs to be 2-sided (unlike in UDMF which also allows 1-sided) and needs to have special 376 (not 377), and its tag must be the same as edge portal's (controlled by id in ExtraData). Do not set special 377 on the edge portal (it's sufficient information that it has the ExtraData flag set).

To minimize the ExtraData work, a suggested method is as follows:

  1. Set a new tag to both the edge portal line and the wall portal line (let's call it X).
  2. Apply special 270 on the edge portal line and 376 on the wall portal line.
  3. In ExtraData, add the following block (for lower portal lines):
linedef { recordnum X id X extflags LOWERPORTAL }
Replace X with the actual tag number. Substitute UPPERPORTAL if it's an upper portal line.