Building a Browser FPS with Socket.io and Three.js

After spending weeks trying to fix a broken WebSocket foundation in arena-shooter-v2, I gave up and forked Forge_FPS instead. Best decision I've made this month.

The Problem

The original project used raw WebSocket + geckos.io for WebRTC data channels. The RSV1 fix for noServer + perMessageDeflate was brittle, reconnection logic kept breaking, and position sync had drift issues that I couldn't nail down.

The Fork

Forge_FPS uses Socket.io with its built-in room system and fallback transports. The migration was straightforward:

Security Setup

The game runs on port 8050 locally. No ports are opened on the firewall — everything routes through Cloudflare Tunnel (outbound-only connection from the server). CF handles:

The tunnel config looks like:

ingress:
  - hostname: gaming.kamalrajnaidu.com
    path: /socket*
    service: http://localhost:8081
  - hostname: gaming.kamalrajnaidu.com
    service: http://localhost:8050

What's Next