A 3D first-person shooter game with multiplayer functionality built using Three.js and Socket.io.
- 3D environment with buildings and obstacles
- First-person shooter mechanics
- Multiplayer with matchmaking
- Team-based gameplay
- Real-time player movement and shooting
- Health system with damage and death
- Arrow physics and hit detection
- Deploy this repository to Vercel
- Vercel will automatically build and deploy the static files
For the multiplayer functionality to work, you need to set up the WebSocket server on Glitch:
- Create a new Glitch project
- Upload these files:
- server-glitch.js (rename to server.js)
- package-glitch.json (rename to package.json)
- Note the URL of your Glitch project (e.g., https://your-project-name.glitch.me)
- Update the WebSocket server URL in js/network.js with your Glitch project URL
- Visit the deployed Vercel URL
- Click to start the game
- Press ESC to access the matchmaking menu
- Click "Find Match" to be matched with another player
- Once matched, the game will start automatically
- Team A spawns on the west side, Team B on the east side
- WASD: Move
- Mouse: Look around
- Left Click: Shoot
- Space: Jump
- Shift: Sprint
- ESC: Exit/Matchmaking menu
- P: Debug overlay
- Three.js for 3D rendering
- Socket.io for real-time communication
- Vercel for hosting the game client
- Glitch for hosting the WebSocket server
Built with Three.js and Socket.io.