hello, so I’m making a game where you run a complexe simulation then the player can pause the simulation then modify some things then play it again the game is realy advanced already. Obviusly people keep on telling me i should make it deterministic. If It where deterministic it would be so much better…I would finely be able to rest my concience. I’m willing to suffer to achieve this. The only thing I don’t know exactly what I need to do to make it deterministic.
There are meny things im having doubtes about.
The game uses code that executes at specifique moments of the animations. I geuse I’m going to have to change that? and execut it in the FixedUpdate().
I geuse I need to change the game so all simulation related elements execute in the fixedUpdate and it uses Time.fixedtime and Time.fixedDeltaTime?
Can I keep my trigger collisions against rigidbodys ?
For pathFinding my game currently uses the default unity path finder.Can I keep this? If no I geuse i can still use it to finde the path. Im just going to have to recode the part where I move the object to folow the path?
For physics. I currently need a 3d simple box collide against 3d box phyics and also I need to push the boxes with force given from scripts. I Have heard that the unity physics can be deterministic in specifique circomtances.
But from what I can tell its going to be hard for me to use them. Considering that I Think that just changing the time speed makes the physics no longer deterministic. From what I can tell.
A,d if the frame rate goes lower then 3 it is no longer deterministic. Wich could cause problemes.
Also I instansiate objects mid simulation, im worried this could cause problemes.
And I need to move the transform objects that teleport around.
So what are my options for the physics?
I need to make sure all the fixed updates of every gameobject executes in the same order. Is it a good idea to just make one object’s script call a MyFixedUpdate() methode in maney others?
Do I need to worry about using float maths instead of integer maths considering the game just needs to run simulations on the same device?
Is changing the time speed from 1 to 0 and 1 to 0 going to cause problemes is there anything I can do.?
Is there anything else that im going to have to deal with that I havent even thought of?
So thanks in advance. I’ll take all the help I can get.