diff --git a/README.md b/README.md new file mode 100644 index 0000000..cc9ddfe --- /dev/null +++ b/README.md @@ -0,0 +1,154 @@ +# Bitstream Bluffs šæā” + +A neon-soaked, downhill sledding game with a 1-bit Tron-wireframe aesthetic. Ride procedurally generated mountains, perform tricks, and stay ahead of **The Bit Stream**! + +## š® How to Play + +### Controls + +#### Sled Mode (Default) +- **TAB**: Toggle between Sled and Walking modes +- **W/S**: Rotate counterclockwise/clockwise (perform rotation tricks in air) +- **A**: Drag to slow down (ground) / Air Brake trick (air) +- **D**: Tuck to accelerate (ground) / Parachute trick (air) +- **SPACE**: Jump +- **SHIFT**: Restart game +- **ESC**: Pause + +#### Walking Mode +- **A/D**: Move left/right +- **SPACE**: Small jump +- **W/S**: No effect in walking mode + +### Tricks & Scoring + +**Tricks** (perform in mid-air): +- **Rotation**: 200 points Ć rotations (W/S keys) +- **Air Brake**: 150 points (A key) +- **Parachute**: 200 points (D key) + +**Combo System**: +- Chain multiple tricks in one jump for bonus multipliers +- Multiplier increases by 0.25Ć for each unique trick +- Resets when you land + +**Scoring**: +- Distance: +1 point per meter traveled +- Tricks: Base points Ć combo multiplier +- Blue Terrain: Bonus points while riding + +### Terrain Types + +- **Blue** (0x0088ff): Awards bonus points while riding +- **Green** (0x00ff44): Low friction - go faster! +- **Magenta** (0xff00aa): High friction - slows you down + +### The Bit Stream + +A relentless glitch wall chases you down the mountain. Keep moving or get consumed! + +## š ļø Technical Details + +### Stack +- **Phaser 3.90**: Game framework +- **Matter.js**: Physics engine +- **Vite**: Build tool and dev server +- **ES6 Modules**: Clean, modern JavaScript + +### Architecture + +Clean, focused implementation with minimal dependencies: + +``` +src/ +āāā main.js # Entry point & Phaser config +āāā scenes/ +ā āāā BootScene.js # Initial boot +ā āāā PreloadScene.js # Asset loading +ā āāā GameScene.js # Main gameplay +āāā core/ +ā āāā Player.js # Player physics & controls +ā āāā TerrainGenerator.js # Procedural terrain +ā āāā TrickSystem.js # Trick tracking & combos +ā āāā ScoringSystem.js # Score calculation +āāā effects/ +ā āāā Starfield.js # Parallax background +ā āāā GlitchFX.js # Periodic glitch effects +āāā utils/ + āāā seedUtils.js # Seeded random generation +``` + +### Features + +ā **480Ć270 pixel-perfect resolution** with scaling +ā **Procedural terrain generation** with seed sharing +ā **Three terrain types** with different physics properties +ā **Full trick system** with combos and multipliers +ā **The Bit Stream** chasing mechanic +ā **1-bit Tron wireframe aesthetic** with neon colors +ā **Parallax starfield** background +ā **Periodic glitch VFX** (RGB split, scanlines, screen shake) +ā **Sled/Walking mode toggle** +ā **Seed-based random generation** for shareable runs + +## š Development + +### Setup +```bash +npm install +``` + +### Run Dev Server +```bash +npm run dev +``` +Opens at `http://localhost:5173` + +### Build for Production +```bash +npm run build +``` + +### Preview Production Build +```bash +npm run preview +``` + +## šØ Design Philosophy + +This rebuild follows the principle of **simplicity over complexity**: + +- **Single-file systems**: Each core system is self-contained +- **Minimal abstraction**: Direct, readable code over complex architecture +- **Performance-first**: Efficient rendering and physics +- **Quick iteration**: Clean structure for easy modifications + +Built from the ground up following: +- `/public/docs/instructions.html` (game mechanics) +- `/docs/DESIGN-DOC.md` (technical specifications) + +## š Game Specifications + +- **Resolution**: 480Ć270 (virtual), scaled to fit +- **Physics**: Matter.js at ~900 px/s² gravity +- **Target FPS**: 60 (PC), 30-60 (mobile) +- **Retry Loop**: < 10 seconds +- **Visual Style**: 1-bit Tron wireframe with neon palette + +## šÆ Future Enhancements + +- Leaderboard system with 3-character initials (IndexedDB) +- Additional hazards and power-ups +- Mobile touch controls +- Music and sound effects +- More terrain variety +- Perfect landing detection +- Replay system + +## š Version + +**2.0.0** - Complete rebuild with clean, focused architecture + +--- + +Built with ā” by Claude Code diff --git a/index.html b/index.html index 1a518ca..4f3bb89 100644 --- a/index.html +++ b/index.html @@ -3,111 +3,39 @@
-