semi fixed game loop