Skip to contentTalk to us

Game loop

In Arabic: حلقة اللعبة

Game making

The cycle a game repeats dozens of times a second: read the player's input, update the world, then draw the picture.

Every game, however simple, runs on a loop that never stops. On each pass the game asks: what did the player press? Then it moves the character and the enemies, checks for collisions, updates the score and draws the new scene. This usually repeats sixty times a second, which the eye reads as continuous movement.

Understanding the loop explains why one game feels smooth and another choppy, and why a small number such as jump strength changes the feel of the whole game: that number is applied on every pass. In Fanann 2D Game Design you do not write the loop yourself; you describe the game and it runs, then you tune the numbers with sliders while it plays in front of you. Practical tip: when describing your game, think in loop terms: what the player does, what moves on its own, and when you win or lose. Those three sentences are enough for a playable start.

ExampleIn a runner game, each pass moves the ground back a little, checks whether the player hit an obstacle, then adds one point to the counter.
All terms

Your idea deserves to see the light.

Describe it in Arabic or English and Fanann builds, tests and ships it — no coding knowledge needed. Start free, no credit card.