Put the scaffolding behind ?debug, where it cannot answer the question
The heat meter, the district's standing, the road id and the name of the band you are in exist to tune curves, and every one of them works against the thing it measures. Phase 3's gate is telling occupied ground from liberated without being told, and there was a line on screen naming it. Phase 1's gate is avoiding a road for its history, with a numeric heat bar underneath it. Neither can be judged while reading the answer. Without ?debug the HUD is now speed, condition, parts and runs, the mission, and whether your cover is intact. The world has to say the rest: the light, the fog, who is standing in the street, and what is physically sitting in the road. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
baf534c4c4
commit
6c7e67cf79
@ -107,7 +107,7 @@ async function boot() {
|
|||||||
// is not until the player has actually touched something.
|
// is not until the player has actually touched something.
|
||||||
const audio = createAudio();
|
const audio = createAudio();
|
||||||
input.onGesture(() => audio.resume());
|
input.onGesture(() => audio.resume());
|
||||||
const hud = createHud(seed);
|
const hud = createHud(seed, DEBUG);
|
||||||
const board = createBoard();
|
const board = createBoard();
|
||||||
const driveState = createDriveState();
|
const driveState = createDriveState();
|
||||||
const areas = createAreas(model.roads, model.extent);
|
const areas = createAreas(model.roads, model.extent);
|
||||||
|
|||||||
@ -112,13 +112,24 @@ function questLines(quest: NonNullable<HudModel['quest']>): string[] {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createHud(seed: number) {
|
/**
|
||||||
|
* @param debug Show the scaffolding: heat values, the district's standing, the
|
||||||
|
* road you are on, and the name of the band you are in.
|
||||||
|
*
|
||||||
|
* These exist to tune curves, and every one of them actively works against
|
||||||
|
* the thing it is measuring. Phase 3's gate is telling occupied ground from
|
||||||
|
* liberated *without being told*, and there was a line on screen naming it.
|
||||||
|
* Phase 1's gate is avoiding a road because of its history, with a numeric
|
||||||
|
* heat meter sitting underneath it. You cannot judge either while reading the
|
||||||
|
* answer, so they live behind `?debug` and the world has to speak for itself.
|
||||||
|
*/
|
||||||
|
export function createHud(seed: number, debug = false) {
|
||||||
const el = document.getElementById('hud')!;
|
const el = document.getElementById('hud')!;
|
||||||
let last = 0;
|
let last = 0;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
update(speedMs: number, condition: CarCondition, now: number, model: HudModel) {
|
update(speedMs: number, condition: CarCondition, now: number, model: HudModel) {
|
||||||
// The HUD is debug scaffolding, not the real interface — 10 Hz is plenty.
|
// Text at 10 Hz. Nothing here changes fast enough to want a frame each.
|
||||||
if (now - last < 0.1) return;
|
if (now - last < 0.1) return;
|
||||||
last = now;
|
last = now;
|
||||||
|
|
||||||
@ -138,12 +149,16 @@ export function createHud(seed: number) {
|
|||||||
'',
|
'',
|
||||||
...(model.quest ? questLines(model.quest) : ['no mission — find a base']),
|
...(model.quest ? questLines(model.quest) : ['no mission — find a base']),
|
||||||
'',
|
'',
|
||||||
CONTROL_WORDS[model.control],
|
// Which band you are in is meant to be read off the light, the fog and
|
||||||
|
// who is standing in the street. Naming it hands over the answer.
|
||||||
|
...(debug ? [CONTROL_WORDS[model.control]] : []),
|
||||||
...pursuitLines(model.pursuit),
|
...pursuitLines(model.pursuit),
|
||||||
...(model.danger > 0 ? [`⚠ rounds in the air nearby (${model.danger})`] : []),
|
...(model.danger > 0 ? [`⚠ rounds in the air nearby (${model.danger})`] : []),
|
||||||
'',
|
'',
|
||||||
// Debug only. The real game signals heat through the road itself —
|
// Heat is meant to be read off what is physically sitting in the road,
|
||||||
// see the design brief: no numeric meter ships.
|
// so the meter that exists to tune it cannot also be on screen.
|
||||||
|
...(debug
|
||||||
|
? [
|
||||||
`[debug] road ${
|
`[debug] road ${
|
||||||
model.heat.segmentId === null
|
model.heat.segmentId === null
|
||||||
? 'off-route'
|
? 'off-route'
|
||||||
@ -152,7 +167,9 @@ export function createHud(seed: number) {
|
|||||||
`[debug] heat ${bar(model.heat.value)} ${model.heat.level ?? '—'}`,
|
`[debug] heat ${bar(model.heat.value)} ${model.heat.level ?? '—'}`,
|
||||||
`[debug] area ${bar(model.heat.area)}`,
|
`[debug] area ${bar(model.heat.area)}`,
|
||||||
'',
|
'',
|
||||||
`seed ${seed}`,
|
`[debug] seed ${seed}`,
|
||||||
|
]
|
||||||
|
: []),
|
||||||
`WASD drive · space handbrake · R respawn · X drop job at a base` +
|
`WASD drive · space handbrake · R respawn · X drop job at a base` +
|
||||||
` · M sound ${model.muted ? 'off' : 'on'}`,
|
` · M sound ${model.muted ? 'off' : 'on'}`,
|
||||||
'hold R to reset the campaign',
|
'hold R to reset the campaign',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user