{"id":50672176,"url":"https://github.com/k66inthesky/evm-the-machine","last_synced_at":"2026-06-08T12:04:43.678Z","repository":{"id":353589362,"uuid":"1219889188","full_name":"k66inthesky/evm-the-machine","owner":"k66inthesky","description":"EVM: The Machine — a first-person journey through Ethereum history. Built solo in 48h for Gamedev.js Jam 2026 (theme: Machines). Three.js + viem + Tone.js.","archived":false,"fork":false,"pushed_at":"2026-04-24T14:14:18.000Z","size":1250,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-24T16:31:49.458Z","etag":null,"topics":["ethereum","gamedev","gamedevjs","gamedevjs-jam","gamedevjs-jam-2026","open-source","sepolia","synthwave","threejs","typescript","viem","webgl"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k66inthesky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-24T10:19:44.000Z","updated_at":"2026-04-24T14:14:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/k66inthesky/evm-the-machine","commit_stats":null,"previous_names":["k66inthesky/evm-the-machine"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/k66inthesky/evm-the-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k66inthesky%2Fevm-the-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k66inthesky%2Fevm-the-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k66inthesky%2Fevm-the-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k66inthesky%2Fevm-the-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k66inthesky","download_url":"https://codeload.github.com/k66inthesky/evm-the-machine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k66inthesky%2Fevm-the-machine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34061138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","gamedev","gamedevjs","gamedevjs-jam","gamedevjs-jam-2026","open-source","sepolia","synthwave","threejs","typescript","viem","webgl"],"created_at":"2026-06-08T12:04:42.969Z","updated_at":"2026-06-08T12:04:43.657Z","avatar_url":"https://github.com/k66inthesky.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EVM: The Machine\n🥉3rd Place in the [Ethereum Challenge at Gamedev.js Jam 2026](https://gamedevjs.com/jam/2026/challenges-winners-feedback/#ethereum)\n\u003cimg width=\"1916\" height=\"1035\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2f19264e-0e2a-48f6-b922-957bc315bbdb\" /\u003e\n\n![cover](submission/cover.png)\n\n\u003e **Step inside the World Computer.**\n\u003e Eight chapters. Eight moments of Ethereum history. The machine remembers everything you did.\n\nA first-person 3D narrative game built solo in 48 hours for **Gamedev.js Jam 2026** (theme: *Machines*). You walk through eight diegetic scenes from a decade of Ethereum — a Hong Kong dorm room in 2013, an attic full of butcher-paper equations, the Zug spaceship-house, a 42-day crowdsale, a reentrant hall of mirrors, a corridor that forks, a neon DeFi trading floor, and a humming PoW server room on Merge night. In each one you make a small first-person decision. The machine silently records what kind of person each decision implies, and at the end it shows you a mirror — your archetype.\n\nOptional on-chain: every chamber you complete emits a `ChamberCompleted` event on Sepolia. Finish all eight and a `mintJourney` souvenir NFT becomes available. **The chain is the souvenir, not a login gate** — the game is fully playable offline, no wallet required.\n\n---\n\n## 🎮 Play\n\n- **itch.io**: [Play Here](https://k66inthesky.itch.io/evm-the-machine)\n- **Source on GitHub**: [github.com/k66inthesky/evm-the-machine](https://github.com/k66inthesky/evm-the-machine)\n\nLocal development:\n\n```bash\nnpm install\nnpm run dev        # localhost:5175\nnpm run build      # static output in dist/\nnpm run preview\n```\n\nNo plugins, no installers — runs in any modern browser.\n\n---\n\n## ⛓ On-chain (Sepolia, optional — but designed for low friction)\n\n- **Contract**: [`EVMHistorian`](contracts/src/EVMHistorian.sol) at [`0x961821ADDf66BBf8A696ced1Ff94d1AD532C6DCB`](https://sepolia.etherscan.io/address/0x961821ADDf66BBf8A696ced1Ff94d1AD532C6DCB) — soulbound ERC-721, artwork is the cover image (`submission/cover.png`) served from this repo's GitHub raw URL.\n- Finish all eight chapters, and a `mintJourney(completionSeconds)` Journey NFT opens up at the finale (and on the chamber-select screen).\n- **Two wallet paths** at the finale, both gated on the same contract:\n  - **`CLAIM WITH GOOGLE`** — Coinbase Smart Wallet spawns an ERC-4337 smart account from a passkey / Google / email login, **no extension and no developer signup or credit card required**. This is the path for web2 players.\n  - **`CLAIM WITH METAMASK`** — classic injected EOA flow for players who already have a wallet. EIP-6963 wallet discovery picks the actual MetaMask provider when Binance / OKX / Coinbase Wallet extensions are also installed.\n- The Journey NFT is **soulbound**: `transferFrom` and `safeTransferFrom` revert. The token id, the bearer, the completion time, and a `tokenURI` (data: URI with embedded JSON + a stable image URL) are all on-chain.\n\nSee [`contracts/README.md`](contracts/README.md) for deploy + verify steps.\n\n---\n\n## 🕹 Controls\n\n| Action          | Key                              |\n| --------------- | -------------------------------- |\n| Move            | `W` `A` `S` `D`                  |\n| Look            | Mouse (pointer-lock on click)    |\n| Interact        | `E`                              |\n| Sprint          | `Shift` (hold)                   |\n| Choose          | `1` `2` `3` `4`                  |\n| Quit to menu    | `Esc` or `Q` (or click QUIT)     |\n\nVolume and fullscreen toggles live in the top-left of every screen.\n\n---\n\n## 🗺 The eight chapters\n\nEach chapter is a first-person scene, ~60–120 seconds. You walk in, look around, interact with one focal object, and pick from up to four choices. Every choice silently feeds an 8-dimensional archetype tracker. After Chapter 08 the finale screen tells you who the machine thinks you are.\n\n1. **THE LIMIT** *(2013, dorm room)* — Bitcoin Talk thread on the CRT: \"Bitcoin is limited to payments — or is it?\" Type a reply.\n2. **WHITEPAPER** *(2013, Toronto attic)* — Pick the opening sentence of the Ethereum whitepaper from four candidate paragraphs.\n3. **SPACESHIP** *(2014, Zug)* — `roles.md` is open on the kitchen table. Pick which of the five hats you take on.\n4. **CROWDSALE** *(2014, server room)* — Day 37 of 42. The blog post tomorrow morning will tell 5,000 buyers what ether *is*. Pick the framing.\n5. **THE DAO** *(2016, hall of mirrors)* — Seven panels replaying `withdraw()` re-entering itself. Read it. Tell the podium what it means.\n6. **FORK** *(2016, block 1,920,000)* — A corridor splits. Hard fork (cyan) or Classic (orange). Or abstain. Or walk out.\n7. **BLOOM** *(2020–2021, neon trading floor)* — Four glowing plinths: Money Lego, Primitive, Experiment, Mania. Mint to the one you actually believe in.\n8. **MERGE** *(15 Sep 2022, 06:42:42 UTC)* — The last PoW server room. A red button on a pedestal. Press it, pay respects to the miners, study the call stack, or walk out without pressing.\n\nThe 8-dim archetype vector — Visionary / Engineer / Capitalist / Governor / Rebel / Speculator / Builder / Witness — never appears in the UI during play. The finale reveals your top two.\n\n---\n\n## 🧱 Tech stack\n\n| Layer              | Choice                                   | Why                                                                       |\n| ------------------ | ---------------------------------------- | ------------------------------------------------------------------------- |\n| Engine             | [Three.js](https://threejs.org)          | Procedural geometry + canvas-textured diegetic UI is its native idiom     |\n| Bundler            | [Vite](https://vitejs.dev)               | Static `dist/` drops straight into itch.io / Wavedash                     |\n| Language           | TypeScript                               | Judges can navigate the 8-chamber architecture with type hints            |\n| Wallet / RPC       | [viem](https://viem.sh)                  | 10× smaller than ethers+wagmi, clean vanilla integration                  |\n| Contracts          | [Foundry](https://getfoundry.sh)         | Single Solidity file, single `forge create` to ship                       |\n| Audio              | [Tone.js](https://tonejs.github.io)      | Code-synthesized synthwave loops — no audio assets to manage              |\n\n**Everything in-game is procedurally generated.** No imported 3D models, no texture files, no pre-recorded audio. Every cube, every line of equation on a whiteboard, every snare hit is made from code at runtime.\n\n---\n\n## 🏆 How each jam criterion is addressed\n\n### Overall scoring\n- **Innovation** — eight first-person scenes that turn protocol history into *places* you walk through. Every diegetic surface (CRT, laptop, whiteboard, marquee, mirror, plinth, miner face) is a procedurally drawn canvas, not a sprite.\n- **Theme (Machines)** — Ethereum is the World Computer. The game is a first-person tour of its memory. The theme isn't decoration — it's the entire premise.\n- **Gameplay** — eight chapters, each a single tight decision in a distinct space. No filler. The hidden archetype tracker turns the whole arc into a personality reveal.\n- **Graphics** — procedural geometry + canvas textures + selective bloom + fog. Mipmaps + anisotropy on every diegetic screen so text reads at distance. 60fps on a mid-range laptop.\n- **Audio** — eight chamber-specific BGM moods composed live in Tone.js plus SFX on every meaningful interaction. Volume + mute in the top-left.\n\n### Challenges\n- **Open Source (GitHub)** — every file begins with a header comment explaining its purpose. The folder structure reads top-down: `src/main.ts` → `src/core/game.ts` → `src/chambers/NN-*.ts`. A stranger can understand the architecture in ten minutes.\n- **Ethereum (OP Guild)** — the on-chain integration is *meaningful*, not a login wall. Every chamber emits `ChamberCompleted(player, index, at)`. Completing all eight unlocks `mintJourney(completionSeconds)`. Players who never connect a wallet still play the full game; players who do get a permanent on-chain record. See [`EVMHistorian.sol`](contracts/src/EVMHistorian.sol).\n- **Wavedash** — the production build deploys unchanged; no platform-specific code.\n\n---\n\n## 🎓 Reading the code\n\nArchitecture, top-down:\n\n```\nsrc/\n  main.ts                # boots Game\n  core/\n    game.ts              # state machine: title → select → chamber → finale\n    renderer.ts          # WebGL renderer + selective bloom\n    fps-controller.ts    # WASD + mouse-look + AABB collision\n    input.ts             # key/mouse tracking with per-frame edges + pointer-lock edge\n    hud.ts               # DOM overlay for titles, prompts, briefings\n    palette.ts           # locked color constants\n    progress.ts          # localStorage: chapters completed\n    settings.ts          # floating volume + fullscreen\n  screens/               # title, chamber-select, finale (archetype mirror), credits\n  chambers/\n    chamber.ts           # base class — mount / build / update / win / dispose,\n                         # plus installBriefing() helper for the four-key\n                         # interaction pattern\n    01-limit.ts          # 2013 dorm — CRT + phone + bed\n    02-whitepaper.ts     # 2013 attic — laptop + two equation whiteboards\n    03-spaceship.ts      # 2014 Zug — kitchen table + roles.md\n    04-crowdsale.ts      # 2014 server room — LED marquee + draft.txt\n    05-thedao.ts         # 2016 — seven mirrors animating reentrancy\n    06-fork.ts           # 2016 — corridor fork + miner-vote sign\n    07-bloom.ts          # 2020–21 — four plinths, neon DeFi\n    08-merge.ts          # 2022 — pedestal + PoW miner blinkenlights\n  systems/\n    archetype.ts         # 8-dim hidden tracker (V/E/C/G/R/S/B/W)\n  audio/\n    audio.ts             # facade used by the rest of the game\n    synth.ts             # Tone.js composition per chamber\n  chain/\n    chain.ts             # viem wrapper: connect, markChamber, mintJourney\n    abi.ts               # hand-written ABI, matches EVMHistorian.sol\ncontracts/\n  src/EVMHistorian.sol   # on-chain scoreboard + Journey mint\n  foundry.toml           # forge config\n  README.md              # deploy steps\n```\n\nEach chamber is self-contained. Reading `src/chambers/05-thedao.ts` alone tells you the entire DAO experience.\n\n---\n\n## 📝 Credits\n\n- **Design · code · audio**: [k66](https://github.com/k66inthesky)\n- **Built with**: Three.js, Vite, viem, Tone.js, Foundry\n- **For**: Gamedev.js Jam 2026 · Theme: *Machines*\n- **Challenges entered**: Open Source · Ethereum · Wavedash\n\n## 📄 License\n\nMIT. Fork it, remix it, put it in a chamber of your own.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk66inthesky%2Fevm-the-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk66inthesky%2Fevm-the-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk66inthesky%2Fevm-the-machine/lists"}