Skip to content

feat: rewrite as interactive movie-hacker simulator - #3

Merged
AndriGitDev merged 1 commit into
mainfrom
claude/hacker-simulator-rewrite-uhtewa
Jun 9, 2026
Merged

feat: rewrite as interactive movie-hacker simulator#3
AndriGitDev merged 1 commit into
mainfrom
claude/hacker-simulator-rewrite-uhtewa

Conversation

@AndriGitDev

@AndriGitDev AndriGitDev commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Ground-up rewrite. The old build was a passive arcade ritual wrapped in
disclaimers; this one makes you the hacker:

  • Hackertyper core: mash any keys and convincing (fictional) code pours
    into the terminal. Keystrokes drive the whole run.
  • Five-stage missions: proxy-chain uplink on a real TopoJSON world map,
    code injection, a firewall counterattack you must out-type or get
    traced, a password-crack spectacle, and file exfil.
  • Four fictional targets (THE GIBSON, an orbital disco satellite, an
    evil bank, the Global Genius Database), each with its own loot,
    password joke, and victory card.
  • Win or lose: ACCESS GRANTED splash or CONNECTION TRACED fail screen
    with instant retry; debrief with keystroke stats and operator ranks
    from SCRIPT KIDDIE to ZERO COOL CERTIFIED, plus a copyable report.
  • Extras: ESC boss-mode spreadsheet, opt-in WebAudio synth, matrix rain,
    CRT scanlines, alarm mode, reduced-motion support, mobile MASH button.

Backend simplified to a single stdlib Go file serving embedded assets —
the WebSocket hub and generators are gone, everything runs client-side.
Adds embedded-asset tests and widens CI's JS syntax check to all modules.

Verified end to end with headless Chromium on desktop and mobile
viewports: full happy path, traced-fail path, retry, and boss mode.

Summary by CodeRabbit

  • New Features

    • Terminal panel with code typing effects
    • Password cracker and file exfiltration UI panels
    • Enhanced visual effects system (matrix rain, flash, shake, text reveal)
    • Redesigned audio synthesis system
  • Refactor

    • UI overhauled with CRT phosphor theme
    • Server simplified to static file serving
  • Documentation

    • Added project README
  • Tests

    • Added asset embedding verification tests

Ground-up rewrite. The old build was a passive arcade ritual wrapped in
disclaimers; this one makes you the hacker:

- Hackertyper core: mash any keys and convincing (fictional) code pours
  into the terminal. Keystrokes drive the whole run.
- Five-stage missions: proxy-chain uplink on a real TopoJSON world map,
  code injection, a firewall counterattack you must out-type or get
  traced, a password-crack spectacle, and file exfil.
- Four fictional targets (THE GIBSON, an orbital disco satellite, an
  evil bank, the Global Genius Database), each with its own loot,
  password joke, and victory card.
- Win or lose: ACCESS GRANTED splash or CONNECTION TRACED fail screen
  with instant retry; debrief with keystroke stats and operator ranks
  from SCRIPT KIDDIE to ZERO COOL CERTIFIED, plus a copyable report.
- Extras: ESC boss-mode spreadsheet, opt-in WebAudio synth, matrix rain,
  CRT scanlines, alarm mode, reduced-motion support, mobile MASH button.

Backend simplified to a single stdlib Go file serving embedded assets —
the WebSocket hub and generators are gone, everything runs client-side.
Adds embedded-asset tests and widens CI's JS syntax check to all modules.

Verified end to end with headless Chromium on desktop and mobile
viewports: full happy path, traced-fail path, retry, and boss mode.
@AndriGitDev
AndriGitDev merged commit d436249 into main Jun 9, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e457e91-a31b-41ab-9d71-bcae229ffbf7

📥 Commits

Reviewing files that changed from the base of the PR and between 44e42fa and 7156245.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • static/img/og-hack-the-planet.svg is excluded by !**/*.svg
📒 Files selected for processing (26)
  • .github/workflows/ci.yml
  • README.md
  • generators.go
  • go.mod
  • main.go
  • main_test.go
  • messages.go
  • server.go
  • static/css/style.css
  • static/index.html
  • static/js/alerts.js
  • static/js/audio.js
  • static/js/data.js
  • static/js/experience.js
  • static/js/fx.js
  • static/js/hack.js
  • static/js/hack3d.js
  • static/js/hexdump.js
  • static/js/main.js
  • static/js/matrix.js
  • static/js/network.js
  • static/js/panels.js
  • static/js/progress.js
  • static/js/terminal.js
  • static/js/worldmap.js
  • websocket.go

📝 Walkthrough

Walkthrough

This PR restructures Hack the Planet from a server-driven WebSocket simulation to a client-side game orchestrator. The Go backend is simplified to serve embedded static assets; the JavaScript frontend is rewritten with centralized state management, modular components, and stage-based gameplay flow. The visual design shifts from arcade cyber-brutalism to a CRT phosphor theme with multi-screen layout.

Changes

Client-Driven Architecture Transition

Layer / File(s) Summary
Backend simulation infrastructure removal
go.mod, websocket.go, generators.go, messages.go, server.go
Removes WebSocket hub, client broadcasting, server-side message types, and generator goroutines that powered the old real-time simulation model.
Go HTTP server setup with embedded assets
main.go, main_test.go
Rewrites main.go to embed and serve static files via http.ServeMux, adds PORT env override, graceful shutdown with signal context, and ReadHeaderTimeout. New tests validate embedded asset presence and fictional content markers.
Frontend game data and constants
static/js/data.js
Introduces centralized module exporting gameplay metadata: missions, boot sequences, code corpus, password hints, rank thresholds, world cities, and stage-specific UI text.
Frontend effects, audio, and UI panel components
static/js/audio.js, static/js/fx.js, static/js/panels.js
Refactors audio into a Synth class with lazy AudioContext and oscillator-based synthesis. Adds fx.js with MatrixRain canvas animation, flash/shake/scramble effects. Introduces Terminal, Cracker, Exfil classes for in-game UI animation.
World map visualization with route animation
static/js/worldmap.js
Replaces canvas network diagram with WorldMap class that decodes TopoJSON land geometry, manages route reveal state, and animates quadratic-bezier arc paths with pulsing nodes and alarm effects.
Frontend application orchestration and game flow
static/js/main.js
Rewrites from IIFE to module-based orchestrator with centralized state, screen management, and five-stage run progression (uplink, inject, firewall, crack, exfil). Async control flow with cancellation tokens and complete UI interaction wiring.
UI theme redesign and HTML/CSS structure
static/index.html, static/css/style.css, static/js/alerts.js, static/js/experience.js, static/js/hack.js, static/js/hack3d.js, static/js/hexdump.js, static/js/matrix.js, static/js/network.js, static/js/progress.js, static/js/terminal.js
Replaces arcade cyber-brutalist theme with CRT phosphor design: new multi-screen HTML layout (boot, login, missions, run, debrief, traced, boss-mode), complete CSS overhaul with new color palette and CRT overlay effects. Removes legacy visualization modules no longer called by the new orchestrator.
Project documentation and CI maintenance
README.md, .github/workflows/ci.yml
Adds README describing gameplay, tech stack, and run/build instructions. Updates CI to validate all .js files in static/js/ rather than only main.js.

🎯 4 (Complex) | ⏱️ ~60 minutes

In a land of screens and green CRT glow,
We shed the old hub's broadcast show,
Now state flows client-side, so neat,
With stages, cracks, and pure sweet treats! 🐰✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/hacker-simulator-rewrite-uhtewa

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants