RPG.PRG
WHAT IT IS.
A TypeScript Phaser 3 + Parcel dungeon crawler where mining is literal and the chain grows in front of you. I built it to teach — specifically to make 51% attacks visible to a non-technical audience the way a game can. Chests hold coin balances; minters issue blocks; NPCs are polite transaction partners; the player's job is to keep the loop alive. The intended class demo would have shown what happens when the same miner wins enough rounds in a row to rewrite the visible chain, and the visible chain is what makes the abstract attack legible. The build reached the screen as a working dungeon with a literal chain growing under it. I never used it in class. The game stays as the design note it was meant to be: the mechanics are there, the demo is not.
THE ARC.
Tommy Leung's ourcade phaser3-dungeon-crawler-starter provides the first twelve commits: the initial Phaser scaffold (fauna, lizard, treasure), .github/workflows/main.yml, and six Update main.yml commits tightening the GitHub Pages release pipeline — Parcel build → JamesIves/github-pages-deploy-action@releases/v3 → gh-pages, plus actions/create-release@v1 uploading SourceWithAssets.zip. The repo then sits dormant seventeen months. I return 2021-10-06 with Starting up new project: ten character atlases (alchemist, barmaid, bartender, blacksmith, farmer, fisherman, kid01, kid02, merchant, minter) replace the template's fauna; Playable.ts extracts the player class. Then twenty-two days of focused work.
Day one: chests + coin. Day three: coins flying, bubbling up, minters minting, blocks chained. Day five: Create and destroy is the densest commit — 25 files, +632/−337, the coin/explosion/mempool sprites and the cube-chain slot. Then Title, NPC removal lifecycle, game rules, and Mouse moves (with angle bucketing feeding new PlayerMovement(up, down, left, right)) as the closing commit. The design makes blockchain activity visible through balances, minting and a growing chain. The README TODO outlines additional ideas, including a 51%-attack game-over rule; that is a design note, and this archive does not establish which version implemented it. Named constants in Game.ts — COINS_PER_BLOCK, MINTING_CYCLE, BLOCK_TO_CHAIN, CHAIN_SLIDE, MAX_MEMPOOL_COINS — make the existing game loop easier to inspect.
WHY I NEVER USED IT.
Two reasons that have nothing to do with the build itself. The first is that I built it during a window when I was preparing other classroom material — Chainopoly for the IESB Brasília class, the slides corpus — and the dungeon-crawler demo was the third teaching artifact in line and never got its slot. The second is that I never worked out how to run the demo without the audience sitting through a tutorial to learn the dungeon controls first, and the whole point of the exercise was to skip the tutorial and watch the chain grow. The mechanics are good; the demo was unrunnable. The artefact sits in the archive with the design notes that justify its existence, and that's the honest accounting of it.
ROLE.
Solo. Tommy Leung's twelve commits are the ourcade template (CI, dependencies, scene scaffolding, GitHub Pages release); every game mechanic, asset import, minting cycle and bug fix is mine.
Stack chips: Phaser 3.22 · Parcel · TypeScript · Tiled (.tmx) · GitHub Actions (JamesIves gh-pages deploy, SourceWithAssets.zip) · ourcade starter origin.
WHAT I LEARNED.
The intent and the demo have to ship together. A teaching artefact that lives in the source tree but never reaches a classroom is, in practice, a private project that happens to have lesson plans attached. The mechanics were correct; the deployment was the lesson I had not learned to run.
An old wish doesn't always get its moment. I had wanted to write a classic RPG since I was a kid. This was the version where that wish collided with an actual research interest, and the collision produced something coherent. It didn't produce a class.
Toy economies teach by being concrete.
Minter.setMempool(0)firing after a successful cube overlap is the same intuition that later became settlement-loop research — the game made a property of the model visible by literalising it on screen.Mechanics carried the idea. The README TODO was the design note, the title couplet explained the premise, and the constants block (
COINS_PER_BLOCK=3,MINTING_CYCLE=5000,BLOCK_TO_CHAIN=600,CHAIN_SLIDE=500,MAX_MEMPOOL_COINS=100) was the executable specification. The design is preserved in the source even when the demo isn't run.