Get smoother game loop working