Our Game-Off 2022 game jam participation
Theme: Cliché
Our game is written in Rust with the good-web-game crate. It can be compiled as an HTML 5 game, natively to Linux and Windows, and for Android.
You can see a preview of the current main
branch at our Github Page.
Or get the "stable" version from our itch.io page.
Sail your ship in the winds of the sea and catch fish to sell them.
Key | Function |
---|---|
W | Up |
Hoist the sails |
S | Down |
Take in the sails |
A | Left |
Turn left |
D | Right |
Turn right |
E |
Sell fish (at a harbor) |
R |
Upgrade Sail (at a harbor) |
F |
Upgrade Hull (at a harbor) |
1 |
Toggle sounds |
2 |
Toggle music |
PgUp | Zoom in |
PgDown | Zoom out |
Backspace | Reset zoom |
Esc |
Quit |
F11 |
Enter full screen |
In order to build this game from source, you need a decent Rust compiler and the Cargo package manager, you can get both from here.
Also since we put the assets into a sub-module, you need to initialize it first:
git submodule update --init
On Linux you need at least the following additional libraries:
libasound2-dev
libudev-dev
blender
This list omits "default" libraries.
The native requirements for other OSes are undetermined yet.
In order to cross-compile from Linux to windows you need a C cross-compiler, best to use GCC:
gcc-mingw-w64-x86-64
And of course the Rust target:
rustup target add x86_64-pc-windows-gnu
You might also want to install wine
for testing the results.
For building a WASM assembly, you need the WASM32 target, if you have
rustup
you can easily add WASM32 support via:
rustup target add wasm32-unknown-unknown
Additionally, to easily serve such a WASM assembly, you might like some simple HTTP server that dose just that, such as simple-http-server, which you can install via Cargo:
cargo install simple-http-server
To run this game natively, just execute the following:
cargo run
cargo build --target x86_64-pc-windows-gnu --release
If you have wine
you can run the exe
file via:
wine target/x86_64-pc-windows-gnu/release/gwg-prep.exe
To run this game via WASM in a browser you first have to build the WASM assembly via:
./build-web.sh
And then you can serve the generated target/web-pkg
with whatever plain HTTP server you like, e.g.:
simple-http-server --index --nocache target/web-pkg
And head to http://localhost:8000
Despite the fact that this project transitively depends on wasm-bindgen
, we don't use it as a build tool.
I.e. we don't use a wasm-bindgen
JS-glue, but instead the Macroquad's JS-glue (that also contains the miniquad WebGL stuff).
For some reason it all just happen to work, let's see when it breaks.
In order to build for Android, we use a cargo-apk
variation from notfl3,
which is just a Docker image with all the build tools. Well actually, we
additionally need the libz
and blender
.
Anyway, you can build the game for Android via using the following Docker container:
docker run -it --rm -v $(pwd):/root/src -w /root/src notfl3/cargo-apk
And executing the following sequence of command therein
apt update
apt install libz-dev blender
cargo quad-apk build --release
Licensed under Apache License, Version 2.0 (LICENSE or https://www.apache.org/licenses/LICENSE-2.0).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.