# Wolfenstein 3D

![Wolfenstein 3D app icon](pwa-512x512.png "Wolfenstein 3D app icon")

`wolfenstein` runs the original 10-level shareware episode of Wolfenstein 3D on an RCWeb shared display. Open `/wolfenstein/?r=<room>` and scan the on-screen QR code to join with the companion [`wolfenstein-c`](../wolfenstein-c/appinfo) phone controller.

## Player setup

- The viewer owns the complete game session, renderer, audio, saved games, and shareware data.
- The first phone in the room owns the single-player controls. A refreshed phone keeps its controller identity and reclaims control; another phone can take over after the owner leaves or stops reporting presence for seven seconds.
- Wide displays show the pairing QR code beside the game. Portrait and square displays expose the same QR code in a modal.

## Controls

- Drag the movement stick up/down to move and left/right to turn. Diagonal drags combine movement and turning.
- Drag the separate Strafe control for sideways movement.
- Hold `Fire` or `Use`; tap `Weapon` to cycle the weapons already collected and `Map` to toggle the optional minimap.
- `Menu` pauses or resumes the game. `Select` confirms or continues level-complete and game-over screens.
- A local keyboard uses W/S to move, A/D to strafe, left/right arrows to turn, Ctrl to fire, E to use, M to toggle the map, and Escape for the menu.

## RCWeb routing

The phone reduces touch input to named press and release events and sends them with `rc.sendFunctionCall("wolfenstein", ...)`. The global viewer API validates that the sender owns the controls before passing an accepted action to the local game runtime. The viewer replies directly to each controller with loading, ready, error, and ownership state. No gameplay state is simulated on the phone or persisted by the RCWeb server.

## Runtime and attribution

The browser engine is a vendored, locally modified copy of [dibdot/uWolf](https://github.com/dibdot/uWolf), licensed under GPL-3.0. It reads unmodified Wolfenstein 3D Episode 1 shareware data files locally. See `UPSTREAM.md` and `runtime/LICENSE` for source, provenance, modification, and license details.
