5 minutes
Tune the Game
One component left, and it is the smallest in the course:
That is the eighty-second component placement in the scene, and it completes the shipped game.
An invisible input, made visible
The game this series is ported from read ?test=1 off window.location in its app shell, before the world was built. That works, and it has a cost that only shows up later: the mode was not visible to anything in the world. No debug panel could show it, no test could set it, and nothing could save it. It was a fact about the browser rather than a fact about the game.
Reading the URL is input from outside, no different from a keyboard system reading window. So it is guarded twice: on a window existing, and on the scene opting in with honorUrlParams. A headless test runner's own URL can never leak into a run.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.