Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-demo-wolf3d

A Luce Base rewrite of id Software's open-sourced Wolfenstein 3D (1992), presented through luce-ui. It loads the original shareware data files — the same VSWAP, GAMEMAPS and MAPHEAD the DOS exe used — and follows the original modules:

An application written in luce-base. Latest release 0.4.1.

Install#

luc install dymokomi/luce-demo-wolf3d

Documentation#

luce-demo-wolf3d

A Luce Base rewrite of id Software's open-sourced Wolfenstein 3D (1992), presented through luce-ui. It loads the original shareware data files — the same VSWAP, GAMEMAPS and MAPHEAD the DOS exe used — and follows the original modules:

OriginalThis port
WL_DEF.H constantssrc/wl_def.lucb
WL_DEF.H statetype / objtype / Gamesrc/wl_types.lucb
ID_CA.C Carmack + RLEW mapssrc/id_ca.lucb
ID_PM.C VSWAP pagessrc/id_pm.lucb
ID_CA.C VGA graphicssrc/id_graph.lucb
ID_SD.C / AdLib IMFsrc/id_sd.lucb, src/id_audio.lucb
WL_DRAW.C / WL_DR_A.ASM raycastersrc/wl_draw.lucb
WL_STATE.C TryWalk / NewState / CheckLinesrc/wl_state.lucb
WL_ACT1.C doors, statics, pushwallssrc/wl_act1.lucb
WL_ACT2.C statetype tables + T_Chasesrc/wl_act2.lucb
WL_AGENT.C Thrust / T_Attack / GetBonussrc/wl_agent.lucb
WL_GAME.C SetupGameLevel / NewGamesrc/wl_game.lucb
WL_PLAY.C PlayLoop / DoActorsrc/wl_play.lucb
WL_MENU.C DemoLoop / Control Panelsrc/wl_menu.lucb
GAMEPALsrc/pal.lucb

The id source is under vendor/wolf3d-id (Limited Use license from the 2012 release). Wolf4SDL under vendor/wolf4sdl is the 32-bit C reading of the same algorithms (Carmack's notes said to drop 16-bit and the compiled scalers).

The graphics are the original shareware art, not placeholders. The 2012 source release does not include data; Carmack's README says to use a released or shareware set. Episode 1 shareware files live in data/ (VSWAP.WL1, GAMEMAPS.WL1, MAPHEAD.WL1, …).

Run

python3 tools/build.py
./build/wolf3d

From the repo root so data/ resolves. --fullscreen, --smoke (12 frames).

InputOriginal meaning
Arrows / WASDMove and turn
AltStrafe
ShiftRun
Ctrl / clickFire
SpaceOpen a door
F11Fullscreen
EscapeQuit

Status

Working against shareware E1: map load, walls from VSWAP, doors, player Thrust/ClipMove, guards/officers/SS/dogs/mutants/Hans, pickups, pushwalls, 70 Hz loop, original VGA palette, AdLib IMF, DIGI SFX, DemoLoop menus.

Actor brains use original statetype records: nullable think/action function pointers and next as State*, filled from the WLACT2.C tables. DoActor calls those pointers the same way as `WLPLAY.C`.

Still to port from the original: demo playback, registered six-episode *.WL6 bosses, and some ScaleShape edge cases.

Tests

./test.sh

Dependencies#

Versions#

0.4.1

Browse source · pack · commit 1bf9e97da272

SHA-256 93b4ebb407cf4fbd1a036b5c70f6ed828cd9277a7b83a70b810737ce78cdbe71

dependencies name no version