A chapter-aligned GitHub repo for the book Vibe Coding JavaScript Games.
This repo is organized so each chapter maps to one playable game project. The goal is not just to copy code, but to understand:
- what each game system does
- how the JavaScript logic works
- how input, state, rules, and output connect
- how to use Vibe Coding to design, scaffold, refine, and expand games with AI
Each chapter folder contains:
index.htmlstyles.cssscript.jsREADME.mdchapter-guide.md
The chapter-guide.md file is the teaching companion for the code. It explains:
- the game concept
- the core logic
- how the code is applied
- where Vibe Coding fits into the workflow
- suggested upgrades and exercises
- Slot Machine
- Blackjack Command
- Roulette Frontier
- Poker Showdown
- Circuit Null
- Pulseblind
- Inversion Run
- Wreckline Salvage
- Ironwake Trader
- Relic Cartographer
- Blacksite Broadcast
- Deadzone Sector
- Phantom Mirror Arena
- Second Shadow Heist
- Hero Dice: Villain Crisis
Start with each chapter folder in order. The projects are arranged so that each chapter introduces at least one new concept, while reinforcing earlier ideas like:
- variables and state
- functions
- conditionals
- arrays and objects
- DOM updates
- canvas rendering
- collisions
- randomness
- persistence with localStorage
- reusable game logic patterns
For every game, use this cycle:
- Visualize the player experience
- Identify the systems: input, state, logic, output
- Build fast with AI-assisted scaffolding
- Explain deeply by reading and testing the code
- Extend with custom mechanics
- Reflect on reusable patterns for the next game
This repo can support:
- the book manuscript
- a Udemy course
- blog posts
- newsletters
- YouTube tutorials
- GitHub Pages demos
MIT