Understanding the Game Loop

by Michael James Williams on May 16, 2011 · 0 comments

in Articles,Game Design


In Civilization, you have a period of five minutes to input everything you want to do in the current turn, before the game “ticks” and runs the game loop again based on all your input. So if you say, in Turn 23, that you want your warriors to attack a deer, then in Turn 24 everyone’s getting venison for dinner.
It’s the same with Mario. If you press the Jump button during one tick, then in the next iteration of the game loop, Mario will start to jump.

From an article I wrote for Activetuts+: Understanding the Game Loop.

If you’ve followed my Avoider Game tutorial, or done any other sort of game development, you’re probably familiar with the idea of a game loop. In this article, I’ve tried to clarify what exactly it is, and provided some terminology that will come in handy when you need to discuss it or name your game’s functions.

I hope you find it useful. If you’ve any questions, you can comment on the article itself, or ask in the comments of this post :)

Leave a Comment

Writing code? Write <pre> at the start and </pre> at the end to keep it looking neat.

Anti-Spam Protection by WP-SpamFree

Previous post:

Next post: