basic game loop
basic game engine loop