Skip to content

Cookbook

Every recipe by task: 81 complete examples across networking, data, commerce, combat, movement, NPCs, the world, media, operations and testing.

One task per recipe, each with a complete example, the reason it works, and links into the module pages. To build a whole game rather than one feature, start with the Workspace overview, which walks the design, plan, scaffold and build pipeline these recipes plug into.

Conventions that hold on every page:

  • Examples are game code in the Game layer. Server systems are services in src/Server/Game/Services/, listed in src/Server/Game/Registry.luau; client systems are controllers in src/Client/Game/Controllers/. kernel is the kernel a service or controller receives in init, and short snippets call it Kernel.
  • Every game channel is declared once in src/Shared/Game/Channels.luau and reaches a system as self.Net. Kits declare their own channels.
  • Everything a recipe creates has an owner: a session (session:bind), a scope (kernel:createScope()) or the service’s stop. Timers are Scheduler deadlines, and continuous work runs only while something needs it. None of the examples poll.
  • Recipes that depend on services Studio cannot fully exercise (DataStores, MemoryStores, MessagingService, teleports, bans, badges, real purchases, real latency) carry a Status note: what the specs and regression runners prove, and what still needs a published place.

Intents, channels, replicas, the Bus, cross-server events and player text. The full page is Networking and state.

I want to Uses
Send a player action to the server NetDriver, Hooks
Define channels once for both sides Registry
Push updates to clients NetDriver state channels
Replicate live state with deltas Replica
Ask the server a question NetDriver requests
Decouple systems with events Bus
Bridge Bus events across the network BusBridge
Send events across servers MessageDriver
Filter text players write TextFilter
Punish network spammers Rate limiting, Consequences
Scope replicas to zones Replica, Zones

Profiles, recovery, rejoins, settings, cross-server state and update deploys. The full page is Data and persistence.

I want to Uses
Save player data DataDriver
Set up a player when their data loads Milestones
Back up player data Version history, Backups
Rejoin without a cooldown Handoff
Save player settings and keybinds Player settings
Share state across servers MemoryDriver
Survive game updates gracefully SoftShutdown

Robux purchases, game passes, compliance, trades and the item economy. The full page is Commerce and trading.

I want to Uses
Sell a developer product safely Receipts
Sell a game pass Passes
Give players an inventory InventoryKit
Roll loot with pity timers LootKit
Gate paid random items by policy Policy, LootKit
Trade items between players Transactions
Craft items at stations CraftingKit
Sell things for coins ShopKit

Server authority with client feel. The full page is Combat and anti-exploit.

I want to Uses
Catch speedhackers and teleporters Movement monitor
Ban a cheater across servers Consequences
Validate hits with lag compensation Rewind
Teleport players without tripping the anti-cheat Movement monitor
Fire projectiles with travel time Projectiles
Steer a projectile mid-flight Projectiles
Fight hand to hand, parries included MeleeKit
Apply buffs and debuffs Effects

Responsive input under server authority. The full page is Movement and abilities.

I want to Uses
Make abilities feel instant Prediction
Gate abilities on movement state MoveKit
Add keybinds players can remap InputDriver
Cast spells with cooldowns SpellKit

Senses, movesets, routes and companions. The full page is NPCs and pathfinding.

I want to Uses
Give NPCs brains, aim skill and movesets NPCKit, BehaviorTree
Find paths four different ways Pathfinding
Summon familiars and pets CompanionKit

Zones, prompts, rounds, teams, parties, queues, quests, badges and boards. The full page is World and interaction.

I want to Uses
React to players and NPCs entering areas Zones
Let players interact with the world InteractionKit
Run a round-based match loop RoundKit
Split players into teams TeamKit
Group players into parties PartyKit
Queue players into matches Matchmaking
Queue a party together Matchmaking, PartyKit
Track quests from things that happen QuestKit
Award a badge when an achievement unlocks AchievementKit
Show stats on the leaderboard Leaderstats
Keep global top-100 boards Leaderboards

Physics, effects, sound, animation, outlines and device budgets. The full page is VFX and media.

I want to Uses
Swing hair, capes and tails BonePhysics
Rig hair automatically and make it sway HairKit
Dissolve things into drifting voxels Dissolve
Ragdoll bodies that replicate for free Ragdoll
Run the whole soundstage AudioKit
Animate rigs and blend inverse kinematics AnimKit
Highlight targets without hitting the cap Highlights
Preload assets behind a loading screen Preload
Scale effects to the device DeviceBench

Lifetimes, scheduling, processes, logging, live tuning and observability. The full page is Infrastructure and ops.

I want to Uses
Run code when a player joins or leaves Sessions
Group cleanups with a scope Scope
Schedule work without polling Scheduler
Run long-lived behaviors you can pause or kill Processes
Run heavy CPU work in parallel ActorPool
Log with scopes and sinks Logger
Capture and deduplicate script errors ErrorWatch
Tune values live without redeploying LiveConfig
Watch kernel health in live servers Kernel and boot
Watch everything live with the debug panel Debug panels
Reuse instances instead of churning them Pool
Ship gameplay analytics Analytics

Proving it works, then proving it survives hostile input. The full page is Testing and QA.

I want to Uses
Write tests TestKit
Expect a warning in a spec TestKit
Run every gate before you hand off check.py
Run the spec gate from a plugin Studio spec gate
Benchmark your own systems Bench
Fuzz every channel with hostile payloads Fuzz and audit
Audit the security surface in one call Fuzz and audit
Stress-test the kernel with simulation modes Simulation

ChloeKernel v0.9.1. Access to the framework is private and granted individually by Chloe. Games built with it credit CryptedChloes in their description.