- What is a game loop?
The central code of the game.
- What phases does a game loop normally have?
Initialize, update and draw.
- What happens in each phase?
In initialization any necessary game setup is done. Menu is prepared and hardware specifications can be checked.
In update all objects are prepared to be drawn. This could be health point changes, physics updates and damage updates.
In draw all updated information is put on the screen. The code draws HUD, character sprites etc…