Skip to main content

Week 2: A game that needs a screen cannot be measured

If a game's rules cannot run without its renderer, nothing about it can be measured. This week the specimen runs with no window open, in 6 ms.

2 March 2027

Is it me or is it the game? You cannot tell by playing alone. In the two minutes a person spends on one run, the rules on their own get through about twenty thousand.

Open the slides

A person needs 120 s to play one run of Close Quarters. The rules need about 6 ms. Everything else in this course is built on that gap.

The claim

You cannot measure a game whose rules are tangled up with its drawing code. A run that needs a window, a frame clock and a person holding the keys happens once every two minutes. A run that needs none of them happens about twenty thousand times in the same two minutes.

What makes the specimen measurable

All of Close Quarters lives in one function:

step(run, dt, input, rng)

It takes the state of a run, a slice of time, a direction and a source of random numbers, and it moves the run forward. There is no canvas in it and no clock. Three things follow.

What you leave with

One run of the specimen on your own machine, with no window open: how long it took in milliseconds, how it ended, and proof that the same seed ends the same way twice.

Teaching team