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 generalized replication library built on top of jecs. It gives you efficient, flexible, per-player synchronization of ECS entities and components between your server and client worlds — without tying you to any specific networking library.

Quickstart

Get replication working in your project in minutes with a complete working example.

Installation

Install feces via pesde or copy the source directly into your project.

Simple Setup

Set up server-to-client replication using standard Roblox RemoteEvents.

API Reference

Full reference for every function, method, and type exported by feces.

Why feces?

Most Roblox replication solutions require you to manually track what changed and write custom sync logic for every component. feces eliminates this by sitting on top of jecs world observers — it automatically tracks every component add, change, and removal, then batches those into per-player delta packets you send over whatever networking layer you prefer.

Replication Model

Learn how feces tracks changes and generates delta packets.

Player Filters

Target specific players, lists, or use predicate functions.

Entity Lookup

Understand how entity IDs are mapped across server and client worlds.

Groups

Partition entities into isolated replication namespaces.

At a Glance

local feces = require(path.to.feces)
local instance = feces.new(jecs, world)

-- Replicate all components on an 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 all components to a list of players
world:set(entity, instance.replicated, { Player1, Player2 })

-- Replicate using a filter function
world:set(entity, instance.replicated, function(player)
    return player ~= Player1
end)

How It Works

1

Mark entities for replication

Add the feces.replicated component to any entity you want replicated. Use jecs pairs to target individual components, and set a player value to control who receives the data.
2

Collect changes each frame

Call feces:delta() at the end of your game loop. feces returns a Changes table and a Deletes table containing only what changed since the last call.
3

Build per-player packets

Pass the changes and deletes to feces.combine() to get one Applyable packet per player, ready to fire over your remote of choice.
4

Apply on the client

Call feces:apply(packet) on the client to merge the incoming data into the client-side jecs world, automatically triggering any lifecycle hooks you’ve registered.

Build docs developers (and LLMs) love