Skip to content
Engine

Overview

Packages

EnginePackages are pure Luau building blocks such as Promise, Signal, State, Serde and Octree. They are used throughout Engine and available to your own code.

What a package is

An EnginePackage is a plain Luau module with no side effects: getting one does not start anything, connect to anything or touch the game. Packages are the building blocks Engine itself is made of, and you can use the same ones in your own code.

local Engine = require(game:GetService("ReplicatedStorage"):WaitForChild("Engine"))

local Promise = Engine:GetPackage("Promise")
local Signal = Engine:GetPackage("Signal")
local Spring = Engine:GetPackage("Spring")

Every package works on both the server and the client. On the server you can also get them through ServerScriptService.Engine.

All packages

Async and Events

PackageWhat it does
PromiseValues that arrive later. Every Async method in Engine returns one.
SignalFast, typed events. Every event in Engine is a Signal.
TimerDelayed and repeating tasks, stopwatches and countdowns on any clock.
RateLimiterToken buckets, windows, cooldowns, debounce and throttle, keyed per player.

State and Logic

PackageWhat it does
StateReactive values that update everything computed from them.
StateMachineFinite state machines with guards, timed transitions, history and parallel regions.
BehaviorTreeAI built from small reusable nodes, one tree for any number of NPCs.

Data

PackageWhat it does
CollectionsQueue, Stack, Deque, PriorityQueue, RingBuffer, LRUCache, Set and Multiset.
TableKitMore than 80 helpers for copying, merging, diffing and transforming tables.
PatchDeep paths in nested tables, templates and DataStore-safety checks.
SerdeCompact binary serialization with schemas.
CompressRun-length and LZ compression, delta encoding and Base91.
HashFast hashes, checksums, MD5, SHA-1, SHA-256 and HMAC.
IdGUIDs, sortable ids, short codes and coupons.
GuardRuntime type checking with readable error paths.

Math and Space

PackageWhat it does
MathKitInterpolation, easing, angles, projectiles, geometry tests, statistics and colour.
RandSeeded random numbers, distributions, weighted picks and shuffle bags.
NoisePerlin, Simplex, Value and Worley noise with fractal layering and warping.
SpringPhysically based springs for numbers, vectors and CFrames.
SplineSmooth 3D paths with constant-speed movement and tubes.
OctreeA 3D spatial index for radius, box, ray and nearest queries.
GraphWeighted graphs with A*, Dijkstra, flow fields, grids and spanning trees.

Memory

PackageWhat it does
PoolReuse objects instead of creating and destroying them.
BinCollect connections, instances and threads, then clean up with one call.

Configuration

Some packages have settings, such as default sizes or limits. They are listed at the bottom of each package's page and are changed like any other module's: add a ModuleScript with the package's name to your Configuration folder. See Configuration.