Difference between revisions of "Sky hack"

From DoomWiki.org

[checked revision][checked revision]
m (some wikilinks)
m (fix refs section)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:E1M1_sky_hack_in_SLADE.png|thumb|A demonstration of the sky hack in {{ml|E1M1: Hangar (Doom)}}.]] The '''sky hack''' is a feature of the [[Doom rendering engine]] that prevents a [[linedef]]'s upper [[texture]]s from being displayed between two [[sector]]s using both a [[sky]] ceiling. When missiles or hitscan traces collide with a sky hack wall, they simply disappear as they do when they collide with the ceiling itself.
+
[[File:E1M1_sky_hack_in_SLADE.png|thumb|A demonstration of the sky hack in {{ml|E1M1: Hangar (Doom)}}.]] The '''sky hack''' is a feature of the [[Doom rendering engine]] that prevents a [[linedef|linedef's]] upper [[texture]]s from being displayed between two [[sector]]s when both are using a [[sky]] ceiling. When missiles or hitscan traces collide with a sky hack wall, they simply disappear as they do when they collide with the ceiling itself.
  
On the example picture, taken in a map editor, the ceilings of the front and back sectors are highlighted in blue, the upper texture is highlighted in yellow. This upper texture should "normally" display STARTAN3, but with the sky hack it is not actually drawn, and the sky is seen instead. This allows to have outdoors area with outer walls at differing heights.
+
In the example picture, taken in a map editor, the ceilings of the front and back sectors are highlighted in blue, the upper texture is highlighted in yellow. This upper texture should "normally" display STARTAN3, but with the sky hack it is not actually drawn, and the sky is seen instead. This allows to have outdoors area with outer walls at differing heights.
  
 
The sky hack does not apply to lower textures between two sky floors.
 
The sky hack does not apply to lower textures between two sky floors.
 +
 +
==Bugs==
 +
* An oversight in the skyhack code may cause some projectiles to disappear when they strike a lower wall. Specifically, function <code>P_XYMovement</code> checks the wall's back sector to determine if it has a sky texture rather than the texture on the opposite side of the collision, and does not check if the projectile is colliding on a lower wall which is not skyhacked.<ref>[https://www.youtube.com/watch?v=9GoSRw4TDw0 Oversight Causes Projectiles to Go POOF!] - decino</ref>
 +
 +
==References==
 +
<references />
 +
 
[[Category:Doom engine]]
 
[[Category:Doom engine]]

Revision as of 16:28, 5 July 2022

A demonstration of the sky hack in E1M1: Hangar.
The sky hack is a feature of the Doom rendering engine that prevents a linedef's upper textures from being displayed between two sectors when both are using a sky ceiling. When missiles or hitscan traces collide with a sky hack wall, they simply disappear as they do when they collide with the ceiling itself.

In the example picture, taken in a map editor, the ceilings of the front and back sectors are highlighted in blue, the upper texture is highlighted in yellow. This upper texture should "normally" display STARTAN3, but with the sky hack it is not actually drawn, and the sky is seen instead. This allows to have outdoors area with outer walls at differing heights.

The sky hack does not apply to lower textures between two sky floors.

Bugs

  • An oversight in the skyhack code may cause some projectiles to disappear when they strike a lower wall. Specifically, function P_XYMovement checks the wall's back sector to determine if it has a sky texture rather than the texture on the opposite side of the collision, and does not check if the projectile is colliding on a lower wall which is not skyhacked.[1]

References

  1. Oversight Causes Projectiles to Go POOF! - decino