Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/NeonD00m/feces/llms.txt

Use this file to discover all available pages before exploring further.

feces (“Fast Entity Component Export System”) is a delta-based, networking-agnostic ECS replication library for jecs on Roblox. It tracks component changes across your server world, packages them into compact delta packets, and gives you the tools to ship those packets to clients using whatever networking layer you already have — RemoteEvents, Blink, BridgeNet2, or anything else.

What feces does

The goal of feces is not to manage your RemoteEvents or dictate how bytes travel across the network. Instead, it solves the harder problem: knowing what changed, for whom, and producing the smallest possible representation of that diff each frame. You call instance:delta() to get the changes, iterate feces.combine(changes, deleted) to get per-player packets, fire them however you like, and call instance:apply(packet) on the client to bring its world in sync.

Replication modes at a glance

feces exposes a single replicated component tag that controls which entities are replicated and to whom. This tag lives on the feces instance returned by feces.new() as instance.replicated. Five targeting modes cover every common case:
-- instance = feces.new(jecs, world)  (see Quickstart for full setup)
local entity = world:entity()
local Transform = world:component()
world:add(entity, Transform)

-- Replicate all components on this entity to all players
world:add(entity, instance.replicated)

-- Replicate only the Transform component to all players
world:add(entity, jecs.pair(instance.replicated, Transform))

-- Replicate all components to a specific player
world:set(entity, instance.replicated, Player1)

-- Replicate only the Transform component to a list of players
world:set(entity, jecs.pair(instance.replicated, Transform), {
    Player1, Player2
})

-- Replicate all components to any player except Player1
world:add(entity, instance.replicated, function(player)
    return player ~= Player1
end)

Prerequisites

Two conditions must be met for feces to work correctly:
  1. All components must be created before feces.new() is called. feces registers observers for every existing component at construction time. Components created afterward will not be tracked.
  2. Component entity IDs must match across every world (server and each client). The simplest way to guarantee this is to create all replicated components in the same order on every machine.

Where to go next

Quickstart

Build a working server-to-client setup in five minutes with RemoteEvents.

Installation

Add feces to your project via pesde or by copying the source manually.

Simple Setup Guide

A deeper walkthrough of the recommended delta-replication pattern.

Replication Model

Understand how delta packets, full snapshots, and entity lookup IDs work under the hood.

Build docs developers (and LLMs) love