Breaking of determinism

Options
Hello,

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.

I tried lot of different ways to get it back to deterministic behaviour and I didn't succeeded. So, is there any solution for such problem? I will be glad for any kind of help. :)

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.
image

But when I negate scale and reverse position, the simulation isn't identical on both clients.
image

Best Answer

Answers

  • @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.