Update(), Render() Seperation

Started by
19 comments, last by Bob Janova 17 years, 2 months ago
The two best (imo) reasons to separate updating and rendering:

  • It lets you run updates and renders at a different speed – useful if your monitor canonly display 60Hz and you want to run your simulation faster.
  • Many objects' update code depends on other objects (collisions being the most obvious case) so in between updating different objects the world is not in a 'correct' state. If you render objects after their own update but before other things may have happened you can get 'off by one' errors and the game will look glitchy.

This topic is closed to new replies.

Advertisement