WadC

From DoomWiki.org

The WadC interface

WadC, short for Wad Compiler, is a programming language and integrated development environment designed for constructing Doom levels. Originally written by Wouter "Aardappel" van Oortmerssen, it is now maintained by Jon Dowland.

Compared to a traditional level editor, WadC may seem very awkward to use. WadC's strength is with structures that can be procedurally generated: a function can be written to create a pillar, for example, and then invoked any number of times to create many pillars.

Interface[edit]

The IDE takes the form of a two pane window. In the left pane, WadC code can be written. A preview of the resulting level is displayed in the right pane. Messages and errors encountered when processing the WadC code are displayed in the right-hand side, below the map preview.

Recent releases of WadC included a command-line interface as an alternative to the IDE.

Language[edit]

The WadC language is a lazy, normal-order evaluated functional language with a strong resemblance to a macro language.

Example script[edit]

The results of running water.wl

The following script generates a corridor of steps that descend under water.

/*
 * water.wl - a demonstration of the Boom water routines
 */

#"standard.h"
#"water.h"

main {
    waterinit_fwater(-16)
    movestep(0,64) -- out of the way of control sectors
    pushpop(movestep(32,32) thing)

    -- a ramp of rooms, descending in floor and ceiling height
    fori(0, 7,
        set("floorheight", sub(0, mul(i,24)))
        set("ceilheight",  add(128, get("floorheight")))
        water(
            box(get("floorheight"), get("ceilheight"), 200, 256, 256),
            get("floorheight"),
            get("ceilheight"),
        )
        movestep(-256,0)
    )
}

Notable levels[edit]

Perhaps the best known WadC maps were created by Aardappel himself, including his submission to Doomworld's 10 Sectors competition, and Crucified Dreams MAP12. The source code files for both maps are included in the WadC zip file as hexagon.wl and tulip.wl respectively.

External links[edit]