ref: affd4890f003d1ff352289c1b873f3ff208b5bb8
dir: /man/1/wl3d/
.TH WL3D 1 .SH NAME wl3d \- Wolfenstein 3-D engine port .SH SYNOPSIS .B wl3d [ .B -23dopqs ] [ .B -f .I demo ] [ .B -m .I datadir ] [ .B -w .I map 0-3 ] .SH DESCRIPTION .I Wl3d is a port of id Software's Wolfenstein 3-D engine. In short, Wolfenstein 3-D is... .PP .RS "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. Bummer. Now, you must do anything to escape from the belly of a Nazi dungeon - or die trying." .RE .PP The command line options are: .TF "-w map 0-3" .TP .B -2 Set game version to Spear of Destiny Mission 2: Return to Danger. .TP .B -3 Set game version to Spear of Destiny Mission 3: The Ultimate Challenge. .TP .B -d Set game version to Wolfenstein 3-D 1.4 shareware. .TP .BI -f\ demo Play demo from file on startup. .TP .BI -m\ dir Set game data directory. .TP .B -o Set game version to Spear of Destiny 1.0 demo. .TP .B -p Run at full speed. .TP .B -q Quit after demofile playback. .TP .B -s Set game version to Spear of Destiny 1.0 retail. .TP .BI -w\ "map 0-3" Warp to the given map number with a given difficulty on startup. .PD .PP .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 and .LR intro.sod , used respectively in Wolfenstein 3-D and Spear of Destiny game versions. .PP At startup, the current working directory is bound over .I datadir (default .BR /sys/games/lib/wl3d ) with the .B MBEFORE and .B MCREATE 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. The .B -m parameter is used to change .IR datadir . .PP 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. The .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. .PP The default game version is Wolfenstein 3-D 1.4 retail, and the data files use the .L wl6 extension. Others are set by the options .BR -2 , .BR -3 , .BR -d , .B -o and .BR -s . The respective data file extensions are .LR sd2 , .LR sd3 , .LR wl1 , .LR sdm , .LR sod . .PP Other game versions are unsupported. Note that .L sd2 and .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 parameter. The .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 uses .SM OPL2 chip emulation based on fmopl.c from the .SM MAME 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 (see .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 exits, 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 and .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 and .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. .PP A single executable handles all supported game versions. .PP 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. .PP 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. .PP 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. .PP The texture and sprite scaling implementation does not attempt to save memory and avoids quantization at close range. .SH FILES .TF /sys/games/lib/wl3d/intro.wl6 .TP .B /sys/games/lib/wl3d/ default wl3d data directory .TP .B /sys/games/lib/wl3d/intro.wl6 .B wl6/wl1 intro screen .TP .B /sys/games/lib/wl3d/intro.sod .B sdm/sod intro screen .SH "SEE ALSO" .IR doom (1) , .IR opl2 (1) , .IR bind (2) , .IR pipe (2) , .IR audio (3) , .IR wl3d (6) .SH BUGS Because of limitations in fmopl.c-based .SM OPL2 emulation, Adlib sound effects crack too much during playback. .PP The upsampling implementation for digital sound effects is overkill given the number of constraints. It is also buggy and playback cracks too much. .PP With sound effects enabled, the .SM OPL2 emulation runs on every frame and .L /dev/audio is written to, even when no sound is playing. .PP Little is done in case the program is unable to run at a framerate of 70 Hz. .PD .SS Engine bugs Correct demo playback depends on the sound and view size settings used during recording. Different settings on playback may cause desynchronization. .PP Spawned projectiles are not properly cleared when removed and may cause aberrant behavior and demo desynchronization. .SH HISTORY id Software's Wolfenstein 3-D was released for .SM MS-DOS on May 5, 1992. .br .I Wl3d first appeared in 9front (May, 2016), based on the source code release of Wolfenstein 3-D's engine from July 21, 1995.