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.
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?
Henry Reyes
Interesting thread, bump.
Wyatt Morris
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.
Noah Cruz
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.
Eli Torres
The trick is that they DON'T send it that fast. They use interpolation.
Which already said.
Daniel Walker
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.
Ian Nguyen
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
Ryan Rogers
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
Grayson Mitchell
udp
Oliver Adams
SAAAAAAAAIL
Aaron Martinez
What prevents from sending your own UDP packets and block the legit ones?
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.
Asher Morales
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)
Joshua Wood
I don't understand why that's a problem it's only a 4 byte header right? What's wrong with that?
Juan Phillips
...
Kevin Parker
if the server has decent anti cheat then it can detect non legit packets and disconnect or ban you.
Noah Edwards
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)