Browsing qwx/wl3d at commit c250669d2fda82fdf6e6ee5cdaeee477dd347eb1: /man/1/wl3d

view raw
.TH WL3D 1
wl3d \- Wolfenstein 3-D engine port
.B wl3d
.B -23dopqs
] [
.B -f
.I demo
] [
.B -m
.I datadir
] [
.B -w
.I map 0-3
.I Wl3d
is a port of id Software's Wolfenstein 3-D engine.
In short, Wolfenstein 3-D is...
"a masterpiece of wild action and unbelievable graphics, bringing you virtual reality at its best, as you move
.RI though (sic)
a sensationally realistic 3-D world of amazing detail.
It's World War II, and you are B.J. Blazkowicz - the Allies' bad boy of espionage, a terminal action seeker built for abuse with an attitude to match.
There's just one small problem: you've been captured by the Nazis, tortured, and imprisoned beneath the Castle Wolfenstein where you await execution.
Now, you must do anything to escape from the belly of a Nazi dungeon - or die trying."
The command line options are:
.TF "-w map 0-3"
.B -2
Set game version to Spear of Destiny Mission 2: Return to Danger.
.B -3
Set game version to Spear of Destiny Mission 3: The Ultimate Challenge.
.B -d
Set game version to Wolfenstein 3-D 1.4 shareware.
.BI -f\  demo
Play demo from file on startup.
.BI -m\  dir
Set game data directory.
.B -o
Set game version to Spear of Destiny 1.0 demo.
.B -p
Run at full speed.
.B -q
Quit after demofile playback.
.B -s
Set game version to Spear of Destiny 1.0 retail.
.BI -w\  "map 0-3"
Warp to the given map number with a given difficulty on startup.
.I Wl3d
requires several data files to operate, containing sound effects, music, and several types of graphics.
These are detailed in
.IR wl3d (6) .
Two additional files contain the initial loading screens,
.L intro.wl6
.LR intro.sod ,
used respectively in Wolfenstein 3-D and Spear of Destiny game versions.
At startup, the current working directory is bound over
.I datadir
.BR /sys/games/lib/wl3d )
with the
flags (see
.IR bind (2)).
Data files can thus be contained in a system directory while the config and save files' location, which are user-specific, can be left at the user's discretion.
If the configuration file exists and
.I wl3d
fails to parse it, it is not overwritten.
.B -m
parameter is used to change
.IR datadir .
Several options modify the program's behavior on startup.
If the
.B -w
parameter is used, the game starts immediately at map number
.IR map ,
with difficulty set to
.BR 0-3 ,
.B 0
being the easiest.
.B -p
parameter runs the program at the fastest speed possible for testing purposes.
.SS Game versions
The engine supports several game versions, each requiring different data files.
These also control parts of the program's behavior, such as level ordering and interface drawing.
Each corresponds to a specific data file extension.
The default game version is Wolfenstein 3-D 1.4 retail, and the data files use the
.L wl6
Others are set by the options
.BR -2 ,
.BR -3 ,
.BR -d ,
.B -o
.BR -s .
The respective data file extensions are
.LR sd2 ,
.LR sd3 ,
.LR wl1 ,
.LR sdm ,
.LR sod .
Other game versions are unsupported.
Note that
.L sd2
.L sd3
versions are variants of
.LR sod ,
only substituting some of the data files.
.SS Demo lumps
.I Wl3d
can playback a single external demo lump before resuming normal operation, when its path is supplied via the
.B -f
.B -q
parameter causes the program to exit after playback instead.
The filename's extension, if any, is ignored.
Regardless, a corresponding game version must be set using the aforementioned command line parameters.
An incorrect version will cause erroneous playback or a crash.
.SS Sound and music
.I Wl3d
chip emulation based on fmopl.c from the
project for music and sound effects.
Digital sound effects are resampled prior to playback.
PC speaker sound effects are unimplemented and ignored.
In case
.L /dev/audio
.IR audio (3))
is inaccessible, audio is ignored.
.SS Configuration file
Configuration strings are loaded from a file
.L wlconf
in the current working directory.
It is overwritten when
.I wl3d
excepting when it was not parsed successfully on program load.
Its format is a series of key-value pairs, one per line,
separated by a space character.
.L vwsize
.L msens
control the size of the draw area and mouse sensitivity,
and their values are bounded respectively to 0-9 and 4-19.
.LR mouse ,
.LR autorun ,
.LR alsfx ,
.LR pcmsfx
.LR music
are toggles for enabling mouse use,
moving at full speed at all times,
.SM Adlib
sound effects, digital sound effects, and music.
A value of
.L 0
disables the setting, and
.L 1
enables it.
.SS Differences
Most of
.I wl3d
has been rewritten from scratch, and some parts have been implemented differently from the reference.
Most importantly, individual data lumps are no longer read and cached as needed,
but rather all loaded into memory, uncompressed, and in some cases converted,
at startup.
This bumps the required amount of free memory up to around at least 5 megabytes,
depending on the game version, architecture and window size.
A single executable handles all supported game versions.
Intro screens are now additional data files to be loaded on startup,
rather than being compiled in, and must therefore be installed in the
.IR datadir .
Also unlike the reference implementation,
these are displayed during data file loading,
and are immediately faded out of afterwards.
Copy protection code and the Spear of Destiny Jukebox have been excised.
Menus are implemented differently, and some have been altered in functionality.
Debug mode has been removed, and cheats work differently.
Game keys are no longer set in the options menu.
A single configuration file is used for all game versions.
Savegames and configuration files are incompatible in format.
The texture and sprite scaling implementation does not attempt to save memory and avoids quantization at close range.
.TF /sys/games/lib/wl3d/intro.wl6
.B /sys/games/lib/wl3d/
default wl3d data directory
.B /sys/games/lib/wl3d/intro.wl6
.B wl6/wl1
intro screen
.B /sys/games/lib/wl3d/intro.sod
.B sdm/sod
intro screen
.IR doom (1) ,
.IR opl2 (1) ,
.IR bind (2) ,
.IR pipe (2) ,
.IR audio (3) ,
.IR wl3d (6)
Because of limitations in fmopl.c-based
emulation, Adlib sound effects crack too much during playback.
The upsampling implementation for digital sound effects is overkill given the number of constraints.
It is also buggy and playback cracks too much.
With sound effects enabled, the
emulation runs on every frame and
.L /dev/audio
is written to, even when no sound is playing.
Little is done in case the program is unable to run at a framerate of 70 Hz.
.SS Engine bugs
Correct demo playback depends on the sound and view size settings used during recording.
Different settings on playback may cause desynchronization.
Spawned projectiles are not properly cleared when removed and may cause aberrant behavior and demo desynchronization.
id Software's Wolfenstein 3-D was released for
on May 5, 1992.
.I Wl3d
first appeared in 9front (May, 2016), based on the source code release of Wolfenstein 3-D's engine from July 21, 1995.