Can Truesync handle fighting game mechanics?


I'm wondering, can Truesync handle complex fighting game mechanics? My game manipulates RigidBody2D isKinematic during runtime, different characters have different gravityScales that also change during runtime. It also manipulates timescale during runtime for some slo-mo action. This all currently functions properly with Unity's built-in RigidBody2D and BoxCollider2D.

I've read in the previous discussions that changing isKinematic during runtime was/is not possible. I've also had a look at the documentation and noticed that gravityScale isn't an exposed variable that can be manipulated in a TSRigidBody2D, which only exposes the usingGravity variable. In my game not all characters use the same level of gravity, which changes constantly during gameplay. Would that be a problem for Truesync?

I'm also wondering if the new Truesync specific calls like TSVector2 and TSRigidBody2D are useable both in Offline and Online modes? Or would I have to add if() statements and essentially use both TSRigidbody2D and Rigidbody2D for Online and Offline modes respectively?



  • Hi @Wyvern_IX, nice question. Well, the mechanics like you use we don't support in the moment, we open the source to give this chance for someone who want add features asap in TrueSync. The changes you mentioned should not be, at first glance a problem, the main concept of TrueSync is to work deterministic, so if you change gravity scale in the same frame for every player connected then it will not be a problem for the game simulation. Currently we don't have gravity scale and timescale support, these are the two main barriers for you in the moment, you would have to code by yourself (Timescale could be tricky, as we do actions fixed update manned). The calls to TSVector/Rigidbody should work the same in offline and online mode, you could of course add some if statement if want to do something different when testing locally.
Sign In or Register to comment.