mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
4.6 KiB
4.6 KiB
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.uw8carts.
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
- Fireworks (127 bytes): Some fireworks to welcome 2022.
- Skip Ahead (229 bytes): A port of my TIC-80 256byte game from LoveByte'21
- OhNoAnotherTunnel (177 bytes): A port of my entry in the Outline'21 bytebattle final
- Technotunnel (158 bytes): A port of my entry in the Outline'21 bytebattle quater final