dealing with out of sync data arrival

Options
vreference
edited August 2012 in DotNet
I'm working on authoritative real-time fps code ...and have been for a while. To top it off I really want to support not less than 60 mobs (although realistically, 30 players plus 30 or more physics-based objects which complicates matters even more when you are targeting a reasonable data-throughput... kind of shooting for 25KB/sec absolute max) Lots of delta compression I hope. My biggest problem is keeping track of ringbuffers... I'm trying to keep the buffers reasonably small (~500ms worth tops) at ~30 updates/sec.The ambiguity involved in determining what side of the ring incoming data belongs on is pretty brutal. Is there any count or timestamp exposed by photon that would keep me from having to reinvent the wheel on this? When you add in unreliable packet arrival this gets a little tricky.

Comments

  • Tobias
    Options
    Photon events are always in-sequence per channel. So, you don't have to order incoming data by time at all.

    Aside from that, incoming events don't carry their sent time anymore, even though it's going through the network.
    However, Photon's low level sent time is "per package", not "per update creation". It probably won't help you, because our timestamp marks when something actually leaves the device, not the millisecond you fetched the position of the object to send it.
    So in worst case, you have to send a timestamp with your data. Make it a short and handle the overflow, then it's not taking up too much room.
  • vreference
    Options
    I hate to waste your time but out of curiosity, how are UDP transmissions ensured to arrive in order? I assume out of order arrivals are simply ignored?
  • Tobias
    Options
    Every message has a sequence number.
    We can't ignore reliably sent messages, so we wait until order is guaranteed.
    This is the advantage unreliable messages provide: If something arrived out of order, we can skip a few messages and ignore them when they arrive after some other was dispatched.