Kit Speed Lab: Repeatable Benchmarks for Kits and Games
README.md
speedLabHoldfast
Version 0.1.5. The Kit Speed Lab's benchmark set for Holdfast, the co-op wave survival kit and game: survivalArenaKit's rules with boardwork's boarded windows, hordeKit's enemies and buyStationKit's between-wave shop (kit and game world bdaae769-71e8-4ee8-85ba-73eb18d9445d).
It measures what a horde game costs: the quiet yard in the buy phase with no enemies, normal play on wave 2 ("zombie horde slow"), a heavy wave from above and at a window, the worst case of the biggest wave with the barricades breaking ("many enemies lag", "co-op wave survival lag"), three fixed views, a camera fly-through, two players, and a five-minute soak of normal play with memory sampled, which shows whether memory stays flat. Each runs on desktop settings and at tablet settings.
Everything is built through survivalArenaKit's public API (Holdfast.director(), Holdfast.build, the Director's newGame and nextWave, boardwork's repair, SecondWind's configure). Where a Holdfast game already runs in the scene, as in the Holdfast world's farmstead, the set drives that game's own Director, so the numbers are the real game's. Anywhere else it builds a small walled yard with eight boarded windows and five buy stations, so the set runs in any world that installs survivalArenaKit.
speedLabHoldfast.set: the benchmark definitions, registered withLab.register(idholdfast).speedLabHoldfast.cycles: the teardown check over several matches: each match is built, played and torn down, and memory (Luau heap after the collector finishes, process, GPU, textures), entities, script instances and audio voices are compared with a baseline read before the first match, per match and as a slope a minute. Runs on desktop and in a browser.speedLabHoldfast.results: Holdfast's before and after numbers, desktop and browser (empty until measured).- Guide: How to measure how fast a co-op wave survival game runs.
- Example guide: Example: speeding up Holdfast's biggest wave with the speed lab, start to finish.
Run the whole set from the lab's board, or in play: zero speedLab run speedLabHoldfast.set (quiet, play, stress, worst, still, fly, 2p, soak, tablet pick a part).
During a wave benchmark the host keeps every player invulnerable, so no run ends in a defeat, kills one enemy every 1.5 s the way players shooting would, and starts the same wave again if it is cleared. Teardown starts a fresh game in the real game, or despawns the set's yard.
Version history
0.1.5
speedLabHoldfast.cycles: the teardown memory check over several match cycles (desktop and browser), with what each kit leaves behind named. Results: round 7 runs, desktop three times and browser twice; nothing grows from match to match. The how-to guide gains the step.
0.1.4
- both guides name the set version they belong to (they said 0.1.0); numbers and steps unchanged.
0.1.3
- the soak checks that memory comes back after the game is torn down: the game's script heap is read before the build and polled for up to 60 s after teardown (limit 4 MB, benchKit's own for the game VM in play), with no enemies alive and none of the set's entities left; the row prints "memory back after teardown pass/FAIL" (needs speedLab 0.2.13). Results: three soaks, memory flat in play and back after teardown. A wave start that raced teardown no longer raises.
0.1.2
- Results: desktop pairs within 15% (hordeKit Mind -29% in the biggest wave) and the browser runs (no measurable gain, with why).
0.1.1
- Results of the Holdfast speed release (hordeKit 1.0.7, survivalArenaKit 1.0.9): enemy logic in the biggest wave 0.34 -> 0.16 ms per enemy on desktop; no measurable change in the browser. Pins survivalArenaKit 1.0.9.
0.1.0
- First set: quiet, play, stress, worst (the biggest wave with the barricades breaking), still, fly, 2p and a five-minute memory soak, each for desktop and tablet; drives the scene's own Holdfast game or builds a walled yard; the how-to and example guides; results empty until measured.