WebAssembly build of GORPH - Galactic Organic Robot Phalanx, the native C89/SDL2 shooter in C64 style. Game, controls and features are described in the main repository: ray77/gorph.
This repository contains the browser version as it runs on
arcade4ever.net, including the page wrapper and a
prebuilt gorph.js / gorph.wasm.
| Path | Purpose |
|---|---|
src/ |
Game sources, identical to the desktop version plus web.c |
build.sh |
Emscripten build script |
index.html |
Page wrapper with canvas, boot splash and score hookup |
gorph.js |
Prebuilt Emscripten loader |
gorph.wasm |
Prebuilt game binary (all assets embedded, no data package) |
Requires Emscripten (emcc in the path):
./build.sh
The build uses -sASYNCIFY, so the game's fixed 50 Hz main loop including
SDL_Delay runs unchanged in the browser.
The files must be served over HTTP (browsers refuse to load .wasm from
file://):
python3 -m http.server 8000
Then open http://localhost:8000/index.html. The boot splash logo and the
score submission point to arcade4ever paths (/assets/img/logo.png,
/games/newscore.php); locally the logo is missing and a game over leads to
a missing page, the game itself runs normally.
Escdoes not quit (a browser tab has nothing to quit to).- At game over the final score is passed to the page via
window.onGorphGameOver(score)(src/web.c, one hook insrc/game.c). Attract-mode runs never report a score. - Arrow keys and space are kept from scrolling the parent page, and the canvas takes keyboard focus on click (Safari needs this).
Both source changes are guarded by __EMSCRIPTEN__, so the same src/
still builds natively.