Skip to main content

Entangle Overview

Entangle is FigNet's game-state module: it owns rooms, entities, and entity replication on top of the core FigNet transport. It is hosted by the EntangleServer process and loaded at runtime as a module alongside the core FigNet stack, rather than being compiled into the transport itself.

Where Entangle fits

FigNet's recommended production shape splits traffic into a control plane and a data plane (see Architecture for the full picture):

  • Control plane (WSS/TLS) handles authentication, lobby, and matchmaking, and issues a JoinTicket for a room.
  • Data plane (RUDP - ENet/LiteNetLib-style) is where a client connects once it holds a valid JoinTicket, and where gameplay traffic such as entity updates and room events actually flows.

Within that shape, FigNet's core owns the envelope format, version negotiation, the authentication handshake, and ticket issuance/validation. Modules own gameplay semantics on top of that - rooms, entities, and per-message authorization rules such as ownership and roles. Entangle is the module that fills that role for room- and entity-based gameplay (FnVoice fills the equivalent role for voice chat).

Rooms and entity replication

Once a client has connected over RUDP and presented its JoinTicket, it joins a room and gameplay traffic begins - entity updates and room events among them. The Room/Game Server can run this gameplay as either authoritative logic or a relay between clients, depending on the game's model, and Entangle's owner-authoritative entity model and per-message ownership checks are what let a room enforce which client is allowed to update which entity.

For rooms with many clients and entities, Entangle also narrows what gets sent to each client through area-of-interest fan-out rather than broadcasting every update to everyone - see Area of Interest for the details.

The EN.* facade

Like the rest of FigNet, Entangle exposes its public surface as a static facade - EN.* - covering room, lobby, and matchmaker access, mirroring the FN.* core facade and the FNVoice.* (or module-equivalent) facade used by FnVoice. New code should prefer these entry points over reaching into Entangle's internals.

The pages in this section cover Entangle's area-of-interest system, room execution modes, game authoring, and how it compares to other networking frameworks in more depth.