A game loop based on deWiTTERS' game loop.