Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by PrimeDerektive · Mar 11, 2011 at 07:20 PM · networkingnetworksynchronizationbandwidth

Network bandwidth - what is a good guideline for a "ceiling"?

I'm wondering if there is a certain amount of bytes/second of bandwidth I should use as a guideline for "the number I don't want to exceed".

Currently when I play with 2 players being synced with NetworkInterpolateTransform, its about 2200 bytes/second. I'm wondering how bad its going to get once I introduce enemy AI units; if I have 10 units its going to be something like 12,000 bytes per second I imagine. How much is too much?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Statement · Mar 11, 2011 at 07:32 PM

I guess it depends on what connection you want to support. 12,000 bytes per second is about 11.7 kB/s. For example 0.5 Mbit ADSL support theoretically 64 kB/s. It means it would take about 183 ms to send that data to a 0.5 Mbit connection. It might be too costly, or it might be fine if you're using good dead reckoning schemes. I haven't done multiplayer in Unity3D so I can only draw upon my knowledge since university and apply some deduction. If your network code would be running in 30 fps that would mean that each update should be at most 2.1 kB to avoid choke.

Or another way of putting it; you're consuming 11.7 kB/s of their 64 kB/s connection so you should be able to sync every frame under perfect conditions.

What is your target?

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image PrimeDerektive · Mar 11, 2011 at 07:41 PM 0
Share

$$anonymous$$ost people have 512kbps of upload in this day and age, right? So I suppose 51,200 could be my theoretical ceiling, hopefully I come in under that. I'm not really sure what my target is, this is all new to me, haha :)

avatar image PrimeDerektive · Mar 11, 2011 at 07:42 PM 0
Share

The default Unity network serialization sendRate is 15/sec, btw. Right now that seems to be fine for me. I might even try reducing it.

avatar image Statement · Mar 11, 2011 at 07:44 PM 0
Share

512 kbps = 524288 bps (Bits per second). 524288 bps = 65536 Bps (Bytes per second).

avatar image PrimeDerektive · Mar 11, 2011 at 07:48 PM 0
Share

Yeah, yeah. Close enough :)

avatar image
0

Answer by Ashkan_gc · Mar 11, 2011 at 07:46 PM

most games target 128kbps connections as their lowest connection speed and some of them as you said take 512 as their connection speed limit. you should take another factor into account. you have RPCs too for sending important events like shots or ... they take more bandwidth and if they are common like shooting in an FPS game you should take them into account too. also keep in mind that packets sometimes drop so other than using prediction and dead reckoning you should try to make your game's connection requirement as low as possible. it should be high enough to allow smooth gameplay and as low as possible.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image PrimeDerektive · Mar 11, 2011 at 07:49 PM 0
Share

I actually stopped using RPC's for my bullets to save bandwidth, and am ins$$anonymous$$d just serializing an isFiring boolean and letting clients simulate other clients shots locally.

avatar image PrimeDerektive · Mar 11, 2011 at 07:51 PM 0
Share

I'm wondering if it would be beneficial to sync AI enemy positions with RPC's though ins$$anonymous$$d of using NetworkInterpolatedTransform, and syncing it only a couple times a second or so. That would probably save a lot of bandwidth, but I'm not sure its a good idea to sync something like that with RPC's.

avatar image Ashkan_gc · Mar 12, 2011 at 03:05 AM 0
Share

if you have an authoritative server just let the clients simulate the AI on their machines. otherwise you should sync them like others. important state changes should be RPC and the transform should be sync too. if the AI's behaviour is not random by no means, you can predict much and sync it slowly.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Load Previously Instantiated Network Objects 1 Answer

Synchronizing Gameobjects over a Network Server < - > Client Sync 0 Answers

UNET : SyncVar value not updating, hooks firing 1 Answer

How to load all character previously in game when new player joins 0 Answers

Synchronizing game object across clients 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges