Keep in mind that we are still building things, so the docs could be totally wrong or incomplete.
null0
Introduction
🤣

Null0 is an easy & fun 2D game-engine that lets you write your game in many languages.
It's fun to use, and a great way to learn new programming languages.

The basic idea is that you make your game in whatever language you like, and put that with your assets in a zip-file, and you can run it in libretro, or the standalone runtime, or on the web.

supported

We currently fully support these languages:

planned

These are planned:

concepts

types

  • u32, u16, u8 - "unsigned integer" each is a specific bit-size (8 bits in a byte.) These are integers that are only positive or 0.
  • i32, i16, i8 - "signed integer" each is a specific bit-size (8 bits in a byte.) These are integers that are positive/negative or 0.
  • string - this is char* in C. It's a standard "C-string", which is a pointer to bytes that are UTF8/null-terminated. Effort will be made to wrap them in cart-languages, to make them make more sense.
  • struct - this is some bytes that describe a kind of object, with fields. There are a few things that return these, and they are the same as in C. Effort will be made to wrap them in cart-languages, to make them make more sense.
  • All resources (images, fonts, sounds, etc) are u32 reference-counters.

contribution

❤️

You can use any language that compiles to wasm, so if you like a language we are missing, consider making a language-idiomatic header/demo-project for your favorite language, and sending us a PR (opens in a new tab).

The plan is to have a complete template-project for any cart-language, so it's easy for people to get started with their preferred ecosystem.

notes

  • With many things, there may be a more idiomatic way to do it, in that language (like in C/nim, reading/writing files) but we currently favor a matching API (across languages) over language-idiomatic. Ths may chnage in the future, once I get good WASI bindings setup. We should try to use built-ins or sensible things for the language, for example, in nim we could use echo and printf in C.
  • Feel free to wrap values however seems sensible for the language. Nim, for example, uses a overloaded procs, so if you leave off the destination for image-functions (drawing, etc) it assumes 0 (screen)
  • we can add things to the host, if the language just cannot do something, but you should try to do everything in the cart-header to adapt the language to it's host. For example, assemblyscript uses WTF16 encoding for strings, so we translate those to/from UTF8 null-terminated ("C strings") before interacting with the host.