Breaking of determinism
I have serious problem about determinism in my game. My (2D, profile view) game is about construction of tactically best castle and later fight against other players castles with it.
Building of the castle is on separate scene and the player's castle always facing to right direction, where is supposed to be enemy, in a (real-time) fight.
In fight, player's castle is on left, and facing right, enemy's is on right and facing left, which means that the enemy's castle need to be scale negated and position reversed. And there is the problem, on enemy's device there is different TSRigidBody2D simulation, then simulation of the same castle on player's device, because there is another scale and position. It's not error of TrueSync, because I broke determinism, when I reversed whole castle and moved it about 50 points, but it is serious problem, because I built game on basis, that if enemy's castle will be reversed,
the simulation will be same as on enemy's device.
If I didn't described the problem with my poor english skills well, there is picture explanation.
When I only move enemy into his side, the result uf simulation is the same on both sides.
But when I negate scale and reverse position, the simulation isn't identical on both clients.
Best Answer
-
Humm I think I got @Vokyczech, the simulation must be the same in both machines so as you know if you have a different setup the game will desync. An idea that come to mind now it some tricky use of the camera, you could somehow change the camera view on the enemy player, to see things reversed for example.5
Answers
-
Humm I think I got @Vokyczech, the simulation must be the same in both machines so as you know if you have a different setup the game will desync. An idea that come to mind now it some tricky use of the camera, you could somehow change the camera view on the enemy player, to see things reversed for example.5
-
@JeffersonHenrique I already did as your advice say and it's working and I am glad for your reply, because I wasn't really sure if it is the best possible way how to solve that problem.0