Skip to content

Arcade

Short, replayable missions with a clear objective, strong sound and light, and a simple story — the example is Space Station Repair: an alarm, a hull breach, a ladder to climb, a leaking pipe to hold shut while hot pipes around it burn.

A game is 4–5 missions of rising difficulty. Voice lines, alarms and ambience beds are content, played with /sample/play. What this mode adds is the gameplay SuperCollider needs to react to, and the acoustic environment — the switch to muffled breathing and radio voices when the player “steps outside” is processing, not a different recording.

Mode id: arcade · Status: draft · Since: 0.2.0 · Spec: Prototype Use Cases, pp. 11–12

Load this mode with /mode/load and type tags ssi:

NetAddr("127.0.0.1", 57120).sendMsg('/mode/load', "arcade", "space-station", 0);

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

#NameTypeRange / defaultDescription
1gameIdsThe arcade game, e.g. “space-station”. For logs and processing presets.
2startMissioni0 – 9
default 0
Mission to begin at, so a class can resume where it stopped.

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
Mission scriptsBriefings, objectives, hazards and the order of voice lines.
Visual effectsStar-field lighting, the descending ladder, the pulsing pipe, red hot-pipe holds.

/mode/arcade/mission

engine → sc state since 0.2.0

A mission has started.

i missionIndex
i missionCount
s missionId
iis
missionIndex i int32 0 – 9
Zero-based.
missionCount i int32 1 – 10
Missions in the game.
missionId s string
e.g. "seal-the-leak". For logs and processing presets.
packet /mode/arcade/mission 0 5 seal-the-leak
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/mission', 0, 5, "seal-the-leak");
engine (C#) osc.Send(Osc.ModeArcadeMission, 0, 5, "seal-the-leak");

SuperCollider raises the music intensity with missionIndex / missionCount.

/mode/arcade/environment

engine → sc state since 0.2.0

The acoustic space the player is in.

s environment
s
environment s string "normal" | "alarm" | "radio" | "helmet"
normal — dry. alarm — a pulsing duck on everything, to sit an alarm on top. radio — voice band-limited and crackled. helmet — muffled outside world, close breathing, radio voice: the "stepped outside" sound.
packet /mode/arcade/environment helmet
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/environment', "helmet");
engine (C#) osc.Send(Osc.ModeArcadeEnvironment, "helmet");

Processing applied to what is already playing. The breathing bed itself is a looped sample the engine starts.

/mode/arcade/objective

engine → sc state since 0.2.0

The current objective — a hold to reach and keep hold of.

i holdId
f holdTime
s key
ifs
holdId i int32 hold index · 0 – holdCount−1
The target hold, e.g. the damaged pipe.
holdTime f float32 0.0 – 60.0seconds
How long it must be held. 0.0 means touching it is enough.
key s string
Sample key of the objective's sound, e.g. "space/leak-hiss". Looped by SuperCollider from its hold's position and faded as progress rises.
packet /mode/arcade/objective 196 5.0 space/leak-hiss
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/objective', 196, 5.0, "space/leak-hiss");
engine (C#) osc.Send(Osc.ModeArcadeObjective, 196, 5.0f, "space/leak-hiss");

/mode/arcade/objective/progress

engine → sc stream 20 Hz since 0.2.0

How far through the objective the player is.

f progress
f
progress f float32 0.0 – 1.0normalized
Fraction of holdTime held so far. Falls back if the player lets go, if the game says so.
packet /mode/arcade/objective/progress 0.45
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/objective/progress', 0.45);
engine (C#) osc.Send(Osc.ModeArcadeObjectiveProgress, 0.45f);

Sent only while the objective hold is touched, and once with the final value when it is released. The hiss fades as this rises — absolute, so a dropped frame is invisible.

/mode/arcade/objective/complete

engine → sc event since 0.2.0

The objective was achieved.

i missionIndex
i
missionIndex i int32 0 – 9
The mission whose objective this was.
packet /mode/arcade/objective/complete 0
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/objective/complete', 0);
engine (C#) osc.Send(Osc.ModeArcadeObjectiveComplete, 0);

Stops the objective sound fully and plays the reward cue. The engine then plays the "climb back down" instructions and the next briefing.

/mode/arcade/hazard

engine → sc event since 0.2.0

The player touched a hazard.

i holdId
s key
is
holdId i int32 hold index · 0 – holdCount−1
The hazard hold, e.g. a hot pipe.
key s string
Sample key of the hazard sound, e.g. "space/sizzle".
packet /mode/arcade/hazard 175 space/sizzle
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/hazard', 175, "space/sizzle");
engine (C#) osc.Send(Osc.ModeArcadeHazard, 175, "space/sizzle");

Played from the hazard's position. The warning narration that follows is a separate /sample/play on the voice bus.

/mode/arcade/complete

engine → sc event since 0.2.0

The game is over.

i missionsCompleted
i missionCount
f elapsed
iif
missionsCompleted i int32 0 – 10
Missions finished.
missionCount i int32 1 – 10
Missions in the game.
elapsed f float32 seconds
Total play time.
packet /mode/arcade/complete 5 5 412.0
SuperCollider NetAddr("127.0.0.1", 57120).sendMsg('/mode/arcade/complete', 5, 5, 412.0);
engine (C#) osc.Send(Osc.ModeArcadeComplete, 5, 5, 412.0f);