diff --git a/README.md b/README.md index 85166df..bcb80a1 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,117 @@ -Règles : +
+

MirrorGame

+

+ Browser puzzle game where you guide lasers with mirrors, tinted glass, doors, and triggers. +
+
+ ⚠️ Report Bug + · + 💡 Request Feature + · + 🎮 Play Online +

+

+ + + +

+

+ MirrorGame main menu +

+
-- Un rayon laser constant +--- -- Un ou plusieurs laser +### 🔍 Overview -- Laser non movibles, peut-être allumé/éteins +`MirrorGame` is a small laser-reflection puzzle game built during a game jam format. -- Mirroirs orientables +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. -- Prisme (dédouble le laser ou le renvoi selon l'angle) +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`. -- Vitre colorée fixe ou placable par le joueur (r,j,b) +### ✨ Features -- Bouton allumable par clique souris (interaction porte, mirroir, etc) +- **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. -- Bouton allumable par laser spécifique (interaction porte, mirroir, etc) +### 🎮 Live Demo +Play here: [MirrorGame](https://gamegamegame.ninolbt.com/) -Rayon : +### 🖼️ Screenshot -- Blanc -> Rebondis seulement sur les mirroirs et s'arrête contre les murs +Main menu: -- Rouge -> Allumage des récepteurs +![MirrorGame](./web/assets/img/image_game.png) -- Bleu -> Rebondis sur toutes les surfaces (murs compris) +### 🧰 Requirements -- Jaune -> Traverse tout (mirroir compris) +- Rust and Cargo +- A modern desktop browser +--- -Systeme de placement d'objet par grille +### 🚀 Installation and usage -Comptes utilisateur +#### Option 1 — Play online -Optionnel : timer, tableau de score, \ No newline at end of file +- 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 \ No newline at end of file diff --git a/web/assets/img/fakeimg.img b/web/assets/img/fakeimg.img deleted file mode 100644 index e69de29..0000000 diff --git a/web/assets/img/image_game.png b/web/assets/img/image_game.png new file mode 100644 index 0000000..19841bc Binary files /dev/null and b/web/assets/img/image_game.png differ diff --git a/web/assets/img/img_test_main_menu.png b/web/assets/img/img_test_main_menu.png deleted file mode 100644 index 5951742..0000000 Binary files a/web/assets/img/img_test_main_menu.png and /dev/null differ