WadC is a programming language (formally, a normal-order evaluated functional language1) for the construction of Doom maps. Think of it like Logo on steroids, with demons and shotguns.

The current version of WadC is 2.1. (Here's a zip). You can get the WadC source code from github.

Getting started

WadC session running [pipeloop.wl](https://github.com/jmtd/wadc/blob/master/examples/beta/pipeloop.wl)

WadC session running pipeloop.wl

WadC requires Java to run (get Oracle's here).

Download WadC. You'll also need a Doom engine (I recommend Eternity), a node builder (I recommend glBSP) and an IWAD (game data). If you don't have the commercial game data, buy it from GoG or grab FreeDoom. Unpack them all. Launch WadC by double-clicking the JAR file. Open (⌘ + O) up the newly created default wadc.cfg file which is in a folder .wadc in your home space (possibly c:\users\yourname or /home/you). Fix the paths in doomexe and bspcmd then Run the cfg file (⌘ + R), Save it (⌘ + S) and Open up one of the files from "examples/" in the unpacked WadC ZIP. From the WadC Control menu, hit Run / Save / Save WAD / BSP / Doom to try it out!

Try hacking an existing example or writing your own - see the introductory tutorial and the language reference.

If you want some ideas for things to do, take a look at the WadC HACKING guide.

If you just want to see what you can do, there's a gallery of examples and a collection of ready-to-play WADs.

New in 2.1

An old WadC session

An old WadC session

Version 2.1 of WadC is dedicated to the memory of Professor Seymour Papert (1928-2016), co-inventor of the LOGO programming language.

Check the release notes for the full details, but in brief

  • lots of improvements to the GUI: better default size, undo/redo support, internationalisation, etc.
  • Doom 1, Heretic, Hexen and Strife support
  • more libraries: control sector management; boom generalised linedef/sector generators; thing definitions for heretic/hexen/strife; new math routines
  • lots of new examples: boom generalised sector/line types; binary ripple counters; Hexen polyobjects; examples of Doom 1/Heretic/Strife support
  • lots of bug fixes, including a major one for line splitting when overdrawing lines


Have you made a cool WadC level? Let's put it in WadC! The easiest way to collaborate is to send a pull request on github. Feel free to make suggestions or report bugs via github issues.

You can also just email me if you don't like GitHub, or leave a comment on this page.

Future work

the resulting map

the resulting map

For the most part, WadC is very rarely updated. The following have been considered and may happen one day:

  • A verbose tutorial
  • improve or at least diagnose and report issues running wadc in non-Sun JREs
  • investigate feasibility of altering the way sector lines are chosen so as to make chaining stuff together easier (i.e., if you choose a line already assigned to a sector, instead of dying, try another line which terminates at the same vertex — but ensure we remain deterministic)
  • compiler optimisations
  • Contemplate a rewrite in Haskell

See also

WadC was originally written by Wouter van Oortmerssen (Aardappel). Aardappel's historic WadC web page and version 1.1 are available at http://strlen.com/wadc/.


comment 1

Hi Jon,

Been playing with WadC the last week and have made some functions that (if they appear to work) you might want to put into the standard.h? The reason I looked to make them was to try and see if WadC could make random layouts.

greaterthaneq(a, b) {
  lessthaneq(add(b, 1), a)

roundup(val, step) {
  add(mul(div(val, step), step), step)

rounddown(val, step) {
  mul(div(val, step), step)

-- Random function: Call random(min, max)
-- random2 is a helper function to get "unique-ish" jump values
-- with each loop
random2(range) {
  set("randVal", add(get("randVal"), div(range, 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15)))

random(min, max) {
  set("randVal", min)
  for(1, 10 | 20 | 30 | 40, greaterthaneq(random2(add(abs(min),abs(max))), max) ? set("randVal", add(sub(get("randVal"), max), min)) : 0)

-- Square root function: Call sqrt(x)
-- sqrt2 & sqrt3 are helper macros to test upward and then
-- down if we go over the target value.
sqrt3(_val, _exp) {
  lessthaneq(div(_val, _exp), _exp) ? sqrt3(_val, sub(_exp, 1)): add(_exp, 1)

sqrt2(_val, _exp, _step) {
  lessthaneq(div(_val, _exp), _exp) ? sqrt3(_val, _exp) : sqrt2(_val, add(_exp, _step), _step)

sqrt(_val) {
  lessthaneq(_val, 0) ? 0 : { greaterthaneq(_val, 100) ? sqrt2(_val, 1, 50) : sqrt2(_val, 1, 5)}

-- I also changed the existing for(x, y, z) function to use the "_" notion
-- as explained in your readme as I was coming across the "lazyness" in
-- the loops for random and sqrt functions. I think it still works as intended?
for(_from, _to, body) {
  lessthaneq(_from, _to) ? body for(add(_from, 1), _to, body) : 0

All the best, Travers

Comment by traversd
comment 2


This seems like an interesting concept.

Too bad it requires Java. I hate using Java apps, because it requires the presence of Java, something I'd rather keep as far away as possible from my machine.

Please consider porting it to C++, shouldn't be too much work, given the similarity of languages.

Comment by PooshhMao
comment 3


Please consider porting it to C++, shouldn't be too much work, given the similarity of languages.

Thanks for your comment. There's basically no chance of me porting this to C++. I've tried to resist the effort to do much clean-up or other yak-shaving and focus any effort I put into WadC on adding something useful. I want to try and keep a very high effort:gain ratio as I don't have much time to put into it.

I can appreciate that some people are not happy to install a JRE. It is likely quite possible for WadC to be compiled in some alternative way to result in something other than java classes/JAR. I imagine that the CLI at least will work fine if compiled to a native EXE via GCC. It might also be posslble to do something interesting with IKVM to run it on a .NET platform. However, I will leave these investigations to others. I'd be happy to hear how people got on - it's just not my itch to scratch.

(I might at least give a native build a quick look when I do the Debian package in the near future.)

The reason I'm reluctant to wander too far "off reservation" is if I did have more time to dedicate to this, I'd basically like to rewrite/redesign it from the ground up on top of something like Haskell, most likely as an EDSL, and therefore harness much of the power of an existing, mature functional language, rather than have to implement that all again.

comment 4


We've added a link to WadC to LinuxLinks.com

Regards, Steve

Comment by Steve Emms
comment 5
What is the benefit of this over existing wad/map creation programs?
Comment by Anonymous
comment 6

@Anonymous: I've answered this many times over the years, but your question makes me think perhaps I should explain this more prominently in this page / the docs.

Basically, it's completely different to a traditional editor. So, it does some things better and some things worse. It makes it much, much easier to do complex, detailed or repeating patterns, if you can express those patterns in an algorithm: so, fractals, etc. It also makes doing things which are repetitive like complicated Boom conveyor-belt or control sector related things much easier. A concrete example of that: my in-progress test map is a bunch of sewer tunnels which are partially flooded with water (via Boom's 242 line type and control sectors). At the moment, the map is two partial "loops" of sewer tunnels at different vertical heights that intersect in two places (like a figure of 8). It has 680 control sectors, which would be a huge pain in the arse to try and do by hand in a traditional editor.

However, the problem with doing repeating patterns is they look repeating. So it's harder (much harder) to make natural patterns that don't look like repeating things. So e.g. you might have some repeating architecture in a map, and in a normal editor, you would vary it a bit by hand, which would make it more interesting to play; in WadC, it's trickier to vary things in that way.

It is not meant to compete with or replace a traditional editor, but it is an interesting (to me anyway) tool that can do things that you can't do in a traditional editor that not many people have tried doing yet, and that's something I'm still interested in exploring.

Some people (cybermind with "The Last Sanctuary" is the best example) have successfully used WadC to do some complex boom stuff, then imported that into a map made in a traditional editor.