Testing a Roblox game without Roblox: 2,000+ scenarios on a fake engine

Testing a Roblox game without Roblox: 2,000+ scenarios on a fake engine


Waterpark is our Roblox game: a waterpark on the sea with dozens of slides, roller coasters, a zoo continent and rockets to a moon island. It went public on 2026-09-21, and in the following three and a half weeks it got about 460 commits and around 76,000 lines of Luau.

Nobody places parts by hand. The entire map, about 32,500 parts, is generated in code when the server starts. That made fast iteration possible, and it also meant that any change could quietly move a slide into a wall.

The usual way to check a Roblox game is to open Studio and play it. Studio can’t be scripted in CI, though, and on our development PC even the standard build tool (Rojo) was blocked by app-control policy. So we built our own toolchain.

Three small tools instead of Studio

  • scripts/build.py (212 lines) replaces rojo build. It reads the same default.project.json and writes the place file Studio opens. It supports only the features this project uses, which is why it fits in 212 lines.
  • scripts/mock/roblox.luau (about 1,350 lines) is a fake Roblox API. Its header lists its three design choices. Vector3 and CFrame really compute, because the main point is checking map coordinates. Instance is a bag that accepts any property, plus the methods and events we actually use. task.wait and task.delay run on a virtual clock that tests fast-forward with __advance(seconds).
  • scripts/check.py (about 1,050 lines) lints with luau-analyze, bundles the mock with every game module, boots the real server code on the mock, runs the scenario file and renders a top-down map image from the generated parts.

The scenario file is the bulk of it. Bots walk to rides, ride them, buy things, hatch pets and leave, and the assertions check what the server did. The count went from 1,382 on 2026-10-04 to 2,106 by 2026-10-14. Because time is virtual, a 30-second ride takes no real time.

A fingerprint for 32,000 parts

Generated geometry has a particular failure mode. A refactor of one helper shifts a staircase by two studs, and nothing errors.

So the mock hashes every generated part, grouped by folder, and compares the result with a committed baseline (layout_hash.txt). Any change in geometry fails the check and names the folder that moved. When a move is intentional, you rerun with --rehash, after checking that the folders that changed are the ones you meant to change.

A second guard fails the build if hard-coded coordinates appear anywhere outside the one layout module. Before that rule existed, the same position had been copied into 22 places. Now there are none.

Measuring “it feels jerky”

The best example of what the harness made possible came from a complaint about the top coaster. It felt jerky near the end of the ride.

We first recorded the seat’s position and rotation in Studio at 60 fps. Two spots stood out. On a nearly straight section, the roll swung from −31° to +38° to −19° within 0.3 seconds, which is 9° to 14° per frame. Near the station, the heading changed 15° to 19° per frame on a tight turn.

Then we reproduced it headlessly. scripts/mock/ridefeel.luau (132 lines) moves the train with the same math the in-game ride animator uses, with no smoothing, and samples all three boats every 1/60 of a second. It found the same two spots, at the same size, as the Studio recording. From there we could test fixes in seconds instead of riding the coaster over and over.

There were three causes:

  • Banking was smoothed over distance, not time. A ±24-stud window sounds reasonable, but at 220 studs per second it covers about 0.1 seconds.
  • Braking started too late, so the lead boat took the last bend almost at full speed.
  • Catmull-Rom splines break curvature at control points. A circle sampled every 45° wobbled between radius 32 and 57.

The fixes: a global cap on how fast banking can change (300° per second, 5° per frame), applied only where a path exceeded it, so every ride already under the cap stayed exactly the same. Position smoothing on looping paths. And reshaping the worst sections of both coasters.

Worst frame Top coaster Water coaster
Roll change per frame 14.0° → 5.3° 24.9° → 5.0°
Heading change per frame 20.4° → 4.7° 10.5° → 5.4°
Top speed 240, kept 396, kept
First drop 87.6°, kept 86.9°, kept

The coasters got smoother without getting tamer. The near-vertical drops and top speeds stayed the same, and that was the actual requirement. The harness now asserts roll and heading changes of at most 6° per frame and pitch of at most 10° on every coaster, with thresholds taken from the Studio recordings of what felt bad.

What it can’t see

We’re explicit about the limits. The mock has no lighting, no water rendering and no real physics. It also runs with streaming off, so it can’t catch bugs where a client hasn’t loaded part of the world yet.

For those we still play in Studio, and the game draws a build stamp (date, time and commit) on screen. We added it after testing an old server build four times in a row by mistake.

What we took away

  • If the engine can’t run in CI, fake the parts you depend on, and make the maths real. A mock with real vectors and a virtual clock is enough to test most gameplay.
  • Turn feelings into per-frame numbers. “Jerky” became “24.9° of roll in one frame”, and that’s something you can assert on.
  • Fingerprint generated content. When code builds the world, a diff in the code doesn’t tell you what moved. A hash per folder does.