Technical term that should exist: "black pit of despair"

Originally posted to Shawn Hargreaves Blog on MSDN, Friday, March 25, 2011

Phrase:  "the black pit of despair"

Definition:  When fixed timestep catch up logic fails to keep up with the target time.

Usage:  "Yesterday the framerate was bad, but today it got so much worse that we fell into the black pit of despair."

Etymology:

Fixed timestep game logic works by calling Update more than once in a row if it has fallen behind the target time.  This does a great job of recovering from occasional frames that for some reason took longer than usual.  It also works ok to recover from situations where the Draw operation is consistently taking too long, so the game has to reduce framerate and skip drawing every other frame, yet still wants to run Update at full frequency to avoid falling behind wall clock time.

But fixed timestep falls over if Update alone takes longer than the target time, even without Draw being called:

In simplistic implementations this causes the game to hang, calling Update over and over again without ever reaching Draw.  Smarter fixed timestep logic will detect this situation and give up, breaking out of the loop so that Draw does eventually get called, albeit at a terribly low framerate.

The pit of despair creates a discontinuity in the relationship between overall framerate and the duration of each Update call.  As you increase the time spent per Update, framerate gradually goes down, until you fall into the pit, at which point framerate plummets to zero and the game cannot continue in any reasonable way.

Blog index   -   Back to my homepage