Gamercade bindings for nelua language.
The upstream development of this project is done at Codeberg: https://codeberg.org/Andre-LA/nelua-gamercade
The issue tracking is done at github: https://github.com/Andre-LA/nelua-gamercade/issues
First, of course, install nelua.
You'll need a C compiler that generates an .wasm
binary, for that, you should install WASI-SDK.
The important part is declaring the
CC
variable that points to the WASI's clang.
To use the bindings, just require the gamercade.nelua
file using require "gamercade"
at the beggining of the main file.
Later, apply the update
and draw
functions using setup_gamercade_callbacks
function.
It's recommended to read the pong example.
To compile your nelua source code, just change the C compiler to the CC
variable:
$ nelua examples/pong.nelua -r --cc "$CC" -o build/pong.wasm
--cc changes the C compiler, -r makes a release build (optional, but recommended), you propably want to use -o in order to make the wasm file easily accessible.
Finally, follow Gamercade's guide in order to
build and run the gcrom
file.
This project is licensed under Zlib license.