Skip to content
N.D.
← all work

03

Flópiti

combat ai systems · archive live

authoritative shooter with enemy ai, lod ticks, and destructible terrain

Flópiti, screen capture

Flópiti is a 2D multiplayer game Nicolás built around low-latency feel: React and Phaser on the client, a Node and uWebSockets authoritative server, destructible terrain, and custom networking with client prediction and reconciliation.

  • React 19 + Phaser 3.90
  • Node + uWebSockets.js + Matter.js
  • destructible terrain + delta sync

Architecture

The interesting part of Flópiti is the multiplayer contract. The browser handles feel, prediction, and rendering; the server keeps authority, filters deltas, validates world state, and distributes compressed terrain and snapshot updates instead of trusting the client.

Authority model

The authority boundary is explicit. The client predicts its own entity locally for feel, the server remains authoritative, local entities are excluded from outbound deltas because they are predicted client-side, and authoritative snapshots are applied back into the predictor for reconciliation.

Terrain transport

The destructible terrain protocol is unusually concrete: the world is split into 64 x 64 chunks, authoritative full-chunk and delta-chunk messages, chunk-version tracking, XOR plus RLE compression, and explicit resync when client chunk versions no longer match server truth.

Performance envelope

Flópiti was not framed as vague realtime. The docs keep explicit budgets for simulation, broadcast, and render frequency, and they tie that budget to bandwidth discipline so low-latency feel does not require sending full world state every frame.

next Valley of Guardians →