Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by KPLloyd · Dec 11, 2016 at 09:12 PM · networkingbufferoverflowchannels

Client Buffer Limit reached causing drops

Hi. I have a simple 2D snowball right game I am making, It has networked player objects, throwing networked snowballs. Networked power-ups and such spawn slowly over time on the map, and the player can build networked towers that heave snowballs automatically.

After a variable amount of time, a client, or multiple will get dropped from the server. Much of the time before getting dropped they will get "Buffer Limit Reached" error. Since I use a reliable fragmented channel, which is 'all or nothing', this causes the client to stop sending info to the server on their location, wanting to throw snowballs, etc.

I changed the buffer limit from the build in 16 to 512 and that caused massive, immediate lag. After a little bit more time than previous, the clients still got dropped.

Can anyone here help me out with how to properly network without clients hitting the buffer limit?

I can post all necessary code and pictures on request!

Thank you!

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
Best Answer

Answer by KPLloyd · Dec 15, 2016 at 11:43 PM

Thanks Diamond. I did end up figuring out the issue a few days ago, my mistake for not updating this.

My problem was the CmdSyncData() method being called every update. I guess that was too much data at once!

My work around was not only simple, but logical: instead of sending sync data every frame to the server I just send it when the data changes.

Thank you very much for your help.

Comment
Add comment · 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
1

Answer by AurimasBlazulionis · Dec 11, 2016 at 10:04 PM

You can either create multiple channels, or you could (really should) make things like snowballs non-networked. Snowball locations and where they should hit should be very easily predictable.

The last option is to wait. Wait for the 5.6 it will introduce the new transport API which can handle much higher loads.

Comment
Add comment · Show 2 · 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 KPLloyd · Dec 11, 2016 at 10:12 PM 0
Share

Hi Diamond, thanks for the response.

The problem shouldn't be needing to handle higher load. Its a super simple game, not the next Call of Duty. The fault is certainly on my program$$anonymous$$g, so hopefully with a little of your help we can fix that.

As for removing snowballs from being networked, I will monkey with the code to see if I can get them to properly function with avoiding networking them.

As for channels, how exactly do they work? Do I set specific scripts to be networked on specific channels? Is 200 buffers in one channel worse than 100 buffers in 2 channels? Would it be bad to have one channel for each little networked thing?

avatar image AurimasBlazulionis KPLloyd · Dec 15, 2016 at 09:55 PM 0
Share

Each channel can handle specific amounts of network bandwidth. Also, you should really use the profiler to profile how many commands are being sent from each script etc. this will allow you to find what causes it.

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

104 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Crash after DisconnectEvent 0 Answers

How to get OnTriggerEnter working over a network 2 Answers

[UNET] ClientMoveCallback3D Example? 1 Answer

Instantiating over the Network, good way? 1 Answer

Why do I get the error "Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)" when I try to deploy to iOS device. 0 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