Expand description
On-disk project layout used while developing a cart.
A Pixel8 project is a real Cargo crate plus an asset bundle:
mygame/
Cargo.toml # generated by `new`, builds a cdylib for wasm32
src/lib.rs # the game code edited inside Pixel8 (or outside!)
assets.pixel8.json # sprites/map/sfx/music/metadata (JSON, versioned)
target/ # cargo build outputKeeping the project a normal crate is what makes the external-editor
workflow work: cargo build --target wasm32-unknown-unknown from a
terminal produces exactly what the in-console run uses.
Structs§
- Project
- A loaded project: code + assets + where they live.
Constants§
- TEMPLATE_
CODE - Default game source created by
new.
Functions§
- decode_
assets - Parse an assets file, checking the format version.
- encode_
assets - Serialize assets as versioned, human-readable JSON.