How do video games, like Fifa for example...

how do video games, like Fifa for example, send data to the server and then to the other person you are playing with so fast. like even if you just flick upwards slightly, that data is sent to your opponent and the server almost instantly.

how does the network do this?

Attached: Screen Shot 2018-09-13 at 09.36.45.png (494x424, 276K)

Other urls found in this thread:

developer.valvesoftware.com/wiki/Lag_compensation
twitter.com/NSFWRedditImage

Check out RTP (Real Time Protocol) on google.

Websockets is your answer

web socket is just giving server permission to push data to the client. it is still no where near as fast as what is in video games

developer.valvesoftware.com/wiki/Lag_compensation

>how does the network do this?
the short answer is that it doesn't, the game just hides the lag

...

it cant be that. pic related. look at how many bytes your sending in each packet

Attached: Screenshot 2018-11-10 at 09.18.32.png (1870x618, 115K)

I BLAME IT ON MY ADD, BABY

oh interesting. this makes sense.

what about in things like military software though?
e.g. sending real time data from an attack drone back to base.
surely that must be fast. whats used there?

well desu id made this thread just to see how fast is it actually possible to make a networking protocol. how fast can you theoretically consistently send data between clients. and how would you go about writing the software to do it?

Interesting thread, bump.

Those rely on more direct radio transmissions, either directly to the base if the drone is near it, or off of a satellite. It's not for the sake of reducing lag, but to make communication harder to interrupt. The drone swarms people are predicting form their own network which usually communicates to some guy nearby with an antenna who is controlling the whole swarm.

My guess is that the US military has access to stuff like 5G mobile internet a decade before it becomes available for the general public.

The trick is that they DON'T send it that fast.
They use interpolation.

Which already said.

Some games us P2P so they skip server side stuff and implement it in between clients, you just have to hope that the hoster has a decent connection and wont fuck you match.

udp instead of tcp if possible and then send about 30-60 updates every second and do some lerping between the old and the new state on the client and you are done

addition: for shooters you can do lag compensation like the one already mentioned and for physics engines the server and client simulates the physics and the client corrects itself if it's too much off from the server

udp

SAAAAAAAAIL

What prevents from sending your own UDP packets and block the legit ones?

obligatory

Attached: kid.jpg (945x645, 121K)

Three tricks basically:

All game data received on the client is delayed say 100ms so that it can be interpolated, making it appear smooth when really it's quite sparse updates arriving at sometimes inconsistent intervals.
Some inputs made by the client (for example walking and looking) have their results estimated immediately on the client (client side prediction) so that crucial inputs feel instantly responsive.
When the server receives some inputs (for example pulling the trigger to shoot somebody) it winds back time to whatever the client was seeing when the trigger was pulled so that you don't have to lead your shots to compensate for enemy player moving while your trigger pull is in the wire.

Direct transmission + drone pilot in the region.
A pilot in Washington DC piloting a drone in Homs (Syria) would suffer a 30ms lag (in the most ideal situation that will never happen IRL)

I don't understand why that's a problem it's only a 4 byte header right? What's wrong with that?

...

if the server has decent anti cheat then it can detect non legit packets and disconnect or ban you.

It only sends data to server which is not time critical to server (like setting up a match etc) when you play you mainly only send data to other players (thats why online cheating exists)