unreliable bps and send_skill

Posted By: Reconnoiter

unreliable bps and send_skill - 01/16/14 14:43

Hi all,

What should be a good 'unreliable bps send' (unr in f11) to maintain on the client in a lan game?

I am making a fps which can be co-oped up to 2 players (so 1 server+client and 1 client). I have already implemented alot of ifs to let skills only be sent when they change and to let as much as possible be sent in unreliable_mode and as much as possible (without allowing too much cheating possibilities) to be done only on the client.

The problem is that if only even one skill is send by the client, unrealiable bps (unr in f11 window) rises to ~550. Maybe I am wrong, but this sounds alot to me. When client player would move, it sends about ~3 skills most of the time (mainly jumping commands, mouse movement tilt, mouse movement pan), than unrealiable bps rises to ~1000-2500.

So I added SEND_RATE to some of the skills (which does make big difference by the way). For the jumping commands this seems to work fine, but when I add it to the client mouse movement send_skills the client sometimes keeps rotating even if mouse_force is zero (/the client does not touch the mouse):

Code:
if (my.client_id == dplay_id) {
....
if (mouse_force.x != my.ROTATION_PAN) {
my.ROTATION_PAN = mouse_force.x; 
send_skill(my.ROTATION_PAN,SEND_UNRELIABLE | SEND_RATE);}
....
}



How can this be solved?

And lastly, what would be other good ways to futher decrease 'unr bps sent'?

Thanks in advance.

ps: I have dplay_entrate default (0,5).
Posted By: Ch40zzC0d3r

Re: unreliable bps and send_skill - 01/16/14 14:58

It should be overhead + size of the message which means overhead is ~15 bytes and size of message is usually 4 bytes (depends of your datatypes and on the count).
Sending of position and rotation is done unreliable while lerping the old pos/rot with the new data. You should check if theres a function which is sending all this data, I come up to 1kbps with 2 players shooting and walking and all of this on my server. (Non lan for sure)
Posted By: Reconnoiter

Re: unreliable bps and send_skill - 01/17/14 09:00

Thanks Ch40zzC0d3r,

I saw in the manual that sending alot of variables through a struct is faster. I don't send many vars though, mainly a few skills and some entity updates.

I found this in the manual by the way, for others who were wondering too:

Quote:
On a LAN, you can easily send and receive with more than 10,000 bps; however on the Internet you should not exceed 2000 bps.


I quess having around 500-2000 is not too bad.

I will play some more with the conditions when sending skills and NOSEND.
© 2024 lite-C Forums