Module 13

Engineering at scale

Architecture, lifetimes, replicated state, data-driven content, network budgets, Server Authority, big worlds, 50-player servers, security, testing and team tooling.

Start lesson 1: Architecture for a big codebase: lifecycles, dependencies, frameworks
Lessons
11
Time
14 hours
Practice
31 code cells, 108 questions
You finish with
Engineering at scale m15-scale
0 of 11 finished

Lessons

  1. 1Architecture for a big codebase: lifecycles, dependencies, frameworksReplace Beacon Yard's 24 hand-ordered requires with a loader: init and start phases, declared dependencies, cycle errors, roles from one table, injected fakes for tests, tags as components, and an honest look at Knit, Nevermore, Flamework and jecs.Lab, 80 min
  2. 2Lifetimes: signals, Trove and leak huntingHunt memory leaks in Beacon Yard: the lastSwing table that never forgets a player, Player objects the engine keeps by default, a hand-written Signal, a cleanup scope per player and per object with Trove as the library choice, memory categories, and a 200-player leak test.Lab, 80 min
  3. 3One source of truth: replicated stateGive Beacon Yard one source of truth: a server-owned PlayerState sent as numbered diffs with a snapshot for late joiners, one client store for the HUD, shop and settings, the costs of attributes and remotes, and Charm, Replica and Reflex compared.Lab, 75 min
  4. 4Data-driven content: designers edit data, not codeTurn Beacon Yard's flat Config constants into items and enemies as JSON data: Rojo JSON modules, kinds in code and rows in data, a validator with design rules that fails CI through Lune, a generated ItemId type, and where Experience Configs fit.Lab, 75 min
  5. 5The network budget: measure, batch, packPut Beacon Yard's network traffic on a budget. Measure KB/s per player, turn the drone's per-frame PivotTo into a 10 Hz bit-packed UnreliableRemoteEvent stream with client interpolation, and compare hand-packed buffers with Blink and Zap.Lab, 85 min
  6. 6Server authority: prediction, rollback, lag-compensated hitsMake Beacon Yard's wrench fair at 250 ms. Learn Roblox's Server Authority model (prediction, rollback, resimulation) in a branch place, then add a clamped one-second rewind buffer so CombatService checks swings against where the drone was.Lab, 80 min
  7. 7Big worlds: streaming, LOD and interest managementGrow Beacon Yard to three zones without growing every player's bill. Pick streaming modes per model, integrity modes and pre-fetching, SLIM level of detail, a per-zone draw-call budget, and interest management for the drone stream.Lab, 75 min
  8. 8A 50-player server: budgets, Parallel Luau and native codeRun Beacon Yard with 50 simulated players and 40 crawlers. Set a per-system millisecond budget, profile the server, move crawler sensing onto Actors with results that match serial, and add --!native only where the Script Profiler shows a gain.Lab, 75 min
  9. 9Security at scale: one validation layer, shared bans, device trustMove Beacon Yard from one-server anti-cheat to checks that hold across servers: one remote wrapper with token buckets, cross-server ExploitWatch strike sync, rule kill switches, Device Trust gating and Script Capabilities.Project, 70 min
  10. 10Testing at scale: cloud CI, bots and soak testsClose the biggest gap in most Roblox CI pipelines: execute real Roblox tests in CI via Open Cloud Luau Execution, maintain a migration fixture corpus, simulate two-server locks and bots, and write the rules a nightly soak gate would apply.Project, 65 min
  11. 11Tools for your team: plugins, CLIs and code generationBuild the Yard Zone Studio toolbar plugin with undo and export validation, trace a Lune texture uploader with content hashing, and practise deterministic Luau generation.Project, 70 min

The game at the end of this module