last preparations for 0.1.0 release

This commit is contained in:
2022-01-13 06:20:00 +01:00
parent 179b3eaed1
commit c9ae04e652
8 changed files with 132 additions and 6 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
/target
.cargo/
.vscode/
/examples/**/*.wasm
/examples/**/*.uw8

View File

@@ -1 +1,61 @@
See [here](https://exoticorn.github.io/microw8/).
# 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 [<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:
-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 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](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

2
release/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/binaries
/build

54
release/make-release Executable file
View File

@@ -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

0
site/.SRCINFO Normal file
View File

File diff suppressed because one or more lines are too long

View File

@@ -9,6 +9,9 @@
</style>
</head>
<body>
<div id="uw8">
<a href="https://exoticorn.github.io/microw8">MicroW8</a> 0.1.0
</div>
<div id="centered">
<canvas id="screen" width="320" height="240"></canvas>
<div id="message"></div>

View File

@@ -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;