2026-09-23 09:23:29 +02:00
2026-09-22 10:57:54 +02:00

Crystal

A native web port of Pokémon Crystal, translated from PRET's Game Boy disassembly. The game runs in TypeScript and reads graphics, maps, sprites and dialogue from the user's own ROM. No original game assets are included.

Current milestone: New Bark Town exploration. Walk around your room, downstairs, town and its buildings. Read signs, use the bedroom radio, try supported conversations, and save your progress. Opening scenes, story progression, battles, NPC movement, decorations, audio and the rest of the world are still being ported.

Run

Requires Node.js 22.12 or newer.

npm ci
npm run dev

Open the printed local URL, choose a name/character and select your uncompressed English US/Europe revision 1.1 ROM (.gbc, 2 MiB). Its checksum is verified locally. ROMs are never uploaded or stored in browser storage; select yours again after reloading to resume.

Use onscreen controls, or focus the game screen and use arrows to move, X to interact and X / Z to continue dialogue. Sessions save every 10 seconds and when paused. Switching apps pauses play. Download a backup before clearing browser data.

Native saves are separate from emulator snapshots and cartridge .sav files. Time-of-day colors follow the device clock. The tile counter measures in-game movement, not real-world steps.

Reference emulator

During development, open /reference.html to run the original game for comparison. It has separate saves and does not run inside the native player. Reference tools and the emulator are excluded from the default build.

npm run build             # Native application in dist/
npm run check:release     # Check the native distribution
npm run build:reference   # Optional reference in dist-reference/

Serve dist/ through an HTTPS static host, or use npm run preview locally. Subdirectory hosting is supported with npm run build -- --base=/Crystal/. Use HTTPS from another device; ROM verification and save locking require a secure context.

Development

npm test
npx playwright install chromium webkit
npm run test:e2e
npm run check:vendor

Local-ROM tests use Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc at the root, or CRYSTAL_ROM_PATH. They skip when absent; no test downloads a ROM. Game files, private reference builds and gameplay screenshots must remain ignored.

The full port plan covers remaining game systems, mobile UI, internet Link and walking. See the architecture and routine map and verification for module boundaries and reference checks.

References: PRET documentation, wiki and source. The development reference uses binjgb under its MIT license; see provenance.

Independent project. Not affiliated with Nintendo or Game Freak.

S
Description
No description provided
Readme MIT
3.6 MiB
0 Stars 2 Watchers 0 Forks
Languages
TypeScript 96.1%
JavaScript 2.2%
CSS 1.6%