Friction

From DoomWiki.org

Doom only features a single value for friction against the floor. Other games developed on the Doom engine, such as Heretic and its sequel Hexen, as well as some source ports such as Boom, allow to increase or decrease the amount of friction in given sectors, allowing for slippery or boggy terrain.

Specifications[edit]

The value corresponding to normal friction in the Doom engine is 0xe800, or 59392 in decimal. Since it is used as a fixed point, it corresponds to 90.625%. On each tic a mobj moves (through the function P_XYMovement), its speed is multiplied by this value, letting it decrease to a stop unless constant acceleration is provided. This affects player movement, as well as monster being pushed away by damage. Projectiles and airborne mobjs are not affected, and neither are lost souls when charging.

Given this implementation, reduced friction is represented by a greater value, and increased friction by a lower value.

Raven games[edit]

Heretic features two additional levels of standard friction: 0xf900 (97.265625%) for low friction on slippery floors (sector type 15), and 0xeb00 (91.796875%) for only slightly when the player is flying.

Hexen uses the same values as Heretic, but instead of using a given sector type, it marks as low friction sectors using the floor texture F_033.

Strife[edit]

Strife provides limited friction even while the player is airborne: 0xfff0 (99.9755859375%). This makes it easier to climb on ledges by jumping.

Source ports[edit]

Boom compatible[edit]

Boom uses linedef type 223 in conjunction with a bit flag in the sector type. The tntice cheat toggles friction effects on and off. The length of the linedef using the friction type is used as a percentage of the normal friction (not a percentage of the frictionless value that would be 0x10000). Boom introduced the ability to have increased friction.

Boom builds before 2.02 used two new sector types, 18 and 19. Compatibility with these sector types was not retained in Boom 2.02; instead a line of type 223 with a length of 189 corresponds to type 18, and a length of 67 to type 19.

Boom also applies friction to player movement by directly slowing acceleration during the first few seconds of movement from a full stop. This is to represent the player starting slowly and carefully on unsteady terrain, then gaining his footing.

MBF adds the ability to apply Boom friction to monsters as well.

The Eternity Engine supports Heretic's method in Heretic maps only, and Boom's linedef-based method. Monsters affected by friction is a compatibility option, on by default.

Other ports[edit]

Doom Legacy supports Doom, Boom, PrBoom, MBF, Heretic, and Legacy friction models, the model being selected by a menu control where practical. Friction includes water, ice, and mud effects, and can affect monsters. It supports the Boom friction thinker for demos, but otherwise applies sector friction attributes. The Legacy friction model can be applied to existing maps, applying more refined friction calculations to reduce transition effects and anomalies.

Doomsday's XG has a friction sector class that modders can use to dynamically control friction per sector.

ZDoom supports the Heretic method (with sector type 79 in non-Heretic maps), the Hexen method (through the TERRAIN lump) and Boom's linedef-based method (with Sector_SetFriction). Monsters affected by friction is a compatibility option, off by default.

External links[edit]