# Old Man Glitch Decoder A single-file, dependency-free recreation of **Old Man Name Generator 2**, a Pokémon Red/Blue/Yellow tool originally hosted on Glitch City Laboratories and long since offline (recovered from an Internet Archive Wayback Machine capture). Type a 7-character trainer name and see what the in-game "Old Man glitch" would actually encounter with it. ## What it does In Gen 1, walking away from the Old Man in Viridian City right after he "shows you how to catch a Pokémon" can trigger a glitch encounter built from raw bytes of your trainer's name: - Positions **3, 5, and 7** of the name are each read as a Pokémon species byte. - Positions **2, 4, and 6** are each read as that encounter's level byte. - Position **1** is never read — it has no effect on the outcome. The species comes from Gen 1's internal character/index table: every nameable character (A–Z, a–z, digits, and a handful of symbols) has a raw byte value from 128–255, and that same byte doubles as a species ID. The "level" isn't computed at all — it's printed as the identical raw byte value, which is why these encounters always show absurd levels (128–255) instead of the normal 1–100. ## Usage Open `index.html` directly in a browser. There's no build step, no server, and no external requests — the page is fully self-contained. ## Files | Path | Purpose | |---|---| | `index.html` | The app. CSS and JS are inlined directly into the page (see [Inlining](#why-inlined) below), so this one file is all you need to run or share it. | | `app.css` / `app.js` | Human-readable, unminified source of the styles/script that are inlined into `index.html`. Edit these, then re-minify and re-inline into `index.html` when publishing a change. | | `data/charmap.json` | The full character → Gen 1 byte value → species lookup table, generated from the source spreadsheet. Source of truth for `app.js`'s inlined data. | | `data/charmap.min.json` | Minified copy of the same table. | | `csp-hash.py` | Prints the `sha256-...` CSP tokens for `index.html`'s inline `