- Home /
Questions about the fixed frame rate of Unity
We are trying to develop the communication competition application which is absolutely the same frame rate for each tarminal.
We tryed to run on configration of the following. -Time.maximumDeltaTime : [1/60] -Time.fixedDeltaTime : [1/60]
After that, we checked the result is the following. The result was not exact same the frames.
Our application's spec has to play on the same frame.
Is it not able to connect the exact same frame each other on 60f ?
If you have any questions, please feel fee to contact us.
Regards,
Application.TargetFrameRate http://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
Answer by phil_me_up · Dec 24, 2015 at 01:50 PM
If I understand you right, you're looking at connecting one or more devices and on some event, you want something to happen on the exact same frame on every connected device?
This is problematic for a few reasons such as:
you can't guarantee the speed of connection between the device and the server
you can't guarantee the performance of the device.
For example, the communication from the server to "device A" might be 10ms, where as the server to "device B" might be 8ms. Additionally, "Device B might be running at 60fps but "Device A" might be at 52fps.
Given you can't guarantee any of this, what you need to do is compensate, taking into account any lag. This is why generally why when lerping something between positions, you base it on time passed, not on frame rate as it might take one device 1 second to do 60 frames, but another device might be 2 seconds.
Does that help?