Module 5 — Polish & Starshard Cove
Goal
Add audio, a clear HUD, juice, and ship the full Starshard Cove capstone (8 shards, ranks, title/pause/win).
Prerequisites
- Module 4 Toy Cove working
- Tiny3D + mixer toolchain from earlier setup
Lessons
| Lesson | Focus | ROM |
|---|---|---|
| L32 — Audio | mixer, WAV SFX, XM music | l32_audio |
| L33 — HUD | 2D text over 3D, timer | l33_hud |
| L34 — Juice | flash, bob, rumble, feedback | l34_juice |
| L38 — Save | EEPROM high score (eepromfs) | l38_save |
| L39 — Performance | Frame-time HUD | l39_perf |
| L35 — Capstone | Assemble full game | starshard_cove |
| L36 — Shipping | Checklist, next steps | docs |
Debugging foundations (any time): L37 — When it crashes · debugging reference.
Build
bash
source scripts/env.sh
make l32 l33 l34 l38 l39
make -C lessons/l37-debug # debugging (Module 0 page, any time)
make -C capstone/starshard-covePlay the finale:
bash
make -C capstone/starshard-cove
# starshard_cove.z64 — START to play, collect 8, beat the clock for GoldAudio pipeline
text
assets/*.wav → audioconv64 → filesystem/*.wav64
assets/*.xm → audioconv64 → filesystem/*.xm64Handled by common/lesson.mk. Call mixer_try_play() every frame.
Must match Opus sample rate: audio_init(48000, …) — see L32.
Patterns that must match the ROMs
Same as Module 4 gameplay, plus:
| Topic | Course convention |
|---|---|
| Audio | audio_init(48000) + wav64_init_compression(3) for Opus |
| VI / clear | FILTERS_RESAMPLE + opaque clear |
| Camera / move | camYaw free orbit; move from lagged eye→player; box wall |
| Snake facing | -yaw in the model matrix |
Scale & conventions · Module 4 patterns
Start: L32 — Audio.