The demo needs JavaScript. Here is what it shows.
Commands
Loading the module…
Choosing one restarts the program.
The so_long program written in C, compiled to WebAssembly with Emscripten. Nothing was rewritten in JavaScript: the map parser, the movement and the rendering are the project’s own code, started with the same arguments as in a terminal.
so_long 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. The map_16x9 map was drawn for this page, in the shape of the stage.
This version adds themes and a two-state exit to the submitted program, available at the tag v1.0.
Read the source