Spaces:
Sleeping
Sleeping
| title: Laser Tag Party | |
| emoji: ⚡ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: docker | |
| app_port: 7860 | |
| pinned: false | |
| # ⚡ Laser Tag Party — kid-friendly multiplayer FPS | |
| A friendly multiplayer laser-tag game built with **Three.js** + a **WebSocket** server. | |
| Type your name, jump in, and zap your friends with rainbow lasers! Nobody gets hurt — | |
| you have **5 hearts ❤️**, and if you're zapped 5 times you're out (but you can rejoin | |
| instantly with fresh hearts). **Unlimited ammo, unlimited time.** | |
| ## How to play | |
| - **Enter your name** and press Play | |
| - **Click / hold** — shoot lasers (unlimited bullets!) | |
| - **WASD / Arrow keys** — move · **Mouse** — look · **Space** — jump · **Esc** — pause | |
| - On phones/tablets: on-screen pad to move, 🔫 FIRE and JUMP buttons, drag to look | |
| - 🎤 button turns on voice chat (peer-to-peer WebRTC) | |
| - Each zap = **+1 point** on the scoreboard; 5 zaps knocks a player out | |
| ## The world | |
| Big open arena with trees 🌲, rocks 🪨, colorful houses 🏠, a watch tower, clouds ☁️ | |
| and three lakes 💧 you can wade through. Laser shots are blocked by scenery, so hide | |
| behind things! | |
| ## Sound | |
| All sound effects (laser pew, hit blips, knockout, fanfares) are synthesized live with | |
| the WebAudio API — no audio files needed. | |
| ## How it works | |
| - `server.js` — Express + `ws` server: relays positions (~20/sec) and laser shots, | |
| tracks scores and hearts server-side, eliminates players after 5 hits, and relays | |
| WebRTC voice-chat signaling. | |
| - `public/index.html` — the entire Three.js client: first-person controls, blaster + | |
| tracer effects, hit detection via raycasting, HUD (hearts, scoreboard, toasts), | |
| mobile touch controls, and WebAudio sound effects. | |
| ## Running locally | |
| ```bash | |
| npm install | |
| npm start | |
| # open http://localhost:7860 in two or more browser tabs/windows | |
| ``` | |