From 5851ad3b3d27f80c0c8a4466f4239cfa9a4ec4f2 Mon Sep 17 00:00:00 2001 From: Dennis Wayo <117969019+DennisWayo@users.noreply.github.com> Date: Sun, 29 Nov 2026 12:40:58 +0500 Subject: [PATCH] Refine Quantum Devil presentation and level geometry --- site/src/App.jsx | 14 +- site/src/quantum-devil/QuantumDevilDialog.jsx | 4 + .../quantum-devil/createQuantumDevilGame.js | 64 +++---- site/src/quantum-devil/quantum-devil.css | 158 +++++++++++++++++- site/src/styles.css | 13 +- 5 files changed, 214 insertions(+), 39 deletions(-) diff --git a/site/src/App.jsx b/site/src/App.jsx index 95fe4b5..0b0114b 100644 --- a/site/src/App.jsx +++ b/site/src/App.jsx @@ -1989,8 +1989,18 @@ function HomeIntro() { software and carefully bounded prototype workflows.

diff --git a/site/src/quantum-devil/QuantumDevilDialog.jsx b/site/src/quantum-devil/QuantumDevilDialog.jsx index d5e9cb3..aa44308 100644 --- a/site/src/quantum-devil/QuantumDevilDialog.jsx +++ b/site/src/quantum-devil/QuantumDevilDialog.jsx @@ -159,6 +159,10 @@ export default function QuantumDevilDialog({ open, onClose }) {
+ {loading &&
Preparing experiment...
} {error &&
{error}
}
diff --git a/site/src/quantum-devil/createQuantumDevilGame.js b/site/src/quantum-devil/createQuantumDevilGame.js index 3a95d1d..ec7a9b6 100644 --- a/site/src/quantum-devil/createQuantumDevilGame.js +++ b/site/src/quantum-devil/createQuantumDevilGame.js @@ -44,7 +44,6 @@ class QuantumDevilScene extends Phaser.Scene { this.createTower(); this.createPlayer(); this.createKeyboard(); - this.createProgressRail(); this.configureCamera(); this.applyPhase(false); this.emitState(true); @@ -262,7 +261,7 @@ class QuantumDevilScene extends Phaser.Scene { this.addPlatform(280, 2720, 220, 22, "crumble"); this.addPlatform(520, 2580, 220); this.addPlatform(280, 2440, 220, 22, "crumble"); - this.addPlatform(400, 2300, 650, 26, "checkpoint"); + this.addPlatform(400, 2300, 430, 26, "checkpoint"); this.addPhasePlatform(180, 2160, 190, 0); this.addPlatform(440, 2020, 190); @@ -291,15 +290,13 @@ class QuantumDevilScene extends Phaser.Scene { checkpoint: 0x123c43, summit: 0x174f45, }; + const accent = kind === "checkpoint" ? 0x35e0b8 : kind === "crumble" ? 0xff6b8a : 0x5a8099; const platform = this.add.rectangle(x, y, width, height, colors[kind] ?? colors.neutral, 1); - platform.setStrokeStyle(kind === "checkpoint" ? 2 : 1, kind === "checkpoint" ? 0x35e0b8 : 0x5a8099, 0.9); + platform.setStrokeStyle(kind === "checkpoint" ? 2 : 1, accent, 0.9); platform.setData("kind", kind); this.platforms.add(platform); platform.body.updateFromGameObject(); - - if (kind === "crumble") { - this.add.rectangle(x, y - 7, width - 20, 2, 0xff6b8a, 0.42); - } + platform.setData("wallDetail", this.addWallFacade(x, y, width, height, accent, kind)); if (kind === "checkpoint") { this.add.text(x, y - 28, "CHECKPOINT", { color: "#35e0b8", @@ -311,6 +308,29 @@ class QuantumDevilScene extends Phaser.Scene { return platform; } + addWallFacade(x, y, width, height, accent, kind = "neutral") { + const facadeDepth = kind === "checkpoint" ? 42 : 32; + const top = -height / 2; + const graphics = this.add.graphics().setPosition(x, y).setDepth(1); + graphics.fillStyle(kind === "checkpoint" ? 0x0d3035 : 0x102738, 0.94); + graphics.fillRect(-width / 2, top, width, facadeDepth); + graphics.fillStyle(0x050b12, 0.34); + graphics.fillRect(-width / 2, top + facadeDepth - 8, width, 8); + graphics.lineStyle(3, accent, kind === "crumble" ? 0.72 : 0.92); + graphics.lineBetween(-width / 2, top, width / 2, top); + graphics.lineStyle(1, 0x8ba2b5, 0.22); + graphics.lineBetween(-width / 2, top + 15, width / 2, top + 15); + + const blockWidth = kind === "checkpoint" ? 72 : 58; + for (let offset = -width / 2 + blockWidth; offset < width / 2; offset += blockWidth) { + graphics.lineBetween(offset, top, offset, top + 15); + } + for (let offset = -width / 2 + blockWidth / 2; offset < width / 2; offset += blockWidth) { + graphics.lineBetween(offset, top + 15, offset, top + facadeDepth); + } + return graphics; + } + addPhasePlatform(x, y, width, requiredPhase, entangled = false) { const color = requiredPhase === 0 ? 0x22d3ee : 0x8b5cf6; const platform = this.add.rectangle(x, y, width, 20, color, 0.9); @@ -318,7 +338,9 @@ class QuantumDevilScene extends Phaser.Scene { platform.setData("kind", "phase"); this.platforms.add(platform); platform.body.updateFromGameObject(); - this.phasePlatforms.push({ platform, requiredPhase, color }); + const detail = this.addWallFacade(x, y, width, 20, color, "phase"); + platform.setData("wallDetail", detail); + this.phasePlatforms.push({ platform, detail, requiredPhase, color }); const label = entangled ? `E${requiredPhase}` : `|${requiredPhase}>`; this.add.text(x, y - 25, label, { @@ -411,21 +433,6 @@ class QuantumDevilScene extends Phaser.Scene { }); } - createProgressRail() { - this.add.rectangle(GAME_WIDTH - 22, GAME_HEIGHT / 2, 3, GAME_HEIGHT - 84, 0x5a8099, 0.38) - .setScrollFactor(0) - .setDepth(30); - this.progressMarker = this.add.rectangle(GAME_WIDTH - 22, GAME_HEIGHT - 44, 10, 24, 0x22d3ee, 1) - .setScrollFactor(0) - .setDepth(31); - this.add.text(GAME_WIDTH - 22, 20, "TOP", { - color: "#8ba2b5", - fontFamily: "Roboto Mono, monospace", - fontSize: "8px", - resolution: 2, - }).setOrigin(0.5).setScrollFactor(0).setDepth(31); - } - configureCamera() { this.cameras.main.setZoom(RENDER_SCALE); this.cameras.main.setBounds(0, 0, GAME_WIDTH, WORLD_HEIGHT); @@ -444,25 +451,29 @@ class QuantumDevilScene extends Phaser.Scene { platform.setData("crumbling", true); platform.setFillStyle(0xff4f78, 0.78); + const wallDetail = platform.getData("wallDetail"); + wallDetail?.setAlpha(0.72); this.time.delayedCall(900, () => { this.tweens.add({ - targets: platform, + targets: wallDetail ? [platform, wallDetail] : platform, alpha: 0, y: platform.y + 28, duration: 230, onComplete: () => { platform.body.enable = false; + wallDetail?.destroy(); }, }); }); } applyPhase(flash = true) { - this.phasePlatforms.forEach(({ platform, requiredPhase, color }) => { + this.phasePlatforms.forEach(({ platform, detail, requiredPhase, color }) => { const active = requiredPhase === this.phase; platform.body.enable = active; platform.setFillStyle(color, active ? 0.92 : 0.1); platform.setStrokeStyle(active ? 3 : 1, color, active ? 1 : 0.36); + detail.setAlpha(active ? 0.9 : 0.14); }); if (flash) { this.cameras.main.flash(90, this.phase ? 139 : 34, this.phase ? 92 : 211, this.phase ? 246 : 238, false); @@ -721,9 +732,6 @@ class QuantumDevilScene extends Phaser.Scene { this.playerGlow.setPosition(this.player.x, this.player.y).setAlpha(grounded ? 0.1 : 0.2); this.updateZoneAndCheckpoint(); - const progress = Phaser.Math.Clamp((START_Y - this.player.y) / (START_Y - 78), 0, 1); - this.progressMarker.y = GAME_HEIGHT - 44 - progress * (GAME_HEIGHT - 96); - this.progressMarker.setFillStyle(this.zoneIndex === 2 ? 0x35e0b8 : this.phase ? 0x8b5cf6 : 0x22d3ee, 1); this.emitState(); this.wasGrounded = grounded; diff --git a/site/src/quantum-devil/quantum-devil.css b/site/src/quantum-devil/quantum-devil.css index 1c9fa84..7906de5 100644 --- a/site/src/quantum-devil/quantum-devil.css +++ b/site/src/quantum-devil/quantum-devil.css @@ -1,12 +1,12 @@ .qd-launch-button { display: inline-flex; width: fit-content; - min-height: 48px; + min-height: 68px; align-items: center; justify-content: center; - gap: 11px; + gap: 14px; border: 1px solid #111827; - padding: 0 18px; + padding: 7px 20px 7px 10px; background: #111827; color: #fff; cursor: pointer; @@ -23,9 +23,117 @@ transform: translateY(-2px); } -.qd-launch-button span { - color: #22d3ee; - font-size: 12px; +.qd-launch-copy { + display: grid; + gap: 2px; + text-align: left; +} + +.qd-launch-copy small { + color: #8bdcf3; + font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 9px; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +.qd-launch-copy strong { + color: #fff; + font-size: 14px; +} + +.qd-launch-mascot { + position: relative; + display: block; + width: 48px; + height: 52px; + flex: 0 0 48px; +} + +.qd-launch-mascot::before { + position: absolute; + top: 4px; + left: 4px; + width: 40px; + height: 40px; + border-radius: 50%; + background: rgba(34, 211, 238, 0.13); + box-shadow: 0 0 18px rgba(34, 211, 238, 0.28); + content: ""; +} + +.qd-launch-mascot-head { + position: absolute; + top: 9px; + left: 9px; + display: flex; + width: 30px; + height: 25px; + align-items: center; + justify-content: center; + gap: 5px; + border: 2px solid #22d3ee; + border-radius: 9px; + background: #07131d; +} + +.qd-launch-mascot-eye { + width: 5px; + height: 7px; + border-radius: 3px; + background: #f8fafc; + box-shadow: inset 0 -2px #22d3ee; +} + +.qd-launch-mascot-antenna { + position: absolute; + top: 2px; + left: 23px; + width: 2px; + height: 8px; + background: #8b5cf6; +} + +.qd-launch-mascot-antenna::before { + position: absolute; + top: -2px; + left: -2px; + width: 6px; + height: 6px; + border-radius: 50%; + background: #8b5cf6; + content: ""; +} + +.qd-launch-mascot-body { + position: absolute; + top: 33px; + left: 15px; + width: 18px; + height: 15px; + border: 2px solid #8b5cf6; + border-radius: 5px; + background: #0b2230; +} + +.qd-launch-mascot-body::before, +.qd-launch-mascot-body::after { + position: absolute; + bottom: -6px; + width: 7px; + height: 5px; + border-radius: 3px; + background: #f8fafc; + content: ""; +} + +.qd-launch-mascot-body::before { + left: -2px; +} + +.qd-launch-mascot-body::after { + right: -2px; } .qd-dialog { @@ -146,6 +254,44 @@ touch-action: none; } +.qd-ascent-rail { + position: absolute; + top: 22px; + right: 14px; + bottom: 22px; + z-index: 3; + width: 4px; + pointer-events: none; + background: rgba(90, 128, 153, 0.54); + box-shadow: 0 0 0 1px rgba(3, 7, 11, 0.52); +} + +.qd-ascent-rail span { + position: absolute; + top: -18px; + left: 50%; + color: #8ba2b5; + font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 8px; + font-weight: 700; + line-height: 1; + text-transform: uppercase; + transform: translateX(-50%); +} + +.qd-ascent-rail i { + position: absolute; + right: -4px; + bottom: var(--qd-altitude); + width: 12px; + height: 24px; + border: 2px solid #061019; + background: #22d3ee; + box-shadow: 0 0 14px rgba(34, 211, 238, 0.58); + transform: translateY(50%); + transition: bottom 180ms ease-out; +} + .qd-game-message { position: absolute; inset: 0; diff --git a/site/src/styles.css b/site/src/styles.css index 40e256f..baa54b1 100644 --- a/site/src/styles.css +++ b/site/src/styles.css @@ -2287,8 +2287,8 @@ h3 { .home-intro-grid { display: grid; - grid-template-columns: minmax(0, 0.88fr) minmax(380px, 1.12fr); - gap: clamp(32px, 7vw, 84px); + grid-template-columns: minmax(0, 1fr) minmax(500px, 1fr); + gap: clamp(40px, 5vw, 64px); width: min(var(--max), 100%); margin: 0 auto; align-items: center; @@ -2296,7 +2296,13 @@ h3 { .home-intro-copy { display: grid; - gap: 22px; + gap: 20px; + max-width: 560px; +} + +.home-intro-copy h2 { + max-width: 560px; + text-wrap: balance; } .home-intro-copy .eyebrow { @@ -2304,6 +2310,7 @@ h3 { } .home-intro-copy p { + max-width: 540px; color: #334155; font-size: var(--type-lead); line-height: 1.62;