Voodoo script

From DoomWiki.org

Revision as of 18:54, 17 May 2019 by Linguica (talk | contribs) (Advantages)


A voodoo script is a design pattern often featured in modern Doom mapping.

Doom does not naturally feature any sort of scripting language, and while advanced ports have implemented various languages, many Doom mappers have wanted to add more interactivity to their maps without being forced to tie their WAD to that particular source port. After the release of the Boom source port, mappers soon discovered that if they placed a voodoo doll on a sector with a scrolling floor, the voodoo doll could trigger linedefs on its own as it was scrolled along the floor.

Ingenious design of the scrolling floor, and removable obstacles placed in the way of the voodoo doll, could result in more complex behavior. Mappers soon also realized they could apply this trick to existing Doom-engine games that featured scrolling floors, such as Heretic, Hexen, and Strife.

Voodoo scripts can also be used, to a more limited extent, in vanilla Doom without using carrying sectors. This requires other means to force the doll to move horizontally, such as damage from an exploding barrel destroyed by a crusher. To prevent the player from noticing the sudden damage, further tricks must be employed, making them much harder to use than the conveyor-belt approach.

Advantages

Voodoo scripts operate as an ersatz visual scripting language, where all logic is effectively encoded into the design of the map itself. This makes it compelling for many map authors who are comfortable with creating a voodoo script but would not feel comfortable trying to learn and use a "real" embedded scripting language.

Making the voodoo script a part of the map also makes it impossible for it to be severed from the map itself, and they cannot be obfuscated, as with ACS bytecode.

Disadvantages

As voodoo scripts are just carefully designed map geometry, there is no real internal "state" of the script that can be examined or debugged during the design process. The voodoo script can break silently due to any number of unseen factors, from user error to game engine bugs. They also generally will not work in multiplayer because they rely on the single player voodoo doll phenomenon and have no easy way to "reset." They are particularly sensitive to minute differences in physics handling between ports.

See also