This is a rewrite of the original game in aecor, so that it can be compiled to WASM and deployed to the web using emscripten.
This game is implemented in aecor, so you'll need to have a working version of it on your system. The aecor
repository provides information on how to set it up.
Note: You will have to provide the aecor
compiler a path to the aecor
repository on your system with the -l
flag to be able to load the libraries.
You will need to have SDL2 and SDL2_image installed and configured on your system.
$ aecor -l path/to/aecor/repo sdl_main.ae
$ ./out
You will need to have the emscripten SDK available on your PATH for this to work.
# Compile aecor to intermediate `out.c` file
$ aecor -l path/to/aecor/repo wasm_main.ae -n
$ ./build_wasm.sh # expects `out.c` as source
Alternatively, the last step can be done in a docker container if you don't want to install emscripten on your system:
$ docker run --rm -v $(pwd):/mnt -w /mnt/ emscripten/emsdk ./build_wasm.sh
After this, the generated HTML+JS+WASM files can be found in build/
, and can be tested with a local webserver.