Frag Sector - Browser FPS Deathmatch

Fast, physics-driven first-person shooter running entirely in the browser - no install. Deathmatch vs bot or up to 8 players online, plus a live map editor. Inspired by Half-Life 2. Pre-alpha.

Duration: Pre-Alpha
Team: Solo project
Role: Solo - game design, engine, networking, art integration

Project Overview

Frag Sector is a 3D arena shooter built from scratch on Three.js for rendering and Rapier3D (WASM) for physics, all running client-side in a modern browser - no install, no plugins. Inspired by Half-Life 2, movement, ragdolls, the gravity gun, explosions, and thrown objects are all driven by a real physics simulation rather than scripted animation.

The pre-alpha ships three working modes: VS Bot (instant deathmatch against an AI opponent), Join Room (online deathmatch for 2-8 players on an authoritative server), and Map Editor (build, save, and immediately play custom arenas). Five distinct weapons - semi-auto Pistol, automatic SMG, a physics Gravity Gun, splash-damage RPG, and bouncing timed Grenades.

**Status:** Pre-alpha - published to get the core loop in front of players early. Playable and fun, but rough. Known limitations on the roadmap: multiplayer world-object sync (crates/barrels) works but needs refinement, hit detection is currently client-authoritative, no host migration if the server disconnects, and ragdoll deaths aren't network-synced.

Key Features

  • Five distinct weapons: semi-auto Pistol, automatic SMG, physics Gravity Gun (grab and hurl crates/barrels), splash-damage RPG, and bouncing timed Grenades
  • AI bots that navigate the arena, chase targets, pick up weapons/ammo, and use the full weapon set
  • Online deathmatch for 2-8 players against an authoritative server with snapshot interpolation
  • In-browser map editor with CSG geometry carving, lighting, object placement, spawn/pickup points, and one-click "Play Map"
  • Physics-driven feel: ragdoll deaths, particle explosions and muzzle flashes, positional 3D audio

Project Gallery

https://fragsector.vercel.app/

Technical Challenges & Solutions

Challenge 1

Real-time physics in a browser tab

Solution

Running a full rigid-body simulation at 60 Hz alongside a 3D renderer is expensive. Frag Sector uses Rapier3D compiled to WebAssembly, with the physics tick decoupled from the render loop so simulation stays stable independent of frame rate. The same engine drives player collision, the gravity gun, grenades, RPG blasts, and ragdolls.

Challenge 2

Keeping an online match in sync

Solution

Multiplayer runs against a Node.js authoritative server that also runs Rapier for server-side physics and damage arbitration. Client and server talk over WebSocket: clients send inputs and events, the server broadcasts world snapshots at ~20 Hz, and remote players are smoothly interpolated between snapshots. The networking sits behind a transport abstraction (a mock in-memory network for local testing, a real WebSocket client for live play) so game logic doesn't care which one it's wired to.

Challenge 3

Letting players build levels

Solution

The map editor uses three-bvh-csg to carve real holes and shapes out of geometry (Constructive Solid Geometry) directly in the browser. Maps export to JSON and load straight back into a playable match, so the editor and the game share one map format end to end.

Results & Impact

Complete arena shooter that loads in any modern browser with zero install - open a URL and play

Three working modes: VS Bot, online Join Room (2-8 players), and a Map Editor

Real physics simulation (Rapier3D WASM) driving movement, gravity gun, explosions, and ragdolls

Authoritative-server multiplayer with snapshot interpolation behind a swappable transport layer

Technologies Used

Three.js
Rapier3D (WASM)
TypeScript
Vite
WebSocket
Node.js
three-bvh-csg
three.quarks
Web Audio API

Project Links

Interested in this project?

Let's discuss how I can help with your similar requirements.

Get in Touch

Similar Projects