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
| Package | What it does |
|---|---|
| Promise | Values that arrive later. Every Async method in Engine returns one. |
| Signal | Fast, typed events. Every event in Engine is a Signal. |
| Timer | Delayed and repeating tasks, stopwatches and countdowns on any clock. |
| RateLimiter | Token buckets, windows, cooldowns, debounce and throttle, keyed per player. |
State and Logic
| Package | What it does |
|---|---|
| State | Reactive values that update everything computed from them. |
| StateMachine | Finite state machines with guards, timed transitions, history and parallel regions. |
| BehaviorTree | AI built from small reusable nodes, one tree for any number of NPCs. |
Data
| Package | What it does |
|---|---|
| Collections | Queue, Stack, Deque, PriorityQueue, RingBuffer, LRUCache, Set and Multiset. |
| TableKit | More than 80 helpers for copying, merging, diffing and transforming tables. |
| Patch | Deep paths in nested tables, templates and DataStore-safety checks. |
| Serde | Compact binary serialization with schemas. |
| Compress | Run-length and LZ compression, delta encoding and Base91. |
| Hash | Fast hashes, checksums, MD5, SHA-1, SHA-256 and HMAC. |
| Id | GUIDs, sortable ids, short codes and coupons. |
| Guard | Runtime type checking with readable error paths. |
Math and Space
| Package | What it does |
|---|---|
| MathKit | Interpolation, easing, angles, projectiles, geometry tests, statistics and colour. |
| Rand | Seeded random numbers, distributions, weighted picks and shuffle bags. |
| Noise | Perlin, Simplex, Value and Worley noise with fractal layering and warping. |
| Spring | Physically based springs for numbers, vectors and CFrames. |
| Spline | Smooth 3D paths with constant-speed movement and tubes. |
| Octree | A 3D spatial index for radius, box, ray and nearest queries. |
| Graph | Weighted graphs with A*, Dijkstra, flow fields, grids and spanning trees. |
Memory
| Package | What it does |
|---|---|
| Pool | Reuse objects instead of creating and destroying them. |
| Bin | Collect 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.