TCP - Transmission Control Protocal
Source sends packets to target -> Target waits for all packets to arrive -> Updates when all packets arriveRepeat
More reliable and error checked
UDP - User Datagram Protocal
Source sends packets to target -> Target updates whenever a packet arrivesRepeat
Less reliable and not error checked
Due to these differences, game servers that have multiplayer usually use UDP as their protocal, so the one with bad connection is punished, and non of the other players are affected.
This is why when your connection in a game is unstable, the other players move how they were moving before you lost connection. (Hence, walking in a straight line.) What you see is not what the server is sending you, but an estimation on how others are going to be moving.
e.g.)
(Action is movement/input)
(Estimation is error correction)
[For others]
You have bad connection -> Others are not affected
-> Server estimates your action based on your action before disconnecting
-> Others see the estimation of your action
[For you]
You have bad connection -> You cannot send info to server -> You reconnect
-> You start at the point of the server's estimation -> You receive others' action all at once
However, Nintendo Switch Online seems to be using a reliable and error checked protocal, similar to TCP.(But it actually does not use TCP according to the Youtube video)
That is why whenever someone in your game has a bad connection (in Smash Ultimate and Super Mario Maker 2), everyone feels the lag.
e.g.)
(Action is movement/input)
A has bad connection -> Cannot send A's action to server -> Cannot send A's action to other players
-> Other player cannot update A's action -> Everyone waits for A's action -> Lag