The code is provided AS-IS without any warranty of any sort.
Please feel free to use, comment, ask any question or improve the code provided. If you ever use it in any of your project, feel free to improve and publish it back for everyone's sake. I'll happily merge PR as long as they work and keep the same goal.
How to run
Download the project and open the Scenes/Demo scene.
Compile it to a standalone Win/Mac/Linux player. You can also download a compiled version from github.
Run at least two instances of the unity game.
On one instance, start it as a Server (LAN Host)
On others instances, start them as a Client (LAN Client)
On Clients, click on spawn to spawn a player and move around with WASD.
The code is a revisited implementation of Quake 3 networking principe. It include some fixes that were introduced since then (in QuakeWorld for example).
All the networking is based on unity's brand new unet networking system. No external assembly are required and run well on desktop and mobile platforms.
All the character movement is based onRoystan Ross's excellent SuperCharacterController. This is because the unity default character controller isn't deterministic enough to allow rewind-and-replay. Roystan Ross's version is more deterministic and also superior in terms of quality and usability.