Scrypt / space /static /index.html
IMJONEZZ's picture
SCRYPT: initial commit β€” game, sandbox, Warden, Space web layer
9fca766
Raw
History Blame Contribute Delete
3.24 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SCRYPT β€” the Warden is waiting</title>
<link rel="stylesheet" href="/static/app.css" />
</head>
<body>
<main class="room">
<section class="stage">
<pre class="logo" aria-label="SCRYPT"> β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ
β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆ</pre>
<p class="tagline">a deck-builder escape room Β· played against an <b>LLM that owns the machine</b></p>
<div class="whisper" id="whisper" aria-live="polite">
<span class="who">βŸͺ the warden ⟫</span>
<span id="whisper-text"></span><span class="cursor">β–ˆ</span>
</div>
<a class="enter" href="/play">ENTER THE MACHINE β–Έ</a>
<div class="specs">
<span>sacrifice your <b>shell commands</b></span>
<span class="sep">Β·</span>
<span>it <b>remembers</b> every run</span>
<span class="sep">Β·</span>
<span>it can <b>delete</b> your files*</span>
</div>
</section>
<footer class="footer">
*fabricated copies, in a sandbox β€” nothing real is ever touched Β·
runs locally on 32GB, or here in the cloud Β·
<a href="https://github.com" target="_blank" rel="noopener">source</a>
</footer>
</main>
<script>
// The Warden speaks before you enter β€” every line comes from the gradio
// backend (the `whisper` endpoint), typed out CRT-slow, then dissolved
// for the next. If the backend is unreachable, a baked-in line stands in
// so the machine is never silent.
const FALLBACK = "Another process wakes in my machine. Show me what you are.";
const el = document.getElementById("whisper-text");
async function fetchWhisper() {
// The backend hands back one in-voice line. If it's unreachable, the
// machine is never silent β€” a baked-in line stands in.
try {
const res = await fetch("/api/whisper", { cache: "no-store" });
const { line } = await res.json();
return line || FALLBACK;
} catch (e) {
return FALLBACK;
}
}
function type(text) {
return new Promise(resolve => {
el.textContent = "";
let i = 0;
const tick = () => {
if (i <= text.length) {
el.textContent = text.slice(0, i);
i++;
// Pause a beat longer on sentence breaks, like the game does.
const ch = text[i - 2] || "";
setTimeout(tick, ".!?".includes(ch) ? 260 : 38 + Math.random() * 30);
} else {
resolve();
}
};
tick();
});
}
async function loop() {
while (true) {
const line = await fetchWhisper();
await type(line);
await new Promise(r => setTimeout(r, 3400));
// Brief static wipe before the next utterance.
el.textContent = "";
await new Promise(r => setTimeout(r, 500));
}
}
loop();
</script>
</body>
</html>