The demo needs JavaScript. Here is what it shows.
Commands
Loading the module…
Choosing one restarts the program.
The cub3D program written in C, compiled to WebAssembly with Emscripten. Nothing was rewritten in JavaScript: the raycaster, the map parser and the game loop are the project’s own code, started with the same arguments as in a terminal.
cub3D draws through MiniLibX, which needs an X11 window. A browser has none, so a small replacement library with the same functions draws into this page instead, listens to the keyboard and reads the XPM textures.
The browser drives the loop, capped at 60 frames per second. Maps and textures are packed into the binary, and each game is a new instance of the program. A theme is a generated .cub file: the same plan, other textures and other colors.
Read the source