Most game programs carry out the following simple stages:
- get an input(s) (it could be user input through mouse/keyboard/controller or some other external inputs)
- update a status of the game
- update the output of the game according to the newly updated game status.
So, if you were to write a game code it might look like:
while (true) {
processInputs();
updateGameStatus();
draw();
}
ViSLAB