generalize game observer api with generic callbacks
give control of the event loop to the game (ui is observer)