I have a few questions regarding RT packets .
1 : When I send RT packet in a real-time session , I want to set the player peerID as the sender of the packet ,I know I can send an int with the data,but that would increase the packet size ,so how to change the sender value ?
2 : currently I''m sending 3 ints with a packet,so the size should be 12 bytes , and maybe a little more because of the keys and such,but the packet size ranges between 15-21 , what's increasing it ?
3 : As for the speed of sending packets ,what determines it ? Aside from network speed , does the size of packet matter that much ?
I'll do my best to answer your questions for you.
1. We don't have a recommended way of sending a player ID as the sender of the packet other than your current solution to set it as an int within the packet data.
2. There may be a slight discrepancy in the packet size from time to time, this is probably due to other parts of the packet being formed in the background. Our system limit for packet size is 1400 bytes you can read up on our limits here (https://docs.gamesparks.com/documentation/key-concepts/system-limits.html)
3. Mainly the speed of the network is the determining factor along with the size of the packet. Heavy server side processing of a packet will also add to the lag time.
Hope this helps,
Hi, thanks for your answer.
I found that page in the API Documentation: https://docs.gamesparks.com/api-documentation/realtime-api/rtpacketbuilder.html
Can I use this class with unity API? or is it for Cloud Code?
Because it looks like it has a setSender Function
Thank you Guys for answering.
Well it would be good if I can see an early version
Could you please give me a link to the document you have mentioned?
That piece of documentation has been forwarded on to you.
I would like to get that Document also, if possible.
Hi, I've just started looking into using GameSparks RT for our next project, could I get a copy of that document also.
Hey Martin, i've just sent that one.
We should a version of this up on the site soon; just getting some guidelines for bandwidth together.
That's great thanks very much :)
This discussion has been very helpful in determining the data size.
My packet includes:
2 vector2: 8bytes x 2 = 16 bytes
key with vectors = 8 bytes
peer id = 4 bytes
op-code = 4 bytes
So my size should be 32bytes. Am i missing something else because the size is bigger than this.
Thanks in advance!