2022-04-20 23:19:26 +02:00
2022-04-24 00:01:54 +02:00
2022-02-28 23:59:51 +01:00
2022-04-19 00:27:53 +02:00
2022-04-24 23:32:28 +02:00
2022-01-13 06:20:00 +01:00
2022-01-29 15:21:35 +01:00
2022-02-28 23:19:58 +01:00

MicroW8

MicroW8 is a WebAssembly based fantasy console inspired by the likes of TIC-80, WASM-4 and PICO-8.

The initial motivation behind MicroW8 was to explore whether there was a way to make WebAssembly viable for size-coding. (Size coding being the art of creating tiny (often <= 256 bytes) graphical effects and games.) The available examples so far are all in this space, however, I very carefully made sure that all design decisions make sense from the point of view of bigger projects as well.

See here for more information and docs.

Specs

  • Screen: 320x240, 256 colors, 60Hz
  • Modules: Up to 256KB (WASM)
  • Memory: 256KB
  • Gamepad input (D-Pad + 4 Buttons)

Downloads

The download includes

  • microw8.html: The web runtime, a small, self-contained html file that can be opened in any modern browser to load and run MicroW8 carts.
  • uw8/uw8.exe: The MicroW8 dev tool, including a native runtime.
  • examples: Example source code in CurlyWas and Wat (WebAssembly text format).
  • carts: The examples compiled to .uw8 carts.

uw8 dev tool

uw8 run [<options>] <file>

Runs <file> which can be a binary WebAssembly module, an `.uw8` cart, a wat (WebAssembly text format) source file or a CurlyWas source file.

Options:

-b, --browser           : Run in browser instead of using native runtime
-t, --timeout FRAMES    : Sets the timeout in frames (1/60s)
-w, --watch             : Reloads the given file every time it changes on disk.
-p, --pack              : Pack the file into an .uw8 cart before running it and print the resulting size.
-u, --uncompressed      : Use the uncompressed uw8 format for packing.
-l LEVEL, --level LEVEL : Compression level (0-9). Higher compression levels are really slow.
-o FILE, --output FILE  : Write the loaded and optionally packed cart back to disk.


uw8 pack [<options>] <infile> <outfile>

Packs the WebAssembly module or text file, or CurlyWas source file into a .uw8 cart.

Options:

-u, --uncompressed      : Use the uncompressed uw8 format for packing.
-l LEVEL, --level LEVEL : Compression level (0-9). Higher compression levels are really slow.


uw8 unpack <infile> <outfile>

Unpacks a MicroW8 module into a standard WebAssembly module.


uw8 compile [<options>] <infile> <outfile>

Compiles a CurlyWas source file to a standard WebAssembly module. Most useful together with
the --debug option to get a module that works well in the Chrome debugger.

Options:

-d, --debug             : Generate a name section to help debugging


uw8 filter-exports <infile> <outfile>

Reads a binary WebAssembly module, removes all exports not used by the MicroW8 platform + everything that is unreachable without those exports and writes the resulting module to <outfile>.

Examples

Languages
HTML 60.1%
Rust 32.4%
JavaScript 4.9%
WGSL 1.7%
CSS 0.6%
Other 0.3%