In my third-person, point-and-click game, players using nicer computers than I deved on are having the player be very wonky to control, with very slow turning and the feeling of walking on ice. It appears that the way that acceleration and turning are calculated varies based on how fast Update is called, meaning that the faster your computer is, the slower you accelerate. I empirically confirmed this theory by moving the movement code from Char#_Update to Char#_FixedUpdate, and the game then worked perfectly on faster computers.
I speculate that this hasn't been encountered before, because most devs are using more decent computers than I am. The effect is still there for other people, but smaller, because there's less difference between their computers and their players' computers.
To understand the problem, here's the code to set the player's speed from Player#Accelerate (similar code in Char affects turning):
moveSpeed = Mathf.Lerp (moveSpeed, targetSpeed, Time.deltaTime * acceleration);
This runs every Update. This means that you get very different results based on the value of Time.deltaTime. I'll give a couple example calculations (using much slower times than reality and supposing that acceleration is 1 to make calculation easier).
Suppose deltaTime is 1. That means you interpolate all the way, and you reach the target speed in 1 second.
Suppose delta time is .5. That means you get 2 cycles in a second, and the first time you get .5 way to the target speed, and at the end of the 1 second, you're only .75 of the way to the target speed.
Suppose delta time is .25. You get 4 cycles/second. The first time you're .25 of the way, the second you're .4375, third time you're .578, and at the end of the 1 second, you're only .684 of the way to the target speed.
In general, the fraction of how close you get to the target speed in a second is: 1-(1-acceleration*deltaTime)^(1/deltaTime). If you want to see a graph of that,
look here (acceleration is 1 for simplicity, x axis is the length of your update in seconds, and y axis is the fraction of the way you get to the targetSpeed in a second.
With a slow computer, you'll reach the target speed in 1 second, and with a fast computer, you'll approach .632 of the target speed in 1 second. This has a pretty significant affect on gameplay.
TL;DR: I suspect lerping with the deltaTime in Update calls is making games not as portable across machines.
Comments
moveSpeed = Mathf.Lerp (originalMoveSpeed, targetSpeed, Time.deltaTime * acceleration);