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 /
This question was closed May 07, 2014 at 01:36 AM by thornekey for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by thornekey · Apr 18, 2014 at 09:06 AM · c#multiplayerlaglan

Multiplayer lag over LAN...

Im experiencing strange lag (and its over LAN..). There are only 3 objects in-game, which are very low poly, so its not system lag. How can I solve this? Is there a way set the bandwidth limit?

VIDEO EVIDENCE HERE :)

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

  • Sort: 
avatar image
0
Best Answer

Answer by thornekey · Apr 18, 2014 at 11:07 AM

Nvm, found it. This solves lag to an extent.

 void Awake() {
     Network.sendRate = 25;
 }
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
3

Answer by FLASHDENMARK · Apr 18, 2014 at 10:28 AM

That is not lag. This is normal behavior in games with networking. Since you only transmit the position, rotation etc. every fixed seconds(and not every frame) it will appear like this.

There are a few solutions. You can raise the network send rate. I don't know what networking framework you are using, but I think Unity default is 10 or 15 synchronizations per second. This is by far not the best way to smooth anything. As several people join your bandwidth usage will raise exponentially. Since bandwidth is a scarce resource I wouldn't do that.

The best way is smoothing. Take the new position and Lerp(or whatever you want) your character towards the new position. You can look into interpolation and extrapolation or any kind of behavior for smoothing your characters. This is a little trickier to get right and making it look natural on the receiving end, but bandwidth is best used elsewhere than on raising the send rate too much.

Comment
Add comment · Show 1 · 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 thornekey · Apr 18, 2014 at 11:01 AM 0
Share

its co-op; so 2 player only. so how would i go about changing the network send rate

Follow this Question

Answers Answers and Comments

21 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

Related Questions

Send data over wifi/lan 0 Answers

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Simple Multiplayer FPS Lag (LAN) 0 Answers

Accessing information and checking who's who in network game. 1 Answer


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