Game Loop

Game Loop

This is the first key part of a real game loop: it processes user input, but doesn’t wait for it. If we measure how quickly the game loop cycles in terms of real time, we get the game’s “frames per second”. The game loop drives AI, rendering, and other game systems, but those aren’t the point of the pattern itself, so we’ll just call into fictitious methods here.

Source: gameprogrammingpatterns.com