Macroquad Quickstart
February 18, 2025 ยท View on GitHub
Opinionated template for buiding games in Rust with Macroquad, specfically focused on targeting the web and PC.
๐จ work in progress, automation shell scripts target on Linux & macOS currently ๐จ
Features / Bugs
- gamepad support for desktop and web
- scripts for generating cross-platform builds
- game settings
- easy save data (supports web too!)
- draws to a 1280x720 render target by default
- generate list of open source licenses for used crates
- helpful utility functions
- shell scripts for doing pretty much everything (they don't work on Windows, sorry)
- easily push your game to itch.io
Get Started
Use the template feature on GitHub or just download the zip.
Dev Tools
In debug builds, Shift + Esc quits quickly.
Dev Notes
- Run
./serve_wasm.shto boot a web server (run./deps.shfirst) and then./build_wasm.shto update the WASM build - the JS shims in web are explicitly checked in in case the hosted versions disappear & to have versions match
Deployment
Web
WASM builds can be built and pushed by running:
./release_wasm.sh
Ideally in the future this would push builds for desktop operating systems, create tags, etc., but this works for development.
macOS
macOS uses cargo bundle:
- Install cargo bundle:
cargo install cargo-bundle - Build the bundle:
cargo bundle --release
There's a release_macos.sh script to build and upload a Universal app for macOS (works on both Intel and Apple Silicon Macs).
Windows
Not ideal but functioning
cargo run --releasemkdir wincp .\target\release\sokoworld.exe .\win\- copy the assets folder into the
windir - zip it up
- upload it to itch.io manually
Linux
Run the script:
./release_linux.sh
License
The Macroquad Quickstart template code and assets are released into the Public Domain.