Chase the Shape
A geometric shape travels back and forth across the wall. Players press every hold that belongs to the shape to complete it before it moves on. Each hit gets a short cue; a completed shape gets a success cue.
Up to four children play at once, each in their own zone with their own shape. Everything a zone does is tagged with its zone index, so SuperCollider can place each child’s sounds on their side of the room and keep the four games audibly apart.
The engine owns the shape, its movement and the hit rule. In particular, a hold that was already being touched when the shape arrived does not count — the engine enforces that, and only reports hits that counted.
Mode id: chase · Status: draft · Since: 0.2.0 · Spec: Prototype Use Cases, p. 1
Loading
Section titled “Loading”Load this mode with /mode/load and type tags sisifs:
NetAddr("127.0.0.1", 57120).sendMsg('/mode/load', "chase", 1, "line", 3, 0.5, "chimes");Init parameters
Section titled “Init parameters”Sent in this exact order, immediately after the mode id.
| # | Name | Type | Range / default | Description |
|---|---|---|---|---|
| 1 | zoneCount | i | 1 – 4 default 1 | Simultaneous play zones, one child each. Each zone runs its own shape. |
| 2 | shape | s | line, square, triangle, cross, zigzagdefault line | Shape type. Every zone uses the same shape. |
| 3 | shapeSize | i | 2 – 6 default 3 | Size of the shape in holds along its longest side. |
| 4 | speed | f | 0.1 – 2.0 holds per second default 0.5 | Movement speed. SuperCollider uses it to set the tempo of the moving shape’s own sound, so it travels audibly at the pace it travels visibly. |
| 5 | soundSet | s | chimes, marimba, retrodefault chimes | Palette for hit and success cues. |
Runtime parameters
Section titled “Runtime parameters”Changed while the mode runs, with /mode/param name value. Always a float, always clamped, never an error if the name is unknown.
| Name | Range / default | Description |
|---|---|---|
speed | 0.1 – 2.0 holds per second default 0.5 | Change movement speed mid-game, e.g. to make it harder. |
NetAddr("127.0.0.1", 57120).sendMsg('/mode/param', "speed", 0.5);Configured in the engine
Section titled “Configured in the engine”Settings from the use case that never cross the wire. The engine applies them; SuperCollider does not need them, so they are not in the protocol.
| Setting | |
|---|---|
| Hold colours | Colour of shape holds, activated holds and the success animation. |
| Success animation style | Purely visual. |
| Movement path | The shape stays inside its zone, travelling back and forth; the engine plans the path. |
Messages
Section titled “Messages”/mode/chase/spawn
A new shape has appeared in a zone.
iis -
zonei int32 zone index · 0 – zoneCount−1 - Which zone, 0 leftmost.
-
holdCounti int32 1 – 36 - How many holds make up this shape — the hits needed to complete it.
-
shapes string "line" | "square" | "triangle" | "cross" | "zigzag" - The shape type, echoed so each shape can have its own sound.
/mode/chase/spawn 0 3 line NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/spawn', 0, 3, "line"); osc.Send(Osc.ModeChaseSpawn, 0, 3, "line"); /mode/chase/move
Where each zone's shape currently is.
iff -
zonei int32 zone index · 0 – zoneCount−1 - Which zone.
-
xf float32 0.0 – 1.0normalized - Horizontal centre of the shape across the whole wall, 0.0 left edge.
-
yf float32 0.0 – 1.0normalized - Vertical centre of the shape, 0.0 bottom.
/mode/chase/move 0 0.18 0.42 NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/move', 0, 0.18, 0.42); osc.Send(Osc.ModeChaseMove, 0, 0.18f, 0.42f); One message per zone per frame, so four zones is 40 messages a second — well inside what sclang handles. Absolute positions: a dropped frame corrects itself on the next.
/mode/chase/hit
A hold in the shape was pressed in time.
iiii -
zonei int32 zone index · 0 – zoneCount−1 - Which zone.
-
holdIdi int32 hold index · 0 – holdCount−1 - The hold that was activated.
-
activatedi int32 1 – 36 - Holds activated in this shape so far, including this one.
-
holdCounti int32 1 – 36 - Holds in the shape. activated == holdCount means complete.
/mode/chase/hit 0 43 2 3 NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/hit', 0, 43, 2, 3); osc.Send(Osc.ModeChaseHit, 0, 43, 2, 3); Only hits that count are sent: a hold already held when the shape arrived is not a hit until it is released and pressed again. SuperCollider rises in pitch with activated / holdCount, so progress is audible.
/mode/chase/complete
Every hold in a zone's shape has been activated.
iif -
zonei int32 zone index · 0 – zoneCount−1 - Which zone.
-
completedi int32 1 – 9999 - Shapes this zone has completed this game, including this one.
-
durationf float32 seconds - Time from spawn to completion.
/mode/chase/complete 0 4 6.8 NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/complete', 0, 4, 6.8); osc.Send(Osc.ModeChaseComplete, 0, 4, 6.8f); Plays the success cue. The engine then sends /mode/chase/spawn for the zone's next shape when it is ready.