Portal linedef types

From Eternity Wiki
Jump to: navigation, search

Portals turn a set of floors, ceilings, or linedefs into "windows" onto another part of the map, allowing for some otherwise impossible visual effects. Linked portals are interactive portals and can link two separate areas to form room-over-room or impossible architecture. The other kinds of portals are purely visual.

For an in-depth explanation of the behavior of simple portal types refer to the Portals article.

NOTE: for UDMF, you use the Portal_Define and Line_QuickPortal specials.

Back to Linedef types

Plane Portals[edit]

A plane portal linedef creates a portal which displays an infinite plane. The flat and light level used are determined from the ceiling of the sector on the front side of the plane portal control linedef.

Plane portal linedefs are as follows:

283  Ext     --   Applies plane portal to ceilings of all like-tagged sectors.
              
284  Ext     --   Applies plane portal to floors of all like-tagged sectors.
                 
285  Ext     --   Applies plane portal to floors and ceilings of all like-tagged sectors.

Horizon Portals[edit]

A horizon portal linedef creates a portal which displays two infinite planes which converge on a fixed horizon at the center of the screen. The flat and light level of the two planes come from the floor and ceiling of the sector on the front side of the horizon portal control linedef.

Horizon portal linedefs are as follows:

286  Ext     --   Applies horizon portal to ceilings of all like-tagged sectors.
              
287  Ext     --   Applies horizon portal to floors of all like-tagged sectors.
                 
288  Ext     --   Applies horizon portal to floors and ceilings of all like-tagged sectors.

450  Ext     --   Applies horizon portal to linedef. Can also be used from ExtraData as Line_Horizon

Skyboxes[edit]

A skybox is a portal which renders part of the map from the point of view of a control object. To setup a skybox, an EESkyboxCam object (doomednum 5006) must be placed in a sector. Then, one of the following skybox portal lines must be placed in that same sector such that it is the sector on the front side of the line. When viewed in the map, the surroundings of the control object will be seen at their real, fixed distance from that point, although the player's viewing angle will still be applied (so the scenery will turn, but not move).

Skybox linedefs are as follows:

290  Ext     --   Applies skybox portal to ceilings of all like-tagged sectors.
              
291  Ext     --   Applies skybox portal to floors of all like-tagged sectors.
                 
292  Ext     --   Applies skybox portal to floors and ceilings of all like-tagged sectors.

Anchored Portals[edit]

Anchored portals are the most complicated portal type. They define a portal similar to a skybox, but which moves relative to the player's point of view. This allows an anchored portal to appear as if it is a seamless part of the surrounding map.

To create an anchored portal, first one of the below anchored portal control linedefs should be placed into the sector which will appear inside the portal. Then, the sector in which the portal will appear should be tagged the same as the control linedef. This is the same as for all other types. However, an anchor line is also required so that the renderer can guage the offset between the real map area and the portal sector. This line, with specials 298 or 299, must be placed in the real sector, and must share the same tag as the sector and control linedef.

Here is an illustration of an anchored portal setup:

+---+              +---+
| A |-298 linedef  | B |-295 linedef
+---+              +---+

Sector A is the normal sector in which the player will walk. Sector B is the portal sector which will be drawn into the portal. The 298 linedef, the 295 linedef, and sector A all share a common tag. Eternity will guage the distance between the portal linedef and the anchor linedef and will know how far to offset the camera in order to render the portal. In this case, Eternity will render sector B over the ceiling of sector A, and the two will appear to be placed directly on top of each other.

As of Eternity Engine v3.31 public beta 7, the 296 anchored portal type uses line special 299 for its anchor line. This was revised to allow separate anchored portals to be used for the floor and ceiling of the same sector, which would not previously work. 295 and 297 still use the 298 anchor type.

Note that the areas drawn within the anchored portal will render at the player's current viewheight, so if the view within sector B in this example were above the ceiling or beneath the floor of sector B, a HOM effect would appear in the portal instead of the expected view. Be sure that areas inside an anchored portal are large enough both in terms of area and height so that the offset camera position always remains within valid space regardless of where the player is viewing the portal from.

Anchored portal linedefs are as follows:

295  Ext     --   Applies anchored portal to ceilings of all like-tagged sectors.
              
296  Ext     --   Applies anchored portal to floors of all like-tagged sectors.
                 
297  Ext     --   Applies anchored portal to floors and ceilings of all like-tagged sectors.

298  Ext     --   Anchor line, required for use alongside specials 295 and 297.

299  Ext     --   Anchor line, required for use alongside special 296.

Warning: As of Eternity Engine v3.33.33, normal anchored portals should no longer be used for two-way setups, where both areas of an anchored portal are visible from each other. Use the new two-way types discussed below instead for this situation. If the lines above are used instead, the player may see seemingly spontaneous error messages and feel annoying pauses during gameplay.

Two-Way Anchored Portals[edit]

For two-way anchored portal setups, where each area involved in the portal can be seen from the other area, you are now required to use the following set of linedefs instead of those outlined in the section above. This change is necessary to support visibility of normal portals even when the player's viewpoint would be beneath the floor or ceiling. Unfortunately, such a change causes the normal anchored portals to begin drawing each other repeatedly when used in a two-way setup. Although this will no longer crash Eternity, it is considered an error and will be displayed to the player as such. To avoid this, use only these types in such a situation.

344  Ext     --   Applies two-way anchored portal to ceilings of all like-tagged sectors.
              
345  Ext     --   Applies two-way anchored portal to floors of all like-tagged sectors.
                 
346  Ext     --   Anchor line, required for use alongside special 344 only.

347  Ext     --   Anchor line, required for use alongside special 345 only.

Portal transfer to line[edit]

289: Portal Transfer 

The portal transfer linedef allows the effects of any type of portal to be transferred to the front side of a one-sided line (it will *not* work on 2S lines). To accomplish this, simply give the 289 line the same tag used by the portal control linedef which is being targetted. Any number of 289 lines may share a portal, and the portal may still be used normally. If the normal effect of the portal (applied to a floor or ceiling) is not needed, it does not have to be tagged to a sector.

An example:

+------+---+                 +------+
|       \ B|<- B tag = 1     |      |
|        \ |                 |  C   |
|   A      +                 |      |
|          |                 |  *   |<- Skybox line special 290 , tag = 1
+----------+                 +------+
  ^                             ^
  Line special 289, tag = 1     Control thing 5006

In this example, sector C will be visible in sector B's ceiling as a skybox. However, it will also appear on the line in sector A with special 289, giving it a window-like effect.

289  Ext     --   Transfers a like-tagged portal to the first side of this linedef.

Linked portals[edit]

See Linked portals