Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


Networked Car Physics

Recommended Posts

Posted (edited)

In the past few weeks I've been working on this small multiplayer project, where you can basically drive and drift around the scene with others.

It has¬†no point at all but hey, I can safely say that I finally managed to figure out networking! ūüėĄ


This is a customizable, semi-realistic vehicle controller, with lightweight networking on top of it. For networking I'm using Photon.

By lightweight I mean that it doesn't sync everything (like transforms and rigidbodies), only the data that I actually care about.




Edited by UnityGamesRoland
  • Like 2

Share this post

Link to post
Share on other sites

Network send rate is 20.

A network packet consist of the following:

  • Vehicle's next frame position based on the current velocity
  • Vehicle's local forward and right vector¬†for the rotation
  • Per wheel steering angle, rpm, and height

In total it is 108 byte/packet which isn't bad in my opinion, but it can easily be optimized a bit more.

Share this post

Link to post
Share on other sites
Posted (edited)

 Noice. Can i have the file?

Edited by bobboo101

Share this post

Link to post
Share on other sites

Are you using reliable or unreliable data transfer?

Please login or register to see this quote.

Not bad 108 bytes/packet with 20 per second makes 2KB/second or 16Kbs per player. Rule of thumb is to have at max 3Mbs download speed to compensate for the countries with low internet speed.

Please login or register to see this attachment.


So you could attain about 150-200 players driving cars with your implementation. Have you tried to benchmark with limited internet speed? Also, are you planing on selling this as a unity asset or releasing it for free?

Share this post

Link to post
Share on other sites

@MyIsaak Thanks for the feedback, haven't tried benchmarking it. I'm not planning to work on it anymore to be honest, so I might share it later.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...