From c9ae04e652bd909cf2cf589c69d37c56981483a7 Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Thu, 13 Jan 2022 06:20:00 +0100 Subject: [PATCH] last preparations for 0.1.0 release --- .gitignore | 2 ++ README.md | 62 ++++++++++++++++++++++++++++++++++++- release/.gitignore | 2 ++ release/make-release | 54 ++++++++++++++++++++++++++++++++ site/.SRCINFO | 0 site/static/v0.1/index.html | 1 + web/src/index.html | 3 ++ web/src/style.css | 14 ++++++--- 8 files changed, 132 insertions(+), 6 deletions(-) create mode 100644 release/.gitignore create mode 100755 release/make-release create mode 100644 site/.SRCINFO create mode 100644 site/static/v0.1/index.html diff --git a/.gitignore b/.gitignore index 9e6e17c..0acb0d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /target .cargo/ .vscode/ +/examples/**/*.wasm +/examples/**/*.uw8 \ No newline at end of file diff --git a/README.md b/README.md index 06c6da3..90347fd 100644 --- a/README.md +++ b/README.md @@ -1 +1,61 @@ -See [here](https://exoticorn.github.io/microw8/). \ No newline at end of file +# MicroW8 + +MicroW8 is a WebAssembly based fantasy console inspired by the likes of [TIC-80](https://tic80.com/), [WASM-4](https://wasm4.org/) and [PICO-8](https://www.lexaloffle.com/pico-8.php). + +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](https://exoticorn.github.io/microw8/) for more information and docs. + +## Specs + +* Screen: 320x240, 256 colors, 60Hz +* Modules: Up to 256KB (WASM) +* Memory: 256KB +* Gamepad input (D-Pad + 4 Buttons) + +## Download + +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 [] + +Runs which can be a binary WebAssembly module, an `.uw8` cart, a wat (WebAssembly text format) source file or a CurlyWas source file. + +Options: + +-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 [] + +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 filter-exports + +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 . +``` + +## Examples + +* [Fireworks](https://exoticorn.github.io/microw8/v0.1pre5#AgwvgP+M59snqjl4CMKw5sqm1Zw9yJCbSviMjeLUdHus2a3yl/a99+uiBeqZgP/2jqSjrLjRk73COMM6OSLpsxK8ugT1kuk/q4hQUqqPpGozHoa0laulzGGcahzdfdJsYaK1sIdeIYS9M5PnJx/Wk9H+PvWEPy2Zvv7I6IW7Fg==) (127 bytes): Some fireworks to welcome 2022. +* [Skip Ahead](https://exoticorn.github.io/microw8/v0.1pre5#AgyfpZ80wkW28kiUZ9VIK4v+RPnVxqjK1dz2BcDoNyQPsS2g4OgEzkTe6jyoAfFOmqKrS8SM2aRljBal9mjNn8i4fP9eBK+RehQKxxGtJa9FqftvqEnh3ez1YaYxqj7jgTdzJ/WAYVmKMovBT1myrX3FamqKSOgMsNedLhVTLAhQup3sNcYEjGNo8b0HZ5+AgMgCwYRGCe//XQOMAaAAzqDILgmpEZ/43RKHcQpHEQwbURfNQJpadJe2sz3q5FlQnTGXQ9oSMokidhlC+aR/IpNHieuBGLhFZ2GfnwVQ0geBbQpTPA==) (229 bytes): A port of my [TIC-80 256byte game](http://tic80.com/play?cart=1735) from LoveByte'21 +* [OhNoAnotherTunnel](https://exoticorn.github.io/microw8/v0.1pre4#Ag95rdCB5Ww5NofyQaKF4P1mrNRso4azgiem4hK99Gh8OMzSpFq3NsNDo7O7pqln10D11l9uXr/ritw7OEzKwbEfCdvaRnS2Z0Kz0iDEZt/gIqOdvFmxsL1MjPQ4XInPbUJpQUonhQq29oP2omFabnQxn0bzoK7mZjcwc5GetHG+hGajkJcRr8oOnjfCol8RD+ha33GYtPnut+GLe4ktzf5UxZwGs6oT9qqC61lRDakN) (177 bytes): A port of my [entry](http://tic80.com/play?cart=1871) in the Outline'21 bytebattle final +* [Technotunnel](https://exoticorn.github.io/microw8/v0.1pre4#AqL8HeK1M9dn2nWNIF5vaq/Vh64pMt5nJIFoFKpBMPUsGtDtpqjo1JbT9LzPhAxCqJ7Yh4TA6oTGd4xhLowf+cWZMY73+7AZmfXJJsBi4cej/hH+4wlAgxFIrnOYnr/18IpnZbsHf0eGm1BhahX74+cVR0TRmNQmYC7GhCNS3mv/3MJn74lCj7t28aBJPjEZhP9fGXdG2u5Egh/Tjdg=) (158 bytes): A port of my [entry](https://tic80.com/play?cart=1873) in the Outline'21 bytebattle quater final diff --git a/release/.gitignore b/release/.gitignore new file mode 100644 index 0000000..17ce02b --- /dev/null +++ b/release/.gitignore @@ -0,0 +1,2 @@ +/binaries +/build \ No newline at end of file diff --git a/release/make-release b/release/make-release new file mode 100755 index 0000000..b8d6121 --- /dev/null +++ b/release/make-release @@ -0,0 +1,54 @@ +#!/bin/bash + +set -e + +cd $(dirname $0) + +# build web runtime +pushd ../web +rm -rf .parcel-cache +yarn parcel build src/index.html +popd + +rm -rf build +mkdir -p build/microw8-linux +mkdir build/microw8-macos +mkdir build/microw8-windows + +# unzip binaries build by github actions +pushd binaries +unzip -o uw8-linux.zip +chmod +x uw8 +mv uw8 ../build/microw8-linux +unzip -o uw8-macos.zip +chmod +x uw8 +mv uw8 ../build/microw8-macos +unzip -o uw8-windows.zip +mv uw8.exe ../build/microw8-windows +popd + +for dir in build/*; do + mkdir $dir/examples + for example in ../examples/curlywas/*.cwa; do + cp $example $dir/examples + done + for example in ../examples/wat/*.wat; do + cp $example $dir/examples + done + + mkdir $dir/carts + for example in $dir/examples/*; do + build/microw8-linux/uw8 pack -l 9 $example $dir/carts/$(basename ${example%.*}).uw8 + done + + cp ../web/dist/index.html $dir/microw8.html + cp ../README.md $dir + cp ../UNLICENSE $dir +done + +VERSION=$(build/microw8-linux/uw8 version) + +cd build +tar czf microw8-$VERSION-linux.tgz microw8-linux +tar czf microw8-$VERSION-macos.tgz microw8-macos +zip -r -9 microw8-$VERSION-windows.zip microw8-windows \ No newline at end of file diff --git a/site/.SRCINFO b/site/.SRCINFO new file mode 100644 index 0000000..e69de29 diff --git a/site/static/v0.1/index.html b/site/static/v0.1/index.html new file mode 100644 index 0000000..4a42077 --- /dev/null +++ b/site/static/v0.1/index.html @@ -0,0 +1 @@ +MicroW8
MicroW8 0.1.0
\ No newline at end of file diff --git a/web/src/index.html b/web/src/index.html index 172399b..cbbd27e 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -9,6 +9,9 @@ +
+ MicroW8 0.1.0 +
diff --git a/web/src/style.css b/web/src/style.css index 3ba717b..34a4ccb 100644 --- a/web/src/style.css +++ b/web/src/style.css @@ -16,15 +16,19 @@ body { grid-template-rows: 1fr 0fr; } +#uw8 { + position: absolute; +} + +#uw8 a { + font-size: 130%; +} + #centered { align-self: center; justify-self: center; } -.footer { - color: #202420; -} - a { color: #303630; } @@ -69,7 +73,7 @@ button:active { background-color: #504450; } -@media (min-width: 680px) and (min-height: 560px) { +@media (min-width: 680px) and (min-height: 620px) { #screen { width: 640px; height: 480px;