Simple Physics Game Networking

I am confused.
I have developed a small 4 player game, and I want to do the networking aspect of it, but from what I’ve read it seems that unity does not handle physics based networking very well. The game is very simple, four vehicles, with a singe rigidbody and some colliders.
Do I really have to invest in a third party networking platform like photon to make such a small game work dependably?
Thanks in advance.

Firstly unity physics arn’t consistent over network, meaning that same condition on two computer can lead to small inconsistency.

Secondly, only the gameObject owner (networkView) can move that gameObject.
That mean if each player own his own car, and two are ramming together, they’ll not affect each other over network (only locally)
This inconsistency is especially visible when latency is high or send rate is low.

The solution is to do physics calculation on one computer, then sync the result across all others.

Ho and, you’ll not find any networking solution that will solve this problem for you and deterministic physics engines arn’t quite common/easy to implement.

good luck

Good networked physics is not a simple problem, no matter how simple your game.

And, no, you don’t need a third party server, and in fact for physics-based game you’d most likely want to your server to run in a Unity process anyway. But what you will need if you want a decent user experience over the internet is a solid understanding of multiplayer networking strategies as well as some complex code that is specific to your game.

http://gafferongames.com/ is a good place to start. Then check out Valve’s stuff and the Tribes Networking Model.

The guys are right, It’s not easy and not dependent of your networking middleware. Anyways you can take a look at ulink’s physics example which has a SmoothRigidbody script for syncing rigidbodies. It’s not perfect but a good starting point. developer.muchdifferent.com

Thanks all. I will give uLink a shot.