Hi, Justin,
I recently stumbled upon performance issues and I found out that DeterministicObjectManager takes the most of the CPU cycles, hence I'm trying to understand why and what it's doing?
I have several questions and I hope you help answer them.
1. Deterministic means that it's predictable. Is that what you are trying to do? perhaps for the network synchronization? Or are you just trying to make the character animate smoothly?
2. If the answer is to make it predictable, I know it's a good thing if we can achieve deterministic behaviors, however, Unity itself is not deterministic, mainly due to the Physic simulation. Even if you make UCC deterministic, the game will not be deterministic because of the randomness in Unity. Unity talked about making the physics deterministic but it's far down the road. If Unity cannot be deterministic, what's the point making UCC deterministic?
3. From what I understand, UCC uses fixed timesteps to recalculate everything. Is it really necessary to recalculate everything in the FixedUpdate(), including, collisions, animation, and etc? Even if the purpose of having DeterministicObjectManager is to make it predictable, you can still do the expensive calculation in Update() and just interpolate results from the last Update() to the current Update() in FixedUpdate(). This is what UnrealEngine does.
4. When a user is making a game with 100s players and if we can have 100s of players in a single scene and get a good framerate, my questions won't matter but it seems almost impossible expecting good framerate(disregarding rendering time) in the current setup. Have you run a simple test with 100s of players? Well, assuming the user favors faster FPS, instead of the accurate prediction, is it possible we can turn it off? Just interpolating positions, animations without the expensive operation may be much better desired. Yeah, changing the fixed timestep would not be a good idea since it will affect everything else and fundamentally, it doesn't really fix anything.
It can be quite difficult questions and I hope I better understand you and UCC.
Thanks a lot!
I recently stumbled upon performance issues and I found out that DeterministicObjectManager takes the most of the CPU cycles, hence I'm trying to understand why and what it's doing?
I have several questions and I hope you help answer them.
1. Deterministic means that it's predictable. Is that what you are trying to do? perhaps for the network synchronization? Or are you just trying to make the character animate smoothly?
2. If the answer is to make it predictable, I know it's a good thing if we can achieve deterministic behaviors, however, Unity itself is not deterministic, mainly due to the Physic simulation. Even if you make UCC deterministic, the game will not be deterministic because of the randomness in Unity. Unity talked about making the physics deterministic but it's far down the road. If Unity cannot be deterministic, what's the point making UCC deterministic?
3. From what I understand, UCC uses fixed timesteps to recalculate everything. Is it really necessary to recalculate everything in the FixedUpdate(), including, collisions, animation, and etc? Even if the purpose of having DeterministicObjectManager is to make it predictable, you can still do the expensive calculation in Update() and just interpolate results from the last Update() to the current Update() in FixedUpdate(). This is what UnrealEngine does.
4. When a user is making a game with 100s players and if we can have 100s of players in a single scene and get a good framerate, my questions won't matter but it seems almost impossible expecting good framerate(disregarding rendering time) in the current setup. Have you run a simple test with 100s of players? Well, assuming the user favors faster FPS, instead of the accurate prediction, is it possible we can turn it off? Just interpolating positions, animations without the expensive operation may be much better desired. Yeah, changing the fixed timestep would not be a good idea since it will affect everything else and fundamentally, it doesn't really fix anything.
It can be quite difficult questions and I hope I better understand you and UCC.
Thanks a lot!
Last edited: