1. install system-tools
We use npm to record tasks, and docker to do the actual build. You can build carts without these, but it helps unify & simplify. Install these first:
2. choose a template
Pick a language from our templates and press Use this template to make your own repo. Every template is the same shape, whichever language you choose:
cart/ your game - source and assets. this whole folder becomes the cart
webroot/ the web player. only index.html is yours
package.json the shortcuts below
3. make it your own
Search the project for mygame and change it to whatever your game is called. Stick to A-z, 0-9 and _.
4. run it
npm start
That builds webroot/mygame.null0, serves it on a local web-server, and rebuilds every time you save. Edit cart/, watch the browser.
To build once, without the server:
npm run build
Both are wrappers around one docker command, which you can always run yourself:
docker run --rm --user $(id -u):$(id -g) \
-v ./cart:/src -v ./webroot:/out \
ghcr.io/notnullgames/null0-cart-c mygame
Nothing about null0 is copied into your project. The docker image brings the bindings, and the web-player is loaded from null0's site.
4. publish it
The templates ship two github workflows:
- Publish deploys
webroot/to github-pages on every push tomain, so anyone can play your game athttps://<you>.github.io/<yourgame>/without installing anything. - Release attaches
mygame.null0to any github release you create.
Players who want it natively download the runtime and run null0 mygame.null0.
ok, now what?
- Anatomy of a cart - the callbacks your game implements, and how input works. This also goes more in-depth on publishing your game in various ways.
- Languages - what your language's syntax looks like, and its quirks.
- API - everything you can call.
- Gallery - every example cart, playable, with source.