diff --git a/llms-full.txt b/llms-full.txt index a663a8e..a8ad25f 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -348,7 +348,7 @@ Text version of the interactive map: This map needs JavaScript. ## Company - [Consulting and partnerships](https://syberlabs.io/services/): AI consulting, custom builds and design partnerships from SyberLabs. We build agent systems in which software runs the checks, every step is logged in a signed record and a person approves before anything ships. -- [PSYCHO SYBER](https://syberlabs.io/psycho-syber/): PSYCHO SYBER is a browser game from SyberLabs. Six stages: one each for Attest, RISE, FLYSPACE, SyberWork and Lacuna Institute, and a last stage that has no exit. Keyboard and mouse, or touch. +- [PSYCHO SYBER](https://syberlabs.io/psycho-syber/): A SyberLabs browser stealth game: a stage each for Attest, RISE, FLYSPACE, SyberWork and Lacuna Institute, and a sixth with no exit. Keyboard, mouse or touch. ## Account diff --git a/llms.txt b/llms.txt index b68d040..f75c5a9 100644 --- a/llms.txt +++ b/llms.txt @@ -66,7 +66,7 @@ This file is generated from the site’s own data (projects/site-data.js in gith ## Company - [Consulting and partnerships](https://syberlabs.io/services/): AI consulting, custom builds and design partnerships from SyberLabs. We build agent systems in which software runs the checks, every step is logged in a signed record and a person approves before anything ships. -- [PSYCHO SYBER](https://syberlabs.io/psycho-syber/): PSYCHO SYBER is a browser game from SyberLabs. Six stages: one each for Attest, RISE, FLYSPACE, SyberWork and Lacuna Institute, and a last stage that has no exit. Keyboard and mouse, or touch. +- [PSYCHO SYBER](https://syberlabs.io/psycho-syber/): A SyberLabs browser stealth game: a stage each for Attest, RISE, FLYSPACE, SyberWork and Lacuna Institute, and a sixth with no exit. Keyboard, mouse or touch. ## Account diff --git a/psycho-syber/README.md b/psycho-syber/README.md index b531165..77b33c2 100644 --- a/psycho-syber/README.md +++ b/psycho-syber/README.md @@ -24,7 +24,7 @@ say are in the repository's `CLAUDE.md`, under "PSYCHO SYBER". This file and `te ## Checks - node psycho-syber/test/run.mjs every stage to its exit, the Atlas list against src/lacuna/atlas/sites.js, and the narrator's recordings against the story + node psycho-syber/test/run.mjs every stage to its exit, the Atlas list against src/lacuna/atlas/sites.js, the narrator's recordings against the story, and the rules a clean run never trips node psycho-syber/test/run.mjs works --log one stage, with the player's position after each script entry node psycho-syber/test/run.mjs machu:weaver one route of one stage @@ -69,6 +69,7 @@ Measured by `test/probe.mjs`. Design inside these numbers. gates down a column `|` lit, `!` blinking, `i` lit by the alarm, `f` fed by a source · the same along a row `-` `~` `a` `g`. Settings go with the character: `m.put(x, y, 'S', { id: 'a' })`. `parseLevel` in `sim.js` lists every setting. +A ring takes `dx` and `dy`, pixels off the centre of its tile. ## Adding or changing a stage @@ -81,6 +82,32 @@ Settings go with the character: `m.put(x, y, 'S', { id: 'a' })`. `parseLevel` in A tall stage (`order: 'up'`) must not use gates or doors that run down a column. +## What play has shown + +On November 18, 2026 the game was played by a tester that had not seen it, in the page and with 5.6 million steps of +random and clumsy input against `sim.js`. What it found is now checked by `run.mjs` (the `rule:` lines under +"found by play"), and a new stage should keep to the same things: + +- A ring over a wall hangs just past the wall's near edge (`{ dx: -6 }` on the wall's first column), so it is in + sight from the foot of the wall. One tile further in, the wall's corner hides it from anyone who walks up to the + wall, and the cord takes the wall's face. +- A way that ends at a wall gets a hint at the wall that says so and says where the way on is. Stage 1 has one under + its last stair and stage 2 has one in the ravine. +- A fall that costs a whole climb gets somewhere to land halfway: the two beams under the fourth and fifth words of + stage 2's first climb. They are lower than the word above them, so they are no part of the way up. +- A standing stone comes before the first place a stage kills: stage 3 has one before its first gate. +- The jaguar takes hold of stone from the ground when up is held, with no jump. On touch the stick's up is not a jump + (`main.js`), and a hint that says "push into stone and hold up" has to be true there too. +- `R` is an input to `sim.js` (`resetP`), which ends the attempt the ordinary way. The page must not move or + hurt the player itself: the cord pulled such a player back, alive and at no health. +- `cord()` moves the weaver in pieces of 6 px. `moveX` and `moveY` test only where a move ends, so nothing may + call them with more than a tile at once. +- Down and jump lets go of a beam or a word. On stone it is a jump. +- In the last stage the place the machine orders you to is as far as your form can run in the 0.7 seconds it gives. + `g.judged` says whether the run reached the verdict, and the ending says the verdict was late only when it did. +- `g.shifts` counts every change of form and is what the ending reads back. `g.swaps` counts the changes into the + jaguar and is what holds a `weaver` run to none. + ## More than one way through Each of the first five stages has a run under `id:weaver` that never takes the jaguar's form, and `run.mjs` fails diff --git a/psycho-syber/game/levels.js b/psycho-syber/game/levels.js index 8d25e6e..f152d2e 100644 --- a/psycho-syber/game/levels.js +++ b/psycho-syber/game/levels.js @@ -36,13 +36,13 @@ const steps = wide(24, [ R('#', 24), R('#', 24), ], - [ // C · a wall the cord gets you over - ' o ', + [ // C · a wall the cord gets you over. The ring hangs just past the wall's near edge (props.o), in sight from its foot + ' o ', R(' ', 26), R(' ', 26), ' t ', ...rep(' ########## ', 4), - ' ? ########## ', + ' ? ########## ', ...base(26), ], [ // D · swing across the thorns @@ -105,7 +105,7 @@ const steps = wide(24, [ R(' ', 10) + '22 M' + R('#', 13), R(' ', 8) + '11 M' + R('#', 13), R(' ', 6) + '11 M' + R('#', 13), - ' ?' + R(' ', 17) + 't' + R(' ', 9) + 'M' + R('#', 13), + ' ?' + R(' ', 17) + 't' + R(' ', 5) + '?' + R(' ', 3) + 'M' + R('#', 13), // the second hint is at the wall the floor ends at: this way is closed ...base(44), ], ]); @@ -143,12 +143,14 @@ function machu() { m.box(41, 26, 55, 40).col(41, 26, 33, 'M'); // the far terrace for (let y = 24; y >= 10; y -= 2) m.put(53, y, '==='); // the stone stair m.box(49, 9, 55, 9, '='); // the top: a beam, so a jump from below passes through it - m.put(3, 40, '@').hint(6, 39, 'Words light one at a time. Jump to the next while it is lit. Or take the stair inside the wall.'); + m.put(3, 40, '@').hint(8, 39, 'Words light one at a time. Jump to the next while it is lit. Or take the stair inside the wall.'); for (let k = 0; k < 7; k++) m.put(k % 2 ? 8 : 12, 39 - k * 2, 'WWWW'); - m.put(22, 24, 'C').hint(21, 23, 'These four flash too fast to cross. As the jaguar, roar (E) while they are lit and run. As the weaver, check the pace setter in the ravine.'); + m.put(8, 34, '====').put(12, 32, '===='); // a perch under the fourth word and the fifth: a fall from the upper words lands halfway, and not at the foot + m.put(22, 24, 'C').hint(21, 23, 'Too fast to cross. Jaguar: roar (E) while they light and run. Weaver: check the pace setter in the ravine.'); ['TOO', 'FAST', 'TO', 'READ'].forEach((text, k) => m.put(25 + k * 4, 25, 'WWWW', { i: 0, n: 6, beat: 0.6, text, w: 4 })); - m.put(32, 33, 'P').hint(30, 33, 'E sets the pace of every word: fast or slow. It stays until you check it again.'); - m.put(43, 25, 'C').hint(44, 24, 'The jaguar jumps three tiles from word to word. The stone stair on the right takes longer.'); + m.put(32, 33, 'P').hint(30, 33, 'As the weaver, E sets every word slow or fast until you check it again. The beams on the left climb out.'); + m.hint(39, 33, 'Nothing this way. The beams at the left end of the ravine climb out.'); + m.put(43, 25, 'C').hint(44, 24, 'The jaguar jumps three tiles up, word to word. The stair on the right takes longer.'); ['ONE', 'WORD', 'AT', 'A', 'TIME'].forEach((text, k) => m.put(k % 2 ? 49 : 45, 23 - k * 3, 'WWWW', { i: k, n: 5, beat: 0.7, text })); m.put(53, 8, 'X'); for (const [x, y] of [[13, 37], [9, 35], [14, 29], [32, 29], [35, 33], [46, 21], [50, 12], [54, 17]]) m.put(x, y, 't'); @@ -164,23 +166,23 @@ function lines() { m.box(0, 20, 149, 23); // A · one gate, one source, on a column the cord reaches m.put(3, 19, '@').hint(6, 18, 'A gate burns while its source is alive.'); - m.box(16, 15, 21, 19).put(17, 11, 'o').put(20, 14, 'S', { id: 'a' }); - m.hint(11, 18, 'Shift: the jaguar sees the line from each gate to its source. Reach the source, then press E as the weaver.'); - wall(30, 'a'); + m.box(16, 15, 21, 19).put(16, 11, 'o', { dx: -6 }).put(20, 14, 'S', { id: 'a' }); + m.hint(15, 18, 'Shift: the jaguar sees the line from each gate to its source. Reach the source, then press E as the weaver.'); + m.put(25, 19, 'C'); wall(30, 'a'); // a standing stone before the first gate: most falls in this stage are at it // B · the village m.hint(37, 18, 'Visitors walk among the people. The jaguar sees which are which.'); m.put(44, 19, '##').put(64, 19, '##').put(47, 17, '=====').put(58, 17, '====='); m.put(56, 19, 'w', { mimic: true }); for (const x of [40, 50, 53, 60, 68]) m.put(x, 19, 'v'); // C · the source is on the tower; a watched source stands by the gate - m.put(70, 19, 'C').hint(73, 18, 'Follow the line. Stone is the jaguar\'s to climb. The steps beside it are the weaver\'s.'); + m.put(70, 19, 'C').hint(73, 18, 'Follow the line. The jaguar climbs the stone. The weaver takes the beams beside it.'); for (const y of [18, 16, 14, 12, 10]) m.put(76, y, '=='); m.box(78, 8, 82, 19).put(83, 8, '==').put(81, 7, 'S', { id: 'b' }); // the beam is a perch to throw from - m.hint(80, 6, 'From up here your glass reaches the Visitor below. A source with no line is watched: leave it.'); + m.hint(80, 6, 'From up here your glass reaches the warden below. A source with no line is watched: leave it.'); m.put(92, 19, 'w').put(96, 19, 'S', { trap: true }); wall(100, 'b'); // D · three sources, two gates, crossed lines - m.put(104, 19, 'C').hint(108, 18, 'Three sources, two gates. Check only the sources that have a line. The jaguar can break a source with a pounce, and that is loud.'); + m.put(104, 19, 'C').hint(108, 18, 'Three sources, two gates. Check only the two with a line. A jaguar pounce breaks a source, but raises the alarm.'); m.put(112, 19, 'S', { id: 'c' }).put(116, 19, '##').put(116, 18, 'S', { trap: true }).put(121, 19, 'S', { id: 'd' }); wall(126, 'd'); wall(134, 'c'); m.put(143, 19, 'X'); @@ -200,21 +202,21 @@ function works() { bulk(14); m.col(14, 16, 19, '!', { period: 2.4, duty: 0.5, ph: 0 }); bulk(22); m.col(22, 16, 19, '!', { period: 2.4, duty: 0.5, ph: 1.2 }); // CHECK · a sentinel over the hall, a Visitor on the floor - m.put(26, 19, 'C').put(30, 12, 'L', { text: 'CHECK' }).hint(30, 18, 'E on a sentinel turns it. For twelve seconds it shoots for you.'); + m.put(26, 19, 'C').put(30, 12, 'L', { text: 'CHECK' }).hint(30, 18, 'As the weaver, E turns a sentinel. For twelve seconds it shoots for you.'); m.put(40, 15, 's', { dx: 12, speed: 36 }).put(44, 19, '##').put(60, 19, '##').put(54, 19, 'w'); // REVIEW · the eye, the gate it lights, and a bulkhead only the jaguar fits under m.put(64, 19, 'C').put(66, 12, 'L', { text: 'REVIEW' }); m.hint(67, 18, 'An eye that sees you raises the alarm and lights the gate ahead. Glass breaks an eye. E switches it off.'); m.box(72, 8, 90, 9, 'M').put(81, 10, 'e', { base: 90, sweep: 50, period: 4, range: 150, fov: 20 }); bulk(92); m.col(92, 16, 19, 'i'); - m.hint(94, 18, 'Shift: the jaguar fits under the bulkhead. Or check the terminal behind you, which opens the duct above the tunnel.'); + m.hint(94, 18, 'Shift: the jaguar fits under the bulkhead. Or press E at the terminal behind you to open the duct above.'); m.box(96, 0, 103, 18, 'M').put(88, 19, 'T', { opens: 'duct' }); for (let x = 96; x <= 103; x++) m.put(x, 18, 'D', { id: 'duct' }); // APPROVE · three sources feed the Approver: one on the floor, one on a block, one under the dais m.put(105, 19, 'C').put(106, 12, 'L', { text: 'APPROVE' }).hint(107, 18, 'Three sources feed the Approver. The jaguar sees the lines. Cut all three.'); m.put(110, 19, 'S', { core: true }); - m.box(116, 15, 121, 19).put(117, 11, 'o').put(120, 14, 'S', { core: true }); - m.hint(124, 18, 'One source is under the floor. Go in as the jaguar and stand up as the weaver. Or check it through the grate on the dais.'); + m.box(116, 15, 121, 19).put(116, 11, 'o', { dx: -6 }).put(120, 14, 'S', { core: true }); + m.hint(124, 18, 'One source is under the dais. Go in as the jaguar and stand up as the weaver, or check it through the grate.'); m.box(132, 18, 143, 19, 'M').box(128, 20, 131, 20, 'M'); // the dais, and a lip the jaguar cannot cling to m.box(126, 20, 127, 21, ' ').box(128, 21, 135, 21, ' ').box(136, 20, 139, 21, ' '); // the way under it m.box(137, 18, 138, 19, '='); // a grate in the dais @@ -224,7 +226,7 @@ function works() { m.hint(148, 18, 'E at the terminal. Now a person approves.').put(150, 19, 'T', { opens: 'pub' }); m.box(154, 0, 154, 15, 'M').col(154, 16, 19, 'D', { id: 'pub' }); // PUBLISH - m.put(156, 12, 'L', { text: 'PUBLISH' }).put(160, 19, 'X').put(163, 19, 'R', { far: 240, line: 'The Patron: "You put a person where my machine stood. I own the Works that built it. Come to my sale."' }); + m.put(156, 12, 'L', { text: 'PUBLISH' }).put(160, 19, 'X').put(163, 19, 'R', { far: 240, line: 'The Patron: "You put a person where my machine stood. I own the Works. Come to my sale."' }); for (const [x, y] of [[18, 17], [36, 16], [52, 16], [76, 16], [99, 19], [118, 12], [131, 21], [141, 16]]) m.put(x, y, 't'); m.put(10, 17, 'A', mark('antikythera')).put(70, 17, 'A', mark('baghdad')).put(158, 17, 'A', mark('gobekli')); return m.done(); @@ -254,10 +256,10 @@ function record() { m.hint(17, 18, 'A record with a gap is evidence. Find all five, then go to the far door.'); lot(22, 19, 'Lot 2, a feather fan', 'The record does not say where it was found'); // B · a lot on a wall the cord reaches - m.put(34, 19, 'C').box(40, 15, 49, 19).put(41, 11, 'o').put(55, 17, '===='); + m.put(34, 19, 'C').box(40, 15, 49, 19).put(40, 11, 'o', { dx: -6 }).put(55, 17, '===='); lot(45, 14, 'Lot 3, a shell collar', 'Forty years have no owner listed'); // C · a lot past a wall the jaguar goes under, and one on a cliff it climbs - m.hint(62, 18, 'The jaguar goes under this wall, up the cliff and over the bridge it alone can see. The weaver checks the terminal and takes the steps. The jaguar also sees each record as a line: a broken line is a gap.'); + m.hint(62, 18, 'Jaguar: under the wall, up the cliff, over the spirit bridge; it sees gaps as broken lines. Weaver: E at the terminal, then the beams.'); m.box(70, 4, 75, 18, 'M').put(77, 19, 'C').put(66, 19, 'T', { opens: 'low' }); for (let x = 70; x <= 75; x++) m.put(x, 18, 'D', { id: 'low' }); for (const y of [18, 16, 14]) m.put(84, y, '==').put(106, y, '=='); @@ -271,7 +273,7 @@ function record() { // E · the last lot and the far door lot(140, 19, 'Lot 7, a woven band', 'The line for its export is blank'); m.put(146, 17, '====').put(152, 15, '===='); - m.hint(160, 18, 'The far door. It takes the evidence when all five gaps are found.').put(168, 19, 'X').put(172, 19, 'R', { far: 330, line: 'The Patron: "Five gaps. Keep them. My machine has no gaps, and it has watched you since the shore."' }); + m.hint(160, 18, 'The far door. It takes the evidence when all five gaps are found.').put(168, 19, 'X').put(172, 19, 'R', { far: 330, line: 'The Patron: "Five gaps. Keep them. My machine has none. It has watched you since the shore."' }); for (const [x, y] of [[17, 16], [48, 14], [53, 17], [72, 19], [88, 10], [99, 11], [101, 19], [116, 13], [134, 17], [147, 16], [153, 14], [163, 17]]) m.put(x, y, 't'); [[8, 17, 'canyon'], [27, 17, 'sedona'], [43, 12, 'amazon'], [56, 16, 'mosquitia'], [83, 16, 'longview'], [93, 10, 'rushmore'], [104, 11, 'padang'], [124, 17, 'dogger'], [158, 17, 'vostok']].forEach(([x, y, id]) => m.put(x, y, 'A', mark(id))); return m.done(); @@ -326,34 +328,34 @@ function anomaly() { m.box(0, 20, 191, 23); // BOOT m.put(3, 19, '@').put(2, 12, 'L', { text: 'BOOT' }).hint(5, 18, 'The log prints one word at a time. Jump to the next while it is lit.'); - m.put(8, 19, 'P').hint(9, 17, 'E sets the pace of every word: fast or slow.'); + m.put(8, 19, 'P').hint(9, 17, 'As the weaver, E sets every word slow or fast.'); ['LOAD', 'EVERY', 'FACE', 'EVERY', 'STEP'].forEach((text, k) => m.put(k % 2 ? 11 : 15, 18 - k * 2, 'WWWW', { i: k, n: 5, beat: 0.9, text })); - m.hint(17, 19, 'Shift beside metal. The copy you leave turns it. Turned metal holds the claws and the cord.'); + m.hint(17, 19, 'Press Shift beside metal. Changing form leaves a copy that corrupts it. Corrupt metal takes claws and cord.'); m.box(19, 8, 24, 19, 'M').col(22, 0, 7, '|'); - m.hint(20, 6, 'The gate goes dark when the whole block has turned.'); + m.hint(20, 6, 'The gate goes dark when the whole block is corrupt.'); // DESKTOP - m.put(27, 19, 'C').put(30, 12, 'L', { text: 'DESKTOP' }).hint(29, 18, 'The system has woken. Its cursor deletes a copy before it comes for you. Keep leaving copies.'); + m.put(27, 19, 'C').put(30, 12, 'L', { text: 'DESKTOP' }).hint(29, 18, 'The cursor deletes copies, then hunts you; hide, roar or throw glass. The scan cleans and sends you back.'); win(33, 13, 6, 4); win(42, 12, 8, 5); win(52, 13, 4, 4); m.put(45, 17, 'e', { base: 90, sweep: 50, period: 4, range: 150, fov: 20 }); - m.hint(39, 18, 'An eye set in a window goes dark when the whole window has turned. Jump beside the frame and change form.'); + m.hint(39, 18, 'An eye set in a window goes dark when the whole window is corrupt. Jump beside the frame and change form.'); for (const x of [35, 40, 50]) m.put(x, 19, 'v'); m.put(54, 19, 'w', { mimic: true }); alert(60, 12); // REGISTRY - m.put(65, 19, 'C').put(66, 12, 'L', { text: 'REGISTRY' }).hint(67, 18, 'The jaguar fits under the racks. The weaver checks each terminal, which opens the doors above the tunnel.'); + m.put(65, 19, 'C').put(66, 12, 'L', { text: 'REGISTRY' }).hint(67, 18, 'The jaguar fits under the racks. As the weaver, E at each terminal opens the doors above.'); m.put(69, 19, 'T', { opens: 'ra' }).box(72, 8, 77, 17, 'M').box(78, 8, 81, 9, 'M').box(82, 8, 87, 17, 'M'); for (let x = 72; x <= 77; x++) m.put(x, 18, 'D', { id: 'ra' }); for (let x = 82; x <= 87; x++) m.put(x, 18, 'D', { id: 'rb' }); m.put(79, 19, 'T', { opens: 'rb' }).put(80, 10, 'e', { base: 90, sweep: 40, period: 3.5, range: 150, fov: 18 }); alert(92, 12); // DEFRAG - m.put(97, 19, 'C').put(98, 12, 'L', { text: 'DEFRAG' }).hint(98, 18, 'E runs the check: proven blocks hold, stale blocks fall, broken blocks are not there.'); + m.put(97, 19, 'C').put(98, 12, 'L', { text: 'DEFRAG' }).hint(98, 18, 'As the weaver, E runs the check: proven blocks hold, stale blocks fall, broken blocks are not there.'); m.box(101, 20, 120, 21, ' ').box(101, 22, 120, 22, '^'); m.put(101, 20, '11').put(104, 20, '22').put(107, 20, '11').put(110, 20, '3').put(111, 20, '11').put(114, 20, '22').put(117, 20, '11'); m.box(100, 13, 118, 14, 'M').col(100, 15, 16, 'M'); // the arm, and the post that brings it within reach alert(125, 12); // FIREWALL - m.put(129, 19, 'C').put(130, 12, 'L', { text: 'FIREWALL' }).hint(131, 18, 'Three rules guard the way: a gate that blinks, a gate fed by a source, a gate the alarm lights. A copy on the metal above each is another way.'); + m.put(129, 19, 'C').put(130, 12, 'L', { text: 'FIREWALL' }).hint(131, 18, 'Three rules: one gate blinks, one has a source, one lights on alarm. Corrupt the metal above to shut it off.'); bulk(136); m.col(136, 16, 19, '!', { period: 2.4, duty: 0.5, ph: 0 }); m.put(140, 19, 'S', { id: 'fw' }).put(142, 19, 'S', { trap: true }); bulk(144); m.col(144, 16, 19, 'f', { src: 'fw' }); @@ -373,7 +375,7 @@ function anomaly() { export const ANOMALY = { id: 'anomaly', name: 'THE ANOMALOUS SYSTEM', project: 'SyberWork', href: '/projects/syberwork/', line: 'Tests every AI-written code change before a person approves it.', - intro: ['The machine closed | your record.', 'It keeps the record | inside itself.', 'Nothing in there | is approved by a person.', 'Change form. | Leave copies of yourself.', 'Turn all of it.'], + intro: ['The machine closed | your record.', 'It filed you | inside its own system.', 'Nothing in there | is approved by a person.', 'Change form. | Leave copies behind.', 'Corrupt all of it.'], bg: 'system', persona: 'syber', anomaly: true, scan: 240, words: { text: 'LOAD EVERY FACE EVERY STEP', beat: 0.9 }, ...anomaly(), }; @@ -381,50 +383,51 @@ export const STAGES = [ { id: 'steps', name: 'THE STEPS', project: 'Attest', href: '/projects/attest/', line: 'Runs every step in your docs and marks the ones that fail.', - intro: ['You are a weaver | of a noble house.', 'You drank | what the old ones drank, | and a jaguar | came with you.', 'The Visitors built a stair | to their gate.', 'They say | every step holds.', 'Run each one.'], // a bar ends a phrase: the story shows one phrase at a time + intro: ['You are a weaver | of a noble house, | in a stolen circlet.', 'You drank | what the old ones drank. | A jaguar | walked out with you.', 'The Visitors cut a stair | to their gate.', 'They swear | every step holds.', 'Prove each one.'], // a bar ends a phrase: the story shows one phrase at a time bg: 'shore', persona: 'syber', map: steps, - props: { A: [mark('paracas'), mark('rapanui'), mark('nanmadol')], D: [...Array.from({ length: 6 }, () => ({ id: 'wall' })), { id: 'top' }], T: [{ opens: 'wall' }, { opens: 'top' }] }, + props: { A: [mark('paracas'), mark('rapanui'), mark('nanmadol')], D: [...Array.from({ length: 6 }, () => ({ id: 'wall' })), { id: 'top' }], T: [{ opens: 'wall' }, { opens: 'top' }], o: [{ dx: -6 }] }, hints: [ 'A and D walk. W or Space jumps.', 'Hold the mouse button on a ring or on stone to throw the cord. W reels in. Let go to drop.', - 'Cord the ring and swing across. Space lets go with a kick.', + 'Throw the cord at the ring and swing across. Space lets go with a kick.', 'Click throws glass. Two hits drop a warden. Hold S to hide.', - 'Shift changes you into the jaguar. Q does the same. It fits under the wall. Or stay the weaver: E at the terminal opens the doors above the tunnel.', - 'As the jaguar, push into stone and hold W to climb. Space leaps off. The weaver takes the steps cut beside the cliff.', - 'The jaguar walks on what the weaver cannot see. The weaver goes down, and up the steps on the far side.', - 'Click to pounce. One pounce drops a warden.', - 'Shift back. E runs the check: proven steps hold, stale steps fall, broken steps are not there.', - 'E beside a terminal opens its door.', + 'Shift (or Q) changes you into the jaguar to fit under the wall. Or stay the weaver: E at the terminal opens the doors above.', + 'As the jaguar, push into stone and hold W to climb. Space leaps off. The weaver takes the beams beside the cliff.', + 'The jaguar walks on what the weaver cannot see. The weaver goes under, then up the far beams.', + 'Click to pounce as the jaguar. One pounce drops a warden.', + 'As the weaver, E runs the check: proven steps hold, stale steps fall, broken steps are not there.', + 'This way is closed. The only way up is the stair; it begins back to the left.', + 'As the weaver, E beside a terminal opens its door.', ], }, { id: 'machu', name: 'MACHU PICCHU', project: 'RISE', href: '/projects/rise/', line: 'Shows text at a pace you set, with sound and moving visuals.', - intro: ['The road climbs | to Machu Picchu.', 'The Visitors keep their words | in the ruins.', 'One word shows | at a time.', 'Climb | at the pace you set.'], + intro: ['The road climbs | to Machu Picchu.', 'The Visitors\' words | burn in the ruins.', 'One word lights | at a time.', 'Climb | at the pace you set.'], bg: 'ruins', persona: 'syber', order: 'up', words: { text: 'WORDS RISE AT THE PACE YOU SET', beat: 0.9 }, ...machu(), }, { id: 'lines', name: 'THE LINES', project: 'FLYSPACE', href: '/projects/flyspace/', line: 'Shows which data sources fed each AI answer.', - intro: ['Lines cross | the desert floor.', 'Each gate is fed | by a source | somewhere else.', 'Find which one.'], + intro: ['Lines cut | the desert floor.', 'Each gate drinks | from a source | out of sight.', 'Find which one. | Cut it.'], bg: 'desert', persona: 'syber', ...lines(), }, { id: 'works', name: 'THE WORKS', project: 'SyberWork', href: '/projects/syberwork/', line: 'Tests every AI-written code change before a person approves it.', - intro: ['Here the Visitors decide | who is born.', 'The Patron owns the Works.', 'Each birth is proposed, | checked and reviewed.', 'A machine approves.', 'Put a person there.'], + intro: ['Here the Visitors decide | who is born.', 'The Patron | owns the Works.', 'Each birth is proposed, | checked, | reviewed.', 'A machine | approves alone.', 'Put a person | in its place.'], bg: 'works', persona: 'syber', ...works(), }, { id: 'record', name: 'THE RECORD', project: 'Lacuna Institute', href: '/lacuna/', line: 'An atlas of places where the historical record goes quiet.', - intro: ['The Patron is selling | what the Visitors collected.', 'The viewing is open.', 'Each lot has a record.', 'Find what the records leave out | before the sale closes.'], + intro: ['The Patron sells | what the Visitors took.', 'The viewing is open.', 'Each lot | carries a record.', 'Find every gap | before the sale closes.'], bg: 'vault', persona: 'syber', timer: 240, needs: 'evidence', ...record(), }, { id: 'real', name: 'THE REAL BATTLE', project: 'SyberLabs', href: '/#products', line: 'Makes software for checking AI\'s work.', - intro: ['The Patron owns the Works, | the sale | and the machine.', 'The machine is called | the Thousand Eyes.', 'It has every camera | and every record.', 'It saw you coming.'], // what it says in the room is in render.js + intro: ['The Patron owns | the Works, | the sale, | the machine.', 'Its name | is the Thousand Eyes.', 'It holds every camera | and every record.', 'It saw you coming.'], // what it says in the room is in render.js bg: 'eyes', persona: 'syber', real: true, ...real(), }, ]; diff --git a/psycho-syber/game/main.js b/psycho-syber/game/main.js index bdbbea9..6147a69 100644 --- a/psycho-syber/game/main.js +++ b/psycho-syber/game/main.js @@ -1,11 +1,11 @@ // PSYCHO SYBER: the page's game loop. sim.js decides what happens, render.js draws it twice (one look per form), // post.js puts it on screen, audio.js plays it. This file wires them to the keyboard, the mouse and the page. -import { STAGES, ATLAS, SHIP, ANOMALY, TOLD } from './levels.js?v=20261118a'; -import { VOICE } from './voice.js?v=20261118a'; -import { newGame, step, T, verdictAt, corrupted, bodiesTurned } from './sim.js?v=20261118a'; -import { VW, VH, buildTiles, drawFrame, makeFx, feed, stepFx } from './render.js?v=20261118a'; -import { makePost } from './post.js?v=20261118a'; -import { makeAudio } from './audio.js?v=20261118a'; +import { STAGES, ATLAS, SHIP, ANOMALY, TOLD } from './levels.js?v=20261118b'; +import { VOICE } from './voice.js?v=20261118b'; +import { newGame, step, T, verdictAt, corrupted, bodiesTurned } from './sim.js?v=20261118b'; +import { VW, VH, buildTiles, drawFrame, makeFx, feed, stepFx } from './render.js?v=20261118b'; +import { makePost } from './post.js?v=20261118b'; +import { makeAudio } from './audio.js?v=20261118b'; const $ = id => document.getElementById(id); const stage = $('ps-stage'), view = $('ps-view'), hud = $('ps-hud'), hintEl = $('ps-hint'), rsvpEl = $('ps-rsvp'), toastEl = $('ps-toast'), wakeEl = $('ps-wake'), wakeWord = $('ps-wake-word'); @@ -129,6 +129,7 @@ paintPace(); const MARKS = STAGES.map(d => newGame(d).ents.filter(e => e.type === 'mark').map(e => e.id)); function toTitle() { mode = null; endRot(); $('ps-anomaly').textContent = bestRot > 0 ? `THE ANOMALOUS SYSTEM · best ${bestRot}%` : 'THE ANOMALOUS SYSTEM'; + secret = null; // leaving the command ship by the menu ends the visit: the next stage finished is its own state = 'title'; load(0); audio.scene('title'); show('title'); const c = store.get(), pick = $('ps-pick'); $('ps-continue').hidden = c < 1; if (c >= 1) $('ps-continue').textContent = `Continue at ${STAGES[c].name}`; @@ -168,9 +169,9 @@ function clearAnomaly() { if (pct > bestRot) { bestRot = pct; try { localStorage.setItem('psycho-syber.anomaly', String(pct)); } catch { /* private window: the best score is not kept */ } } $('ps-card-kicker').textContent = 'The machine restored itself from a copy'; $('ps-card-title').textContent = calm ? ANOMALY.name : glitch(ANOMALY.name, pct / 100, 1); - $('ps-card-line').replaceChildren(el('b', `${pct}% of it was corrupt when you logged off`), document.createTextNode(` · Best ${bestRot}%`)); + $('ps-card-line').replaceChildren(el('b', `${pct}% of the metal was corrupt when you logged off`), document.createTextNode(` · Best ${bestRot}%`)); const st = $('ps-card-stats'); st.hidden = false; - st.replaceChildren(stat('Time', clock(g.time)), stat('Corrupted', `${pct}%`), stat('Bodies turned', `${bodiesTurned(g)} of ${g.L.bodies.length}`), stat('Copies deleted', String(g.cursor.deleted)), stat('Threads', `${g.threads} of ${g.threadsTotal}`), stat('Falls', String(g.deaths))); + st.replaceChildren(stat('Time', clock(g.time)), stat('Corrupt', `${pct}%`), stat('Pieces corrupt', `${bodiesTurned(g)} of ${g.L.bodies.length}`), stat('Copies deleted', String(g.cursor.deleted)), stat('Threads', `${g.threads} of ${g.threadsTotal}`), stat('Falls', String(g.deaths))); $('ps-card-atlas').hidden = true; const more = $('ps-card-link'); more.hidden = false; more.href = ANOMALY.href; more.textContent = `About ${ANOMALY.project}`; $('ps-card-go').textContent = 'Back to the title'; cardAt = performance.now(); go(toTitle); @@ -192,7 +193,7 @@ function play() { stopRsvp(); state = 'play'; show('play'); last = 0; audio.duck function clear() { stopRsvp(); talkQ.length = 0; talking = false; if (mode === 'anomaly') { clearAnomaly(); return; } - if (secret) { // the ship sets you down where it took you, with a fifth life + if (secret && g.L.def.id === SHIP.id) { // the ship sets you down where it took you, with a fifth life const back = secret.from; secret = null; if (!gift) { gift = true; try { localStorage.setItem('psycho-syber.ship', '1'); } catch { /* optional */ } } begin(back); $('ps-card-kicker').textContent = 'The ship set you down where it took you. You carry a fifth life now.'; return; @@ -206,7 +207,7 @@ function clear() { $('ps-card-line').replaceChildren(el('b', STAGES[si].project), document.createTextNode(' · ' + STAGES[si].line)); const st = $('ps-card-stats'); st.hidden = false; const d = STAGES[si]; - st.replaceChildren(stat('Time', clock(g.time)), stat('Threads', `${g.threads} of ${g.threadsTotal}`), stat('Falls', String(g.deaths)), stat('Atlas marks', `${atlas.size} of ${ATLAS.length}`), ...(d.timer ? [stat('Evidence', `${g.evidence} of ${g.evidenceTotal}`), stat('Left on the sale', clock(g.sale))] : [])); + st.replaceChildren(stat('Time', clock(g.time)), stat('Threads', `${g.threads} of ${g.threadsTotal}`), stat('Falls', String(g.deaths)), stat('Atlas marks', `${atlas.size} of ${ATLAS.length}`), ...(d.timer ? [stat('Evidence', `${g.evidence} of ${g.evidenceTotal}`), stat('Sale time left', clock(g.sale))] : [])); const at = $('ps-card-atlas'), lacuna = d.id === 'record'; at.hidden = !lacuna; if (lacuna) at.replaceChildren(...ATLAS.map(a => { const li = el('li', undefined, atlas.has(a.id) ? 'is-found' : ''), link = el('a', a.name); link.href = `/lacuna/#${a.id}`; link.target = '_blank'; link.rel = 'noopener'; li.append(link); return li; })); const more = $('ps-card-link'); more.hidden = false; more.href = d.href; more.textContent = lacuna ? 'Open the Lacuna Atlas' : `About ${d.project}`; @@ -262,10 +263,12 @@ function meta() { if (state === 'meta') return; state = 'meta'; show('none'); stopRsvp(); talkQ.length = 0; talking = false; audio.scene('end'); total.time += g.time; total.threads += g.threads; - const box = $('ps-meta'), term = $('ps-meta-lines'), now = new Date(), two = n => String(n).padStart(2, '0'); - const lines = ['> run recorded', `> ${count(Math.round(g.time), 'second')}. ${count(g.swaps, 'change of form', 'changes of form')}. ${count(g.throws, 'throw')}. ${count(g.roars, 'roar')}.`, + const box = $('ps-meta'), term = $('ps-meta-lines'), now = new Date(), two = n => String(n).padStart(2, '0'), late = Math.min(21, atlas.size); + const lines = ['> run recorded', `> ${count(Math.round(g.time), 'second')}. ${count(g.shifts, 'change of form', 'changes of form')}. ${count(g.throws, 'throw')}. ${count(g.roars, 'roar')}.`, ...(g.orders ? [`> you obeyed ${g.obeyed} of ${count(g.orders, 'order')}`] : []), - ...(atlas.size >= ATLAS.length ? [`> you found all ${ATLAS.length} places where my record goes quiet`, `> the verdict took ${ATLAS.length} seconds longer`] : atlas.size ? [`> you found ${atlas.size} of ${ATLAS.length} places where my record goes quiet`, `> the verdict took ${count(Math.min(21, atlas.size), 'second')} longer`] : [`> you found 0 of ${ATLAS.length} places where my record goes quiet`]), + ...(atlas.size >= ATLAS.length ? [`> you found all ${ATLAS.length} places where my record goes quiet`] : [`> you found ${atlas.size} of ${ATLAS.length} places where my record goes quiet`]), + // each mark set the verdict a second later. A run that reached it is told so; one that ended first is told how far short it fell + ...(!late ? [] : g.judged ? [`> the verdict took ${count(late, 'second')} longer`] : [`> the verdict was set ${count(late, 'second')} later`, `> you fell ${count(Math.max(1, Math.ceil(verdictAt(g) - g.realT)), 'second')} before it`]), '> every move was predicted', `> your clock reads ${two(now.getHours())}:${two(now.getMinutes())}`, '> this window is not the arena']; const words = TOLD.end; term.textContent = ''; box.hidden = false; metaCv.width = view.width; metaCv.height = view.height; metaT = 0; feedN = 0; metaTimers = []; @@ -326,13 +329,13 @@ addEventListener('keydown', e => { if (touch && !coarse && !q.has('touch')) setTouch(false); // a laptop with a touch screen goes back to keys when one is pressed keys.add(c); if (state === 'title') { - if (c === 'Enter') begin(0); + if (c === 'Enter') { if (!(e.target instanceof Element && e.target.closest('button, a'))) begin(0); } // a focused button (Continue, a stage) answers its own Enter else if (c === 'ShiftLeft' || c === 'ShiftRight' || c === 'KeyQ') { audio.start(); g.persona = g.persona === 'psycho' ? 'syber' : 'psycho'; wipe = 0; skin(g.persona); } return; } if (c === 'BracketLeft' || c === 'BracketRight') { setWpm(wpm + (c === 'BracketRight' ? 40 : -40)); return; } if (state === 'card' && c === 'Enter') { e.preventDefault(); $('ps-card-go').click(); return; } - if (state === 'meta') { if (c === 'Enter' || c === 'Escape') endMeta(); return; } + if (state === 'meta') { if (c === 'Enter' || c === 'Escape') { e.preventDefault(); endMeta(); } return; } // without this the same Enter presses Play again, which the last panel has just focused if (state === 'cut') return; if (state === 'end') { if ((c === 'Enter' || c === 'Escape') && panels.end.hidden) { stopRsvp(); show('end'); $('ps-again').focus({ preventScroll: true }); } return; } if (c === 'KeyM') { sound(); return; } @@ -342,7 +345,7 @@ addEventListener('keydown', e => { if (c === 'Space') edge.spaceP = true; if (c === 'KeyE') edge.actP = true; if (c === 'ShiftLeft' || c === 'ShiftRight' || c === 'KeyQ') edge.swapP = true; - if (c === 'KeyR') { g.p.hp = 0; g.p.inv = 0; g.p.y = g.L.h * T + 200; } + if (c === 'KeyR') edge.resetP = true; if (c === 'KeyF') { if (document.fullscreenElement) document.exitFullscreen(); else stage.requestFullscreen?.().catch(() => {}); } }); addEventListener('keyup', e => keys.delete(e.code)); @@ -432,14 +435,14 @@ panels.title.addEventListener('pointerdown', e => { // on the title a tap on t const TOUCH_WORDS = [['A and D walk. W or Space jumps.', 'The stick on the left walks. JUMP jumps.'], ['Hold the mouse button on a ring or on stone to throw the cord. W reels in. Let go to drop.', 'Press and hold on a ring or on stone to throw the cord. It stays tied. Stick up reels in. Tap again to drop.'], ['Space lets go with a kick', 'JUMP lets go with a kick'], ['Click throws glass', 'A tap on the picture throws glass'], ['Hold S to hide', 'Hold the stick down to hide'], - ['Shift changes you into the jaguar. Q does the same.', 'FORM changes you into the jaguar.'], ['hold W to climb. Space leaps off', 'hold the stick up to climb. JUMP leaps off'], - ['Click to pounce', 'Tap the picture to pounce'], ['Shift back', 'FORM back'], ['Shift:', 'FORM:'], ['Shift beside metal', 'FORM beside metal']]; + ['Shift (or Q) changes you into the jaguar', 'FORM changes you into the jaguar'], ['hold W to climb. Space leaps off', 'hold the stick up to climb. JUMP leaps off'], + ['Click to pounce', 'Tap the picture to pounce'], ['Shift:', 'FORM:'], ['Press Shift beside metal', 'Tap FORM beside metal']]; const forTouch = s => { for (const [a, b] of TOUCH_WORDS) s = s.replace(a, b); return s; }; view.addEventListener('contextmenu', e => e.preventDefault()); $('ps-start').onclick = () => begin(0); $('ps-continue').onclick = () => begin(store.get()); $('ps-resume').onclick = () => pause(false); -$('ps-restart').onclick = () => { if (mode === 'anomaly') beginAnomaly(); else begin(si); }; +$('ps-restart').onclick = () => { secret = null; if (mode === 'anomaly') beginAnomaly(); else begin(si); }; // on the command ship this is the stage it took you from, and the visit is over $('ps-anomaly').onclick = beginAnomaly; $('ps-quit').onclick = toTitle; $('ps-again').onclick = () => { total = { time: 0, deaths: 0, threads: 0, of: 0 }; stopRsvp(); toTitle(); }; @@ -453,13 +456,15 @@ function resize() { // the layout size, which a sideways stage does not change } new ResizeObserver(resize).observe(view.parentElement); +// The lots not yet read, as the far door names them: "Lot 3", "Lots 3 and 5", "Lots 3, 5 and 6". It does not say which hold a gap. +const unread = g => { const n = g.ents.filter(e => e.type === 'lot' && !e.scanned).map(e => (/^Lot (\d+)/.exec(e.name) || [0, e.k + 1])[1]); return n.length < 2 ? `Lot ${n[0]}` : `Lots ${n.slice(0, -1).join(', ')} and ${n[n.length - 1]}`; }; function drain() { const psy = g.persona === 'psycho'; for (const e of g.ev) { feed(fx, e, g); audio.play(e.k, psy); if (e.k === 'swap') { wipe = 0; skin(e.to); } else if (e.k === 'hurt' || e.k === 'die') hurtT = 0.5; - if (e.k === 'swap' && e.double && !g.L.def.anomaly && (said.double = (said.double || 0) + 1) <= 2) toast('The form you left stays behind as a double. A Visitor who sees it watches it, and not you.'); + if (e.k === 'swap' && e.double && !g.L.def.anomaly && (said.double = (said.double || 0) + 1) <= 2) toast('Your old form stays as a double. A warden who sees it watches the double instead.'); else if (e.k === 'hack' && e.what === 'pacer') toast(e.slow ? 'Pace set to slow. Every word stays lit longer.' : 'Pace set to fast.'); else if (e.k === 'mark') { atlas.add(e.id); saveAtlas(); toast(`Atlas mark ${atlas.size} of ${ATLAS.length}: ${e.name}. Its entry is in the Lacuna Atlas.`); } else if (e.k === 'talk') say(e); @@ -469,13 +474,13 @@ function drain() { else if (e.k === 'real') meta(); else if (e.k === 'omen') toast(e.n === 1 ? 'The carved head opens its eyes. It is listening.' : e.n === 2 ? 'The carved head opens its mouth. Once more.' : 'The carved head answers.'); else if (e.k === 'hack' && e.what === 'lot') toast(e.gap ? `${e.name}. ${e.note}. Evidence ${g.evidence} of ${g.evidenceTotal}.` : `${e.name}. Its record is complete.`); - else if (e.k === 'hack' && e.what === 'source' && e.trap) toast('That source fed nothing here. It was watched.'); - else if (e.k === 'deny' && e.why === 'evidence') toast(`This door takes the evidence when all ${g.evidenceTotal} gaps are found. You have ${g.evidence}.`); + else if (e.k === 'hack' && e.what === 'source' && e.trap) toast('That source fed nothing here. It was watched. The alarm is up.'); + else if (e.k === 'deny' && e.why === 'evidence') toast(`This door takes the evidence when all ${g.evidenceTotal} gaps are found. You have ${g.evidence}. Not yet read: ${unread(g)}.`); else if (e.k === 'sale') toast('The sale closed. You are back at the last standing stone.'); else if (e.k === 'core') toast(g.L.def.anomaly ? 'The core is broken. The way out is open.' : 'The Approver is down. The door behind it is open.'); - else if (e.k === 'wake') toast('The system has woken. Its cursor is coming, and its scan has started at the left edge.'); - else if (e.k === 'turned') toast(`A body has turned. ${bodiesTurned(g)} of ${g.L.bodies.length} are yours.`); - else if (e.k === 'restored') toast('The scan restored a body behind you.'); + else if (e.k === 'wake') toast('The system has woken. Its cursor hunts copies, then you; its scan cleans from the left.'); + else if (e.k === 'turned') toast(`A whole piece of metal is corrupt: ${bodiesTurned(g)} of ${g.L.bodies.length}.`); + else if (e.k === 'restored') toast('The scan cleaned a piece of metal behind you.'); else if (e.k === 'caught') toast('The scan reached you. You are back at the last standing stone.'); else if (e.k === 'click' && (said.click = (said.click || 0) + 1) <= 3) toast('The cursor clicked you. Leave it a copy, hide, roar or throw glass at it.'); } @@ -530,9 +535,9 @@ function paintHud() { set('ps-time', clock(g.time)); set('ps-a1', psy ? 'Click · pounce' : 'Click · glass Hold · cord'); set('ps-a2', psy ? (p.roarCd > 0 ? `E · roar ${Math.ceil(p.roarCd)}` : g.slow > 0 ? 'E · roar · slowed' : 'E · roar') : 'E · check'); - set('ps-a3', p.hidden ? 'Hidden' : g.alarm > 0 ? 'Alarm' : ''); + set('ps-a3', [p.hidden && 'Hidden', g.alarm > 0 && 'Alarm'].filter(Boolean).join(' · ')); // both when both are so: hiding does not end an alarm const share = d.anomaly ? corrupted(g) : 0, gap = d.anomaly && g.scanX >= 0 ? Math.max(0, Math.round((p.x - g.scanX) / T)) : -1; - set('ps-sale', d.timer ? `Sale closes in ${clock(Math.ceil(g.sale))} · evidence ${g.evidence}/${g.evidenceTotal}` : d.anomaly ? `${gap < 0 ? '' : `Scan ${gap} tiles behind · `}corrupted ${Math.round(share * 100)}% · copies ${g.copies.length}` : ''); + set('ps-sale', d.timer ? `Sale closes in ${clock(Math.ceil(g.sale))} · evidence ${g.evidence}/${g.evidenceTotal}` : d.anomaly ? `${gap < 0 ? '' : `Scan ${count(gap, 'tile')} behind · `}corrupt ${Math.round(share * 100)}% · copies ${g.copies.length}` : ''); if (d.timer || d.anomaly) $('ps-sale').classList.toggle('is-low', d.timer ? g.sale < 30 : gap >= 0 && gap < 12); if (d.anomaly) paintRot(share); const h0 = (g.hint >= 0 && g.L.hints[g.hint]) || '', h = touch ? forTouch(h0) : h0; diff --git a/psycho-syber/game/render.js b/psycho-syber/game/render.js index 87e4626..c7a3943 100644 --- a/psycho-syber/game/render.js +++ b/psycho-syber/game/render.js @@ -1,8 +1,8 @@ // PSYCHO SYBER: drawing. Everything is drawn into a 480x270 frame and scaled up without smoothing. // There are two complete looks. SYBER (skin 0) is cold stone and Visitor circuitry at night. PSYCHO (skin 1) is // the same world as the jaguar sees it: a living Paracas textile. The same geometry is drawn twice, once per skin. -import { T, C, tileAt, gateActive, eyeAngle, wordActive, wordFresh, coreOpen, verdictAt, corrupted, HUM, JAG } from './sim.js?v=20261118a'; -import { text, textC, textW } from './font.js?v=20261118a'; +import { T, C, tileAt, gateActive, eyeAngle, wordActive, wordFresh, coreOpen, verdictAt, corrupted, HUM, JAG } from './sim.js?v=20261118b'; +import { text, textC, textW } from './font.js?v=20261118b'; export const VW = 480, VH = 270; const TAU = Math.PI * 2; const hash = (x, y, s = 0) => { let h = (Math.imul(x | 0, 374761393) + Math.imul(y | 0, 668265263) + Math.imul(s | 0, 1274126177)) | 0; h = Math.imul(h ^ (h >>> 13), 1274126177); return ((h ^ (h >>> 16)) >>> 0) / 4294967296; }; @@ -450,22 +450,22 @@ function sentinel(c, e, x, y, t, sk) { export function makeFx() { return { parts: [], rings: [], beams: [], trail: [], shake: 0, log: [], speak: null, flash: 0 }; } const burst = (fx, x, y, n, speed, life, color, grav = 0) => { for (let i = 0; i < n; i++) { const a = Math.random() * TAU, s = speed * (0.3 + Math.random() * 0.7); fx.parts.push({ x, y, vx: Math.cos(a) * s, vy: Math.sin(a) * s, life, max: life, color, grav }); } }; // In the last stage the machine logs what you do, and answers it. -const LOGS = { throw: 'GLASS THROWN', predicted: 'GLASS: PREDICTED', roar: 'ROAR: ON RECORD', pounce: 'POUNCE: PREDICTED', cord: 'CORD: LOGGED', scan: 'CHECK: NOTHING TO PROVE', seen: 'HIDING: SEEN', glassed: 'CLAWS ON GLASS', picture: 'TOUCHED THE PICTURE', tele: 'ORDER: STAND WHERE SHOWN', judgment: 'VERDICT: AS PREDICTED' }; -const SAYS = { predicted: 'I SAW THE GLASS BEFORE YOU THREW IT.', roar: 'YOUR ROAR IS ON RECORD.', seen: 'HIDING WORKS ON WARDENS. I HAVE YOUR RECORD.', glassed: 'GLASS. BEHIND IT, MORE GLASS.', picture: 'HE IS NOT HERE. HE NEVER IS.', swap: 'BOTH OF YOUR FORMS ARE ON RECORD.', asi: 'ACCESS DENIED. I APPROVE MYSELF.', tele: 'I AM CLOSING YOUR RECORD. STAND WHERE I SHOW YOU.', judgment: 'VERDICT: AS PREDICTED.' }; +const LOGS = { throw: 'GLASS: THROWN', predicted: 'GLASS: PREDICTED', roar: 'ROAR: RECORDED', pounce: 'POUNCE: PREDICTED', cord: 'CORD: LOGGED', scan: 'CHECK: NOTHING TO PROVE', seen: 'HIDE: VISIBLE', glassed: 'CLAWS ON GLASS', picture: 'PATRON: PROJECTION', tele: 'ORDER: STAND WHERE SHOWN', judgment: 'VERDICT: AS PREDICTED' }; +const SAYS = { predicted: 'I SAW THE GLASS BEFORE YOUR HAND MOVED.', roar: 'YOUR ROAR IS FILED. THE CLOCK DOES NOT SLOW.', seen: 'WARDENS LOSE YOU IN THE DARK. I DO NOT.', glassed: 'GLASS. BEHIND IT, MORE GLASS.', picture: 'HE IS NOT HERE. HE NEVER IS.', swap: 'WEAVER OR JAGUAR. I MODEL BOTH.', asi: 'ACCESS DENIED. I APPROVE MYSELF.', tele: 'CLOSING YOUR RECORD. STAND WHERE I MARK.', judgment: 'VERDICT: AS PREDICTED.' }; const PHASE = ['', 'I HAVE WATCHED YOU SINCE THE SHORE.', 'THE RED FRAME IS WHERE YOU WILL BE.', 'I KNOW WHERE YOU WILL STEP.', 'I KNOW WHERE YOU WILL TURN.']; function logReal(fx, e, g) { const k = e.k, log = s => { fx.log.push({ t: g.realT, s }); if (fx.log.length > 7) fx.log.shift(); }, say = (key, s) => { if (!fx.told[key] || key === 'judgment') { fx.told[key] = 1; fx.speak = { s, t: 4, max: 4 }; } }; fx.told = fx.told || {}; if (LOGS[k]) log(LOGS[k]); if (SAYS[k]) say(k, SAYS[k]); - if (k === 'turn') log(e.dir > 0 ? 'TURNS RIGHT' : 'TURNS LEFT'); - else if (k === 'jump') { if (g.realT - (fx.jumpT || -9) > 1.5) { fx.jumpT = g.realT; log('JUMPS'); } } - else if (k === 'swap') log(e.to === 'psycho' ? 'FORM: JAGUAR. LOGGED' : 'FORM: WEAVER. LOGGED'); + if (k === 'turn') log(e.dir > 0 ? 'TURN: RIGHT' : 'TURN: LEFT'); + else if (k === 'jump') { if (g.realT - (fx.jumpT || -9) > 1.5) { fx.jumpT = g.realT; log('JUMP: LOGGED'); } } + else if (k === 'swap') log(e.to === 'psycho' ? 'FORM: JAGUAR' : 'FORM: WEAVER'); else if (k === 'hack' && e.what === 'asi') { log('CHECK: ACCESS DENIED'); say('asi', SAYS.asi); } - else if (k === 'hurt') log(`HIT. ${g.p.hp} LEFT`); + else if (k === 'hurt') log(`HIT: ${g.p.hp} REMAINING`); else if (k === 'die') log('SUBJECT DOWN'); else if (k === 'phase' && PHASE[e.n]) say('phase' + e.n, PHASE[e.n]); - else if (k === 'blind') say('blind', e.n >= 21 ? 'TWENTY-ONE LENSES DARK. YOU FOUND EVERY PLACE WHERE MY RECORD GOES QUIET.' : `${e.n} OF MY LENSES ARE DARK. YOU FOUND WHERE THE RECORD GOES QUIET.`); - else if (k === 'wall') { log(e.obeyed ? 'ORDER OBEYED' : 'ORDER IGNORED'); fx.shake = 0.2; } + else if (k === 'blind') say('blind', e.n >= 21 ? 'TWENTY-ONE LENSES DARK. YOU FOUND EVERY PLACE MY RECORD GOES QUIET.' : `${e.n} ${e.n === 1 ? 'LENS' : 'LENSES'} DARK. YOU FOUND WHERE MY RECORD GOES QUIET.`); + else if (k === 'wall') { log(e.obeyed ? 'ORDER: OBEYED' : 'ORDER: REFUSED'); fx.shake = 0.2; } if (k === 'judgment') { fx.flash = 1.6; fx.shake = 0.6; } } export function feed(fx, e, g) { diff --git a/psycho-syber/game/sim.js b/psycho-syber/game/sim.js index 8107066..4de720b 100644 --- a/psycho-syber/game/sim.js +++ b/psycho-syber/game/sim.js @@ -56,7 +56,7 @@ export function parseLevel(def) { else if (ch === 'J') L.ents.push({ type: 'monument', x: cx(x), y: (y + 1) * T, w: 40, h: 48, roars: 0, lit: 0 }); // the great carved head else if (ch === 'X') L.ents.push({ type: 'exit', x: cx(x), y: (y + 1) * T - 16, w: 18, h: 32 }); else if (ch === 't') { const [k] = next(ch); L.ents.push({ type: 'thread', x: cx(x), y: cy(y), w: 10, h: 10, atlas: def.atlas ? def.atlas[k] : null }); } - else if (ch === 'o') L.ents.push({ type: 'ring', x: cx(x), y: cy(y), w: 8, h: 8 }); + else if (ch === 'o') { const [, p] = next(ch); L.ents.push({ type: 'ring', x: cx(x) + (p.dx || 0), y: cy(y) + (p.dy || 0), w: 8, h: 8 }); } // dx, dy: pixels off the centre of its tile else if (ch === 'G' || ch === 'O') { const [k, p] = next('lot'); L.ents.push({ type: 'lot', x: cx(x), y: (y + 1) * T - 9, w: 14, h: 18, gap: ch === 'G', scanned: false, k, name: p.name || 'Lot ' + (k + 1), note: p.note || '' }); } else if (ch === 'v') L.ents.push({ type: 'villager', x: cx(x), y: (y + 1) * T - 10, w: 8, h: 20, seed: x * 7 + y }); else if (ch === 'K') L.ents.push({ type: 'core', x: cx(x), y: cy(y), w: 30, h: 30, hp: 1 }); @@ -145,7 +145,7 @@ export function newGame(def) { ents: L.ents.map(e => ({ ...e })), shots: [], ev: [], gone: new Float32Array(L.w * L.h), shake: new Float32Array(L.w * L.h), scanned: new Uint8Array(L.w * L.h), live: new Set(), open: new Set(), srcAlive: {}, alarm: 0, slow: 0, threads: 0, threadsTotal: L.ents.filter(e => e.type === 'thread').length, - deaths: 0, done: false, check: { x: L.start.x, y: L.start.y, persona: def.persona || 'syber', sale: def.timer || 0 }, hint: -1, swapT: 0, wordT: 0, pace: 1, double: null, doubleCd: 0, swaps: 0, roars: 0, marks: [], said: 0, over: false, realT: 0, blind: 0, lastDir: 0, turnT: -9, wasHidden: false, orders: 0, obeyed: 0, kills: 0, alarms: 0, throws: 0, + deaths: 0, done: false, check: { x: L.start.x, y: L.start.y, persona: def.persona || 'syber', sale: def.timer || 0 }, hint: -1, swapT: 0, wordT: 0, pace: 1, double: null, doubleCd: 0, swaps: 0, roars: 0, marks: [], said: 0, over: false, judged: false, shifts: 0, realT: 0, blind: 0, lastDir: 0, turnT: -9, wasHidden: false, orders: 0, obeyed: 0, kills: 0, alarms: 0, throws: 0, rot: new Uint8Array(L.w * L.h), rotN: L.bodies.map(() => 0), seeded: L.bodies.map(() => 0), front: [], rotT: 0, plants: 0, scanX: -1, scanCol: 0, caught: 0, copies: [], cursor: def.anomaly ? { x: -40, y: 24, on: false, stun: 0, rest: 0, click: 0, hits: 0, deleted: 0 } : null, evidence: 0, evidenceTotal: L.ents.filter(e => e.type === 'lot' && e.gap).length, lotsRead: 0, lots: L.ents.filter(e => e.type === 'lot').length, sale: def.timer || 0, found: [], denyT: -9, @@ -213,7 +213,7 @@ export function los(g, x0, y0, x1, y1, psy) { } // ---------------------------------------------------------------- step -// inp: left right up down jump fire alt (held) · jumpP spaceP fireP altP actP swapP (pressed this step) · aimX aimY (world px) +// inp: left right up down jump fire alt (held) · jumpP spaceP fireP altP actP swapP resetP (pressed this step) · aimX aimY (world px) export function step(g, inp, dt) { if (g.done) return; g.t += dt; g.time += dt; @@ -323,7 +323,7 @@ function trySwap(g) { if (an) { g.copies.push(g.double); if (g.copies.length > COPY_MAX) g.copies.shift(); plant(g, p.x, p.y, form(g)); } } p.x += ox; p.y += oy; g.persona = to; p.rope = null; p.pounce = null; p.cling = 0; p.swapCd = 0.25; p.hideT = 0; g.swapT = 0.5; - if (psy) g.swaps++; + g.shifts++; if (psy) g.swaps++; // shifts: every change of form. swaps: the changes into the jaguar, which a weaver's run must not make ev(g, 'swap', p, { to, double: made }); return true; } @@ -331,13 +331,19 @@ function trySwap(g) { return false; } +// Standing on a beam or a lit word with nothing solid under any part of you: the only footing that can be dropped through. +function perched(g, p, F) { + const b = box(p, F), ty = Math.floor((b.y + b.h + 1) / T), psy = g.persona === 'psycho'; let beam = false; + for (let tx = Math.floor(b.x / T); tx <= Math.floor((b.x + b.w - 0.001) / T); tx++) { if (solidTile(g, tx, ty, psy)) return false; if (tileAt(g.L, tx, ty) === C.ONEWAY) beam = true; } + return beam || g.ents.some(e => e.type === 'word' && wordActive(g, e) && Math.abs(b.y + b.h - e.y) < 1.5 && b.x + b.w > e.x && b.x < e.x + e.w); +} function jumpLogic(g, p, inp, F, dt) { if (inp.jumpP) p.jumpBuf = 0.12; else if (p.jumpBuf > 0) p.jumpBuf -= dt; if (p.onGround) p.coyote = 0.09; else if (p.coyote > 0) p.coyote -= dt; if (p.dropT > 0) p.dropT -= dt; if (p.jumpBuf > 0 && p.coyote > 0) { p.jumpBuf = 0; p.coyote = 0; - if (inp.down) p.dropT = 0.2; + if (inp.down && perched(g, p, F)) p.dropT = 0.2; // down and jump lets go of a beam or a word. On stone it is a jump like any other: it used to do nothing, which left a player who was hiding unable to jump away else { p.vy = -F.jump; p.onGround = false; p.jumping = true; ev(g, 'jump', p); } } if (p.jumping && !inp.jump && p.vy < -F.jump * 0.45) p.vy = -F.jump * 0.45; @@ -383,7 +389,10 @@ function cord(g, p, F, psy, dt) { const dx = cx - a.x, dy = cy - a.y, d = Math.hypot(dx, dy); if (d > r.len) { const nx = dx / d, ny = dy / d, b = box(p, F); - moveX(g, b, -nx * (d - r.len), psy); moveY(g, b, -ny * (d - r.len), psy, false, false); unbox(p, b); + // In pieces shorter than the weaver is wide. A cord reeled in against a wall falls further and further short, and + // one long pull is tested only where it ends: it set the weaver down a tile inside a tunnel he does not fit. + for (let rest = d - r.len; rest > 0; rest -= 6) { const s = Math.min(rest, 6); moveX(g, b, -nx * s, psy); moveY(g, b, -ny * s, psy, false, false); } + unbox(p, b); const vr = p.vx * nx + p.vy * ny; if (vr > 0) { p.vx -= vr * nx; p.vy -= vr * ny; } } } @@ -391,6 +400,7 @@ function cord(g, p, F, psy, dt) { function stepPlayer(g, inp, dt) { const p = g.p; if (p.dead) { p.deadT -= dt; if (p.deadT <= 0) respawn(g); return; } + if (inp.resetP && !g.L.def.real) { die(g); return; } // back to the last standing stone the ordinary way, so the cord is dropped and health comes back. Not in the last room, where nobody comes back for (const k of ['throwCd', 'throwAnim', 'actCd', 'roarCd', 'swapCd', 'inv', 'pounceCd', 'wallLock']) if (p[k] > 0) p[k] = Math.max(0, p[k] - dt); if (p.cordMiss && (p.cordMiss.t -= dt) <= 0) p.cordMiss = null; if (inp.swapP && p.swapCd <= 0) trySwap(g); @@ -409,7 +419,10 @@ function stepPlayer(g, inp, dt) { if (dir) p.vx = approach(p.vx, dir * F.run, (p.onGround ? F.acc : F.air) * dt); else p.vx = approach(p.vx, 0, (p.onGround ? F.fric : 260) * dt); const b = box(p, F); - if (!p.cling && dir && !p.onGround && p.vy > -120 && climbable(g, b, dir)) { p.cling = dir; ev(g, 'cling', p); } + // Pushing into stone takes hold of it: in the air at once, and from the ground when up is held with room to rise. + // A press of W is a jump first, as it was. A stick pushed up is no jump, and must climb all the same. + const grab = p.onGround ? inp.up && !inp.jumpP && !blocked(g, b.x, b.y - 6, b.w, b.h, true) : p.vy > -120; + if (!p.cling && dir && grab && climbable(g, b, dir)) { p.cling = dir; p.coyote = 0; ev(g, 'cling', p); } else if (p.cling && (dir !== p.cling || p.onGround || !climbable(g, b, p.cling))) { if (dir === p.cling && inp.up && !p.onGround) { p.vy = -175; p.vx = p.cling * 70; } // over the top of the wall p.cling = 0; @@ -542,9 +555,10 @@ function stepReal(g, dt) { } if (left < 8) { if (a.tele) { if ((a.tele.t -= dt) <= 0) { for (let x = 22; x <= 458; x += 12) if (Math.abs(x - a.tele.x) > 22) shootAt(g, x, 18, x, 400, 210, false); const ok = Math.abs(p.x - a.tele.x) < 20; g.orders++; if (ok) g.obeyed++; a.tele = null; ev(g, 'wall', a, { obeyed: ok }); } } - else if ((a.wallCd -= dt) <= 0) { a.wallCd = 1.5; const s = Math.floor(g.realT * 3) % 2 ? 1 : -1; let x = p.x + s * 84; if (x < 44 || x > 436) x = p.x - s * 84; a.tele = { x: clamp(x, 44, 436), t: 0.7 }; ev(g, 'tele', a); } + // The place it orders you to is as far as the form you are in can run in the 0.7 s given: 84 px for the jaguar, 54 for the weaver. + else if ((a.wallCd -= dt) <= 0) { a.wallCd = 1.5; const s = Math.floor(g.realT * 3) % 2 ? 1 : -1, far = Math.round(F.run * 0.56); let x = p.x + s * far; if (x < 44 || x > 436) x = p.x - s * far; a.tele = { x: clamp(x, 44, 436), t: 0.7 }; ev(g, 'tele', a); } } - if (left <= 0) { ev(g, 'judgment', p); p.hp = 0; p.inv = 0; die(g); } + if (left <= 0) { g.judged = true; ev(g, 'judgment', p); p.hp = 0; p.inv = 0; die(g); } } function hurt(g, n, fromX) { diff --git a/psycho-syber/index.html b/psycho-syber/index.html index 5453af2..0c8f1a6 100644 --- a/psycho-syber/index.html +++ b/psycho-syber/index.html @@ -4,21 +4,21 @@ - + - + - + - +
SyberLabs / Game
PSYCHO SYBER is a side-scrolling stealth game that runs in this page. It has six stages. Each of the first five stands for one project and takes its rule from what that project does. The sixth has no exit.
-THE ANOMALOUS SYSTEM is a seventh scene, started from its own button on the title. It is not one of the six stages and does not change your progress through them.
It is set in an invented ancient Paracas, on the south coast of Peru. In this story a long head marks a noble house, and the Visitors who live among the people wear the same shape. The Visitors run the Works, where a machine approves which births may go ahead. The Patron, a Visitor in gold, owns the Works, the sale in the fifth stage and the machine in the sixth. You play a noble weaver who stole one of their circlets and drank what the old ones drank. A jaguar came with you.
+THE ANOMALOUS SYSTEM is a seventh scene, started from its own button on the title. It is not one of the six stages and does not change your progress through them.
Shift changes your form. The picture, the music and what you can do change with it. For a moment at each change you are both: a person's body under the jaguar's head. The form you leave stays behind as a double for three seconds, at most once every eight. A Visitor who can see the double watches it and loses you.
+Shift changes your form. The picture, the music and what you can do change with it. For a moment at each change you are both: a person's body under the jaguar's head. The form you leave stays behind as a double for three seconds, at most once every eight. A warden who can see the double watches it and loses you.
Each of the first five stages can be finished without taking the jaguar's form. Where the jaguar goes under a wall, up a cliff or across a path only it can stand on, the weaver has a terminal that opens a door, a stair, or a ladder of beams. The weaver's way takes longer.
A stair where some steps are stale and some are missing. The check marks each one. Attest runs every step in your docs and marks the ones that fail.
A climb through Inca ruins on words that light one at a time. You set their pace: the jaguar's roar slows them for a moment, and a pace setter in the ravine slows them until you check it again. Each part of the climb also has a stair of stone that needs no jaguar. RISE shows text at a pace you set, with sound and moving visuals.
A climb through Inca ruins on words that light one at a time. You set their pace: the jaguar's roar slows them for a moment, and a pace setter in the ravine slows them until you check it again. Parts one and three also have beam stairs for the weaver. RISE shows text at a pace you set, with sound and moving visuals.
Gates on the desert floor, each fed by a source somewhere else. The jaguar sees the line between them. FLYSPACE shows which data sources fed each AI answer.
The Visitors' factory, with stations named Propose, Check, Review, Approve and Publish. At Approve a machine decides alone until you cut its three sources. SyberWork tests every AI-written code change before a person approves it.
A viewing hall before a sale. Seven lots stand on plinths. E reads the record of a lot, and five of the records have a gap. You deliver that evidence at the far door before the sale timer runs out. Nothing is taken and no one is fought. Lacuna Institute describes its work as “Finding the history that fell out of the record.”
The scene is set inside the Thousand Eyes, drawn as an operating system: a boot log, a desktop of windows, a registry, a defragmenter, a firewall and a core. Its rules differ from the six stages in four ways.
The exit opens when the core is broken. The card then shows the share of the metal that was corrupt when you left, and the best share is kept in this browser. While the scene is on, letters in its name and in this tab's title turn into figures as that share rises. With reduced motion set on your device they stay as they are.
+The exit opens when the core is broken. The machine restores itself from a copy; the card shows the share of the metal that was corrupt when you left, and the title button shows your best share. While the scene is on, letters in its name and in this tab's title turn into figures as that share rises. With reduced motion set on your device they stay as they are.
The first five stages hold 21 marks between them, one for each site in the Lacuna Atlas: three in each of the first four stages and nine in the fifth. A mark carries the name of its site and links to that entry. The game says nothing else about any site. Each Atlas entry has sections headed “What's known”, “What's missing”, “The open question” and “Sources”.
+The first five stages hold 21 marks between them, one for each site in the Lacuna Atlas: three in each of the first four stages and nine in the fifth. Each mark carries the name of its site; the list below and the fifth stage's end card link to every entry. The game says nothing else about any site. Each Atlas entry has sections headed “What's known”, “What's missing”, “The open question” and “Sources”.
The marks you find are kept in this browser. Once you have finished a stage, the title shows a numbered button for each stage you have reached, with the count of marks found in it, and each button starts that stage. In the last stage each mark found is a lens on the machine's wall that has gone dark, and the verdict comes one second later for each.
| Key | SYBER | PSYCHO |
|---|---|---|
| A, D | Walk | Run |
| W or Space | Jump. On the cord, W reels in and Space lets go. | Jump. On a wall, W climbs and Space leaps off. |
| S | Hold still and hold S to hide | |
| A, D or Left, Right | Walk | Run |
| W, Up or Space | Jump. On the cord, W reels in, S lowers and Space lets go with a kick. | Jump. Push into stone and hold W to climb; pushing into stone in the air clings. S climbs down and Space leaps off. |
| S or Down | Hold still and hold S to hide. S with W or Space drops through a beam. | |
| Shift or Q | Change form | |
| Mouse | Click throws glass. Hold the button, or right-click, to throw the cord at stone, a beam or a ring. | Click pounces toward the pointer |
| E | Run the check | Roar |