A browser-based multiplayer PVP FPS prototype built with a TypeScript Colyseus server and a React/Three.js client. Players join a shared arena, move with first-person controls, shoot other connected players, reload, respawn, and compete on a live scoreboard.
The project is split into two standalone packages:
backend: Colyseus authoritative game server, room state, combat rules, and tests.frontend: React Router app with a Three.js arena rendered through@react-three/fiber.
- Real-time multiplayer room powered by Colyseus.
- First-person pointer-lock aiming and keyboard movement.
- Shared arena with buildings, walls, crates, and collision blocking.
- Server-side movement, shooting, health, scoring, reloads, deaths, and respawns.
- Client-side prediction for smoother local movement.
- HUD with health, ammo, status, hit feedback, damage flash, and scoreboard.
- TypeScript
- Colyseus
- React 19
- React Router 7
- Three.js and
@react-three/fiber - Mantine
- Tailwind CSS
- Oxlint and oxfmt
.
+-- backend/ # Colyseus game server
`-- frontend/ # React Router browser client
- Node.js 20.9 or newer
- Yarn
Install dependencies in each package:
cd backend
yarn install
cd ../frontend
yarn installStart the backend server:
cd backend
yarn devBy default, the Colyseus server listens on ws://localhost:2567.
In another terminal, start the frontend:
cd frontend
yarn devOpen the frontend development URL, usually http://localhost:5173, enter a
player name, and join the arena.
To connect the frontend to a different Colyseus server, set:
VITE_COLYSEUS_URL=ws://localhost:2567W,A,S,D: move- Mouse: look around after clicking the arena
- Left click: shoot
R: reloadShift: runSpace: jumpCorCtrl: crouch
Backend:
cd backend
yarn dev
yarn test
yarn build
yarn oxmint
yarn oxfmtFrontend:
cd frontend
yarn dev
yarn typecheck
yarn build
yarn oxmint
yarn oxfmtBuild both packages:
cd backend
yarn build
cd ../frontend
yarn buildRun the built frontend server from frontend:
yarn startRun the backend with your preferred Node process manager using
backend/build/index.js after building.
This is an early public prototype. The gameplay code is intentionally compact and focused on the core multiplayer FPS loop rather than account systems, matchmaking, persistence, or production hardening.
- Make hit notifications and sound
