MirrorGame

Browser puzzle game where you guide lasers with mirrors, tinted glass, doors, and triggers.

โš ๏ธ Report Bug ยท ๐Ÿ’ก Request Feature ยท ๐ŸŽฎ Play Online

MirrorGame main menu

--- ### ๐Ÿ” Overview `MirrorGame` is a small laser-reflection puzzle game built during a game jam format. The goal is to route a laser beam through each level by rotating mirrors, using tinted glass to change beam color, and interacting with doors, buttons, captors, and other grid-based puzzle elements until the beam reaches the target. The game is playable online and can also be run locally through the Rust server included in this repository. > Level progression is stored locally in your browser with `localStorage`. ### โœจ Features - **Laser puzzle gameplay**: Redirect beams across handcrafted levels to activate targets. - **Mirror rotation**: Rotate mirrors directly on the board to change the laser path. - **Colored glass placement**: Drag and drop red, blue, and yellow glass tiles onto the grid. - **Interactive mechanisms**: Trigger doors, buttons, captors, and rotating mirror systems. - **Multiple levels**: Progress through several unlockable puzzle stages. - **Browser save data**: Unlocked levels are persisted between sessions with `localStorage`. - **Rust-powered local server**: Lightweight backend serves the HTML, CSS, JS, and assets. ### ๐ŸŽฎ Live Demo Play here: [MirrorGame](https://gamegamegame.ninolbt.com/) ### ๐Ÿ–ผ๏ธ Screenshot Main menu: ![MirrorGame](./web/assets/img/image_game.png) ### ๐Ÿงฐ Requirements - Rust and Cargo - A modern desktop browser --- ### ๐Ÿš€ Installation and usage #### Option 1 โ€” Play online - Open [**MirrorGame**](https://gamegamegame.ninolbt.com/) in your browser. #### Option 2 โ€” Run locally from source 1. Install Rust using [rustup](https://rustup.rs/). 2. Clone or download this repository. 3. Open a terminal in the `backend` folder. 4. Start the local server: ```bash cargo run ``` 5. Open your browser at: ```text http://127.0.0.1:3500 ``` --- ### ๐Ÿ“– How to play 1. **Launch the game** - Open the online version or run the project locally. - Click **Play** from the main menu. 2. **Understand the goal** - Each level starts with a laser source. - Your objective is to make the beam reach the target tile. 3. **Rotate mirrors** - Click mirrors to rotate them and redirect the beam. - Some mirrors are controlled by puzzle mechanisms instead of direct input. 4. **Use tinted glass** - Drag red, blue, or yellow glass from the toolbox onto empty cells. - Double-click a placed glass tile to remove it and get it back. 5. **Solve interactions** - Red beams can activate buttons and captors. - Doors, rotators, and other level elements react depending on the puzzle setup. 6. **Progress through levels** - Completing a level unlocks the next one. - Use the level menu to revisit unlocked stages. --- ### ๐Ÿ› ๏ธ Tech Stack - **Backend**: Rust with `axum` and `tower-http` - **Frontend**: HTML, CSS, and vanilla JavaScript