Skip to content

(mirror) nelua bindings for gamercade console.

License

Notifications You must be signed in to change notification settings

Andre-LA/nelua-gamercade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nelua-gamercade

Gamercade bindings for nelua language.

Development and issue tracking

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

Setup

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.

Usage

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.

License

This project is licensed under Zlib license.