Hi,
I googled and searched a lot. Now, this thread ( What is 'Maximum Allowed Timestep'? - Unity Engine - Unity Discussions ) helped me to understand this topic (a bit) better.
But I have one question. If the answer is yes, this would be something very important to do(?)
If it’s no, please tell me why …
Should I - for the worst scenario that could ever happen (fps drop / too heavy physics) - test my game / scene with Fixed TimeStep set as high as my Maximum Allowed Timestep?
Example:
Fixed TimeStep set to 0.01666667 (60 calculations per seconds)
Max. Allowed Timestep: 0.1
My Test(?):
Fixed TimeStep: 0.1
Max. Allowed Timestep: 0.1
Worst scenario (like running my Unity5 scene on a Nokia 3210
?) or am I doing this totally wrong ?
Thank you.
In my opinion it does not really matter. If your device underperforms even the max timestep it will just slow down the game entirely. Everything will run at an unplayable framerate and game time will slow down. This is why minimum system specs exist. You can test this behaviour by introducing code that takes longer time than this to run.
Thanks, ThermalFusion,
could please someone verify this, is my approach … wrong? Or does it slow down - towards max. Allowed Tilmestep?
in this case, my test would Not be wrong ?
As @Eric5h5 pretty much explains in the post you linked, this is not quite what happens.
I don’t believe your test will work. What that would simulate is sort of the reverse of the effect that would happen. You will only get more physics updates between frames if your frame takes longer to render than the fixed timestep is.
You will need to make your editor underperform to a point where each frame takes at least max allowed timestep time to render in order to simulate the true effect, or atleast longer than the fixed timestep.
Ok. Thank you, making the scene underperform is not as easy as it sounds.
For me this topic is sort of an really abstract thing. Just like … relativity of space and time lol
edit after post below :
thx!
1 Like
public class Sleeper : MonoBehaviour {
public int sleepTime = 350;
// Update is called once per frame
void Update () {
System.Threading.Thread.Sleep(sleepTime);
}
}
Instant lag.
1 Like