Skip to content

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

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");

Sent in this exact order, immediately after the mode id.

#NameTypeRange / defaultDescription
1zoneCounti1 – 4
default 1
Simultaneous play zones, one child each. Each zone runs its own shape.
2shapesline, square, triangle, cross, zigzag
default line
Shape type. Every zone uses the same shape.
3shapeSizei2 – 6
default 3
Size of the shape in holds along its longest side.
4speedf0.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.
5soundSetschimes, marimba, retro
default chimes
Palette for hit and success cues.

Changed while the mode runs, with /mode/param name value. Always a float, always clamped, never an error if the name is unknown.

NameRange / defaultDescription
speed0.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);

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 coloursColour of shape holds, activated holds and the success animation.
Success animation stylePurely visual.
Movement pathThe shape stays inside its zone, travelling back and forth; the engine plans the path.

/mode/chase/spawn

engine → sc event since 0.2.0

A new shape has appeared in a zone.

i zone
i holdCount
s shape
iis
zone i int32 zone index · 0 – zoneCount−1
Which zone, 0 leftmost.
holdCount i int32 1 – 36
How many holds make up this shape — the hits needed to complete it.
shape s string "line" | "square" | "triangle" | "cross" | "zigzag"
The shape type, echoed so each shape can have its own sound.
packet /mode/chase/spawn 0 3 line
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/spawn', 0, 3, "line");
engine (C#) osc.Send(Osc.ModeChaseSpawn, 0, 3, "line");

/mode/chase/move

engine → sc stream 10 Hz since 0.2.0

Where each zone's shape currently is.

i zone
f x
f y
iff
zone i int32 zone index · 0 – zoneCount−1
Which zone.
x f float32 0.0 – 1.0normalized
Horizontal centre of the shape across the whole wall, 0.0 left edge.
y f float32 0.0 – 1.0normalized
Vertical centre of the shape, 0.0 bottom.
packet /mode/chase/move 0 0.18 0.42
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/move', 0, 0.18, 0.42);
engine (C#) 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

engine → sc event since 0.2.0

A hold in the shape was pressed in time.

i zone
i holdId
i activated
i holdCount
iiii
zone i int32 zone index · 0 – zoneCount−1
Which zone.
holdId i int32 hold index · 0 – holdCount−1
The hold that was activated.
activated i int32 1 – 36
Holds activated in this shape so far, including this one.
holdCount i int32 1 – 36
Holds in the shape. activated == holdCount means complete.
packet /mode/chase/hit 0 43 2 3
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/hit', 0, 43, 2, 3);
engine (C#) 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

engine → sc event since 0.2.0

Every hold in a zone's shape has been activated.

i zone
i completed
f duration
iif
zone i int32 zone index · 0 – zoneCount−1
Which zone.
completed i int32 1 – 9999
Shapes this zone has completed this game, including this one.
duration f float32 seconds
Time from spawn to completion.
packet /mode/chase/complete 0 4 6.8
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/chase/complete', 0, 4, 6.8);
engine (C#) 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.