IT lexicon › Programming › Update method

Update method

Programming På svenska → Updated: 2026-10-25

The pattern where each game object owns a method the game loop calls once per frame to advance it one time step.

Formalised in Game Programming Patterns. The loop iterates a collection of objects and calls update() on each; the object itself knows how to advance its own enemy, particle or projectile by one frame. The pattern is so obvious that few name it — but naming it makes its pitfalls visible.

Two of them: ordering dependence (object A updates before B and sees a half-stale world) and mutating the collection mid-iteration (an enemy that dies and removes itself). The pattern assumes a fixed or measured time step handed down by the loop — hence the link to delta time.

← Back to the lexicon