- ✅ Real-time multiplayer via WebSockets (Socket.IO)
- ✅ Collision system with walls
- ✅ Strategic wall obstacles
- ✅ Health and damage system
- ✅ Points/scoring system
- ✅ Automatic respawn
- ✅ Circular-based physics and collision detection
- ✅ Particle effects system
- ✅ HUD with player stats and leaderboard
- ✅ Audio feedback system (Shoot, Death, Collect, Power-down, Join)
- ✅ Power-ups system (Shield, Invisibility, Speed)
- ✅ Interpolation and lag compensation
- ✅ Custom favicon and UI improvements
- Backend: Node.js + Express + Socket.IO + TypeScript
- Frontend: HTML5 Canvas + JavaScript (Vanilla)
- Real-time Communication: WebSockets (Socket.IO)
- Build Tools: TypeScript compiler, ts-node-dev
- Package Manager: npm
Ensure you have the following installed on your system:
-
Clone the repository:
git clone https://github.com/ImaCod3r/laser-tag-multiplayer.git cd laser-tag-multiplayer -
Install dependencies:
npm install
-
Verify TypeScript installation (optional):
npx tsc --version
npm run devThe server will start on http://localhost:3000. Open your browser and navigate to the URL. The server will automatically restart when you make changes to the TypeScript files.
-
Build the project:
npm run build
-
Start the server:
npm start
The compiled JavaScript will be in the dist/ directory, and the server will run on http://localhost:3000.
- Open the game URL in your browser (or share it with others on your network)
- Players will be automatically connected via WebSockets
- The game supports multiple simultaneous players
- Use the controls to move and shoot lasers
Walls are rectangular objects that serve as strategic obstacles on the map:
- Block player movement - Players cannot pass through walls
- Block lasers - Shots are stopped by walls, creating strategic cover points
- Strategic positioning - Walls are placed to create challenging and balanced gameplay
- Optimized collision - Circular-to-rectangular collision detection for smooth physics
- Hits: Award points when you hit opponents
- Kills: Major points for eliminating players
- Leaderboard: Real-time ranking displayed on HUD
- Respawn: Automatic respawn after elimination with health regeneration
Loot crates spawn periodically on the map, providing temporary advantages:
- 🛡️ Shield: Extra protection and health recovery.
- 👻 Invisibility: Makes the player nearly invisible to opponents (visual feedback provided to the user).
- ⚡ Speed: Double movement speed for a short duration.
- Audio Feedback: Unique sounds for collection and when the effect expires.
| Action | Key |
|---|---|
| Move Up | W or Arrow Up |
| Move Down | S or Arrow Down |
| Move Left | A or Arrow Left |
| Move Right | D or Arrow Right |
| Shoot | Left Mouse Click or Space |
| Aim | Mouse Movement |
- Improved Matchmaking - Implement ELO rating system or skill-based matchmaking
- Game Modes - Add different game modes (Team Deathmatch, Capture the Flag, King of the Hill)
- Map Editor - Allow users to create and customize maps
- Player Profiles - User accounts with stats, customization options, and loadouts
- Weapon Variety - Different laser types (spread shot, sniper, pulse)
- Mobile Support - Touch controls for mobile and tablet devices
- Spectator Mode - Watch other players after elimination
- Chat System - In-game messaging between players
- Sound Settings - Volume control and audio preferences UI
- Graphics Settings - Resolution and performance optimization options
- Replay System - Record and playback match highlights
- AI Bots - Single-player practice against AI opponents
- Cosmetics - Player skins, laser colors, trail effects
- Achievements - Badge system for reaching milestones
- Tournaments - Seasonal competitive events with rewards
- Mod Support - Community-created modifications and plugins
- Analytics Dashboard - Game statistics and performance metrics
- Code Optimization - Reduce network bandwidth usage and optimize rendering
- Error Handling - Better error messages and disconnection recovery
- Unit Tests - Comprehensive test coverage for game logic
- Documentation - API documentation and architecture guide
- Performance Monitoring - Real-time FPS and latency display
- Cross-platform Build - Docker support for easier deployment
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by ImaCod3r
