Lidgren Authoritative Networking Example
This is a complete example project that implements an authorative server with the excellent lidgren networking library. This download only contains code and there is no documentation, if it's popular enough I will expand on it and write proper documentation.
The project implements the following techniques:
- Authorative server that has control over movement, actions, etc.
- Client input prediction which allows the local player to move instantly and not wait for the server
- Entity smoothing which makes the movement of remote objects smooth and nice on non-local clients
- Lag compensation which allows the server to rewind player position and compensate for client lag when doing hit calculations
Edit: Note that the current implementation does not do extrapolation in the the event of dropped packages so the clients will "skip" when this happens.
The code is as bare-bone as possible and no other calculations then necessary to demonstrate the techniques are done.
The two main resources used when building this were:
- http://developer.valvesoftware.com/w...yer_Networking
- http://developer.valvesoftware.com/w...d_Optimization
Forum download link: Removed
External download link: Removed
Example of a server with two clients running:
![]()

Reply With Quote