# Dojo Octave: An Ink-Wash Duel Won by Melody

> Win a martial-arts duel without draining any health bar, in one offline HTML file: two duellists on a ring of eight trigram stances, and every clean strike lights one of the eight notes on your opponent — complete the octave to play the winning melody. Paper-and-ink arena, top octave ring, bottom-centre HUD and synthesised bianzhong audio.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Game creation](https://www.sandbase.ai/skills/games)
- Version: 0.1.0
- Runs online: yes
- Page: https://www.sandbase.ai/skills/games/dojo-octave

## What you get

Bring the arena, the stances and the victory condition, and optionally the note layout, the strike feel, the HUD layout and the UI text. The Skill returns a downloadable Skill (the duel project, a customize guide, headless verification) and one playable example bout.

## Install

Download the Skill package from https://www.sandbase.ai/skills/games/dojo-octave (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/dojo-octave make an ink-wash duel where the player wins by <your victory condition> instead of draining health, on <your arena>
```

## How it works

1. **Copy the ink-wash duel** Dojo Octave starts with node scripts/new-project.mjs --out my-dojo and npm ci, which fetches Vite, three.js and playwright-core. Your coding agent reads references/customize.md for the trigram table, the duel AI, the octave-ring HUD, the palette and the audio, and what each change breaks. A prompt names your victory condition and your arena, for example a bamboo courtyard won by lighting eight lanterns.
2. **Retune stances, strikes and melody** Each of the eight stances, geon, tae, li, jin, son, gam, gan and gon, owns a note, a reach and a damage range. The floor, sky, ring and posts are canvas-drawn in src/utils/ink-world.js, the fighters are built from primitives in src/classes/Fighter.js and all audio comes from src/utils/synth-audio.js. The page needs WebGL2 and no network.
3. **Build, sandbox-preview and shoot** npm run build:single writes dist-single/index.html, about 0.5 MB. npm run preview:sandbox serves it under the sandbox CSP, and npm run shoot needs local Chrome, with SwiftShader acceptable. Look at shots/*.jpg and shots/report.json until all 28 checks pass. The rest and cool steps pause the rival AI so the eight-note sequence runs deterministically, while rivalHits still counts landed hits.

## FAQ

### How do you win a Dojo Octave bout?

Dojo Octave is won by collecting all eight trigram notes on your opponent, not by draining a health bar. Each landed strike lights one note on the octave ring and plays its gong pitch. Light all eight and the winning melody plays them back in gong order, showing OCTAVE COMPLETE.

### What are the Dojo Octave controls?

Dojo Octave uses the left and right arrows to move along the cinnabar ring, keys 1 to 8 to throw that trigram's strike and Space to step back. Pointer lock is requested only when the page runs top-level; inside a sandboxed iframe, aiming still works through the arrow keys.

### Is Dojo Octave a realistic martial-arts game?

No. Dojo Octave's fighters are stylised wireframe figures, not physics bodies, and every strike is one named trigram technique, so there are no combos. It is not for multiplayer or for games that must fetch models or audio at runtime.

### Does Dojo Octave need a key or downloaded assets?

No. Dojo Octave needs no key and calls no model, so a bout costs nothing. Every texture is canvas-drawn and every sound is WebAudio-synthesised, and the page uses no network. three.js accounts for most of the file size.

### Where do the Dojo Octave licences live?

Dojo Octave's Apache-2.0 licence ships verbatim in assets/dojo-octave/LICENSE, and npm run build:single embeds the licences as an HTML comment at the top of the built file. Never strip that comment. npm dependencies keep their own licences.

### Does Dojo Octave pause when the tab is hidden?

Yes. Dojo Octave's duel runs on wall-clock time through requestAnimationFrame timers, so pausing the tab pauses the world.

## Examples

- Dojo Octave ink-wash duel (scene)
- First Bout (video)
