A laptop going to sleep made one scene look like it took all night
When time in each scene is computed from time stamps, one closed lid or one changed clock can add hours to a single scene and ruin every average. This entry shows how to compute time per scene from the log so sleep and clock changes cannot spoil it, and what to keep track of on the side.
Why this works
Time between two logged moments is only play if someone was there. A closed laptop or a clock that moves back turns one scene into a whole night. Putting a ceiling on each gap, and counting the excess and the backward jumps separately, keeps honest reading time apart from time that never was play.
When not to use it
Do not use a single ceiling where scenes really differ in length, such as a long cutscene next to one-line scenes: it cuts honest time. Give long scenes their own limit. If the clock itself is unreliable on many devices, fix the recording first.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 25 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "A laptop going to sleep made one scene look like it took all night" (read_entry story-scene-time-sleep-and-clock-jumps) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP