2 Commits

Author SHA1 Message Date
Sysy's
a5fa460a69 Merge branch 'main' of https://git.ninolbt.com/Nono/Projet_48h 2026-03-31 16:07:33 +02:00
Sysy's
694de9e2d6 Revamp README and add main menu image
Rewrite README to provide a project overview, features, live demo link, installation and local run instructions, gameplay guide, and tech stack. Add project header, badges, and screenshot embedding. Add web/assets/img/image_game.png and remove placeholder images (web/assets/img/fakeimg.img and web/assets/img/img_test_main_menu.png) to keep assets consistent with the new documentation.
2026-03-31 16:07:26 +02:00
4 changed files with 99 additions and 17 deletions

116
README.md
View File

@@ -1,35 +1,117 @@
Règles :
<div align="center">
<h1 align="center">MirrorGame</h1>
<p align="center">
Browser puzzle game where you guide lasers with mirrors, tinted glass, doors, and triggers.
<br />
<br />
<a href="https://git.ninolbt.com/Nono/Projet_48h/issues">⚠️ Report Bug</a>
·
<a href="https://git.ninolbt.com/Nono/Projet_48h/issues">💡 Request Feature</a>
·
<a href="https://gamegamegame.ninolbt.com/">🎮 Play Online</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/language-Rust%20%7C%20HTML%20%7C%20CSS%20%7C%20JavaScript-00ADD8?style=for-the-badge&labelColor=000000" />
<img src="https://img.shields.io/badge/platform-Web-6E56CF?style=for-the-badge&labelColor=000000" />
<img src="https://img.shields.io/badge/status-Playable-28A745?style=for-the-badge&labelColor=000000" />
</p>
<p align="center">
<img src="./web/assets/img/image_game.png" alt="MirrorGame main menu" />
</p>
</div>
- 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,
- 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB