source-code/
break-the-web
Public
ff92b7a3 days agohistory10 Commits
README.md
Break The Web
A meta-puzzle game where a standard React portfolio website becomes the physics-based environment for a Phaser 3 snake game.
What starts as a simple 2D platformer quickly turns into a battle against the DOM itself. Drag and drop HTML elements into the game canvas, use CSS classes as weapons, and survive a total system failure.
Features
- Cross-Realm Interactions: Use HTML5 Drag-and-Drop to pull UI elements (Inputs, Images) directly into the Phaser physics engine.
- Bi-directional Communication: The React UI updates based on game state, and the game state updates based on UI interactions.
- Persistent Horror Mode: Crashing the game permanently corrupts the website via
localStorage, altering the entire aesthetic and unlocking new puzzles.
Prerequisites
- Node.js (v16 or higher)
- npm
Installation
- Clone the repository:
git clone https://github.com/your-username/break-the-web.git
cd break-the-web
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open
http://localhost:5173in your browser.
How to Play
- Click the
#game-boxon the homepage to start the game. - Use
WASDorArrow Keysto move the snake. - Pay close attention to the website around you—if you get stuck, the solution might be hidden in the HTML.
- If you enter Horror Mode, use the Developer Console (button in the footer) and run
reset --hardif you wish to return to the normal portfolio.
Technologies Used
- React 18
- Vite
- Phaser 3
- Zustand (State Management)
- Vanilla CSS
warningDESIGN PHILOSOPHY
- ✓Containment: Every element lives within a rigid bounding box. No floating content.
- ✓Contrast: High contrast borders (#1e1b19) are mandatory. 3px standard, 6px heavy.
- ✓Depth: Hard solid shadows. No blur. Physical displacement on interaction.
LIVE PRODUCTION DEMO
Experience the rigid geometry in real-time.
REBEL
About
Interact with the web page itself using HTML5 Drag-and-Drop to pull inputs and images directly into the Phaser physics engine. Alter the website state through bi-directional communication between React and Phaser, unlocking a glitchy horror mode. The game is built using React, Phaser 3, Zustand for state management, and Vanilla CSS.
linknre.codes
ReactPhaser 3TypeScriptZustandVite