Author Topic: Question about network syncing  (Read 2141 times)

vzdemon

  • Guest
Question about network syncing
« on: April 06, 2013, 06:39:58 AM »
I have 2 players and each of them has 10 transforms that he needs to sync across the network. what would be the fastest and most efficient way to sync them with minimal lag? and how?
My solution is to collect all the 10 transforms into a stack(or other type of collection) and then send the 10 transforms through one TNObject.Send call (through one RFC) but i don't really know how to sync data so i didn't try this solution yet, and don't know if it will reduce lag. 

thanks  :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Question about network syncing
« Reply #1 on: April 06, 2013, 11:52:30 AM »
Yeah, sending one packet is better than sending several -- so having one RFC call that sends data for all 10 would work. However keep in mind that you can't pass 'transform' as a parameter. You have to send individual position/rotation/scale.

The best way to reduce lag is to send data as infrequently as possible -- for example only when it actually changes.