Performance problem

I have a fast paced 2D game and I started to implement it for multiplayer using Truesync technology. Game is being developed for mobile devices.

2 rival characters in game trying to score a goal to each other (I am planning for 2 vs 2 in near future). When I build it for Android devices, GC collection is often and that results in a bad performance on mobile. And also, the stats checksum is sometimes "OK" but generally "NOK". I tried to change TrueSync manager values Sync, Rollback, panic window, and fixed timestep, I could never achieve always "OK". In addition, I tried to minimize the colliders on scene but that didn't help either.

Please document it better like you did on PUN documentation, and give me some advice how to deal with these kind of problems.

Thank you.

Comments

  • Why U no Answer :smile:
  • Hi @Rentire, we have some slower performance than Unity because we have to take into account determinism, we use fixed point arithmetics and a different physics engine. Besides that we are improving performance of our code, we developed a lot of features and we are now reducing its overhead. You are right about documentation, it not as good as other products mainly because we are getting a lot of feedback with this first release of TrueSync so the code is changing very fast.

    About your issue with checksum "NOK" it means you have a non-deterministic game, something in your code is varying from machine to machine, you can't use Unity's callbacks (Update, CollisionDetection) because it will lead to a desync game state. I advise you to set rollback window to zero, it avoids for now some complex desync situations that you can introduce into the code.
  • Thanks for the answer. I will try setting rollback window to zero.