Basic implementation of game update and draw loops.