basic game loop
more advanced game loop