Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,067 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
unreliable bps and send_skill #435955
01/16/14 14:43
01/16/14 14:43
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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).

Re: unreliable bps and send_skill [Re: Reconnoiter] #435959
01/16/14 14:58
01/16/14 14:58
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
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)

Re: unreliable bps and send_skill [Re: Ch40zzC0d3r] #436020
01/17/14 09:00
01/17/14 09:00
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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.

Last edited by Reconnoiter; 01/17/14 09:29.

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1