I've been reading the Valve article on multi-player networking which has been adapted from Yahn Bernier's 2001 paper called Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization. I'm making a realtime multi-player game using a node.js server connected to clients through socket.io and I have a few questions regarding the principles detailed below:
Entity Interpolation
[Interpolation] prevents the jittery motion this would ordinarily lead to by buffering server updates then playing them back with the gaps smoothly interpolated between. It can also protect against glitches caused by packet loss.
Client-Side Prediction
Prediction is the notion of the client predicting the effects of the local player's actions without waiting for the server to confirm them. An entity's predicted state is tested against server commands as they arrive until either a match or a mis-match is detected.
Lag Compensation
Lag compensation is the notion of the server using a player's latency to rewind time when processing [user input], in order to see what the player saw when the command was sent. In combination with prediction, lag compensation can help to combat network latency to the point of almost eliminating it from the perspective of an attacker.
Do the principles apply to TCP as they do to UDP and would there be any differences in implementation? I can see that the entity interpolation would not need to protect against packet loss but thats about it.
Can I even communicate between a server and web-browser and vice-versa using UDP and Node.js?
Since the paper is over a decade old are these principles still in use or has other technology appeared?
Any help would be much appreciated.