Skip to content

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

LessonFocusROM
L32 — Audiomixer, WAV SFX, XM musicl32_audio
L33 — HUD2D text over 3D, timerl33_hud
L34 — Juiceflash, bob, rumble, feedbackl34_juice
L38 — SaveEEPROM high score (eepromfs)l38_save
L39 — PerformanceFrame-time HUDl39_perf
L35 — CapstoneAssemble full gamestarshard_cove
L36 — ShippingChecklist, next stepsdocs

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

Play the finale:

bash
make -C capstone/starshard-cove
# starshard_cove.z64 — START to play, collect 8, beat the clock for Gold

Audio pipeline

text
assets/*.wav → audioconv64 → filesystem/*.wav64
assets/*.xm  → audioconv64 → filesystem/*.xm64

Handled 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:

TopicCourse convention
Audioaudio_init(48000) + wav64_init_compression(3) for Opus
VI / clearFILTERS_RESAMPLE + opaque clear
Camera / movecamYaw free orbit; move from lagged eye→player; box wall
Snake facing-yaw in the model matrix

Scale & conventions · Module 4 patterns

Start: L32 — Audio.

N64 Educator v1.2.2 — libdragon + Tiny3D · branch master