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
0
Question by Chesley · Aug 19, 2012 at 02:57 PM · networkingobjectssyncstate

Networking Physics / Object Ownership / State Sync

I'm trying to find a good way to update an object's state. I'm not using SmartFox, Photon, or Unity's built-in networking because i couldn't get the results i wanted trough those. i decided to make my own server software using Java.

i already made connecting to servers, talking to players, and updating the players state. but updating an objects state isn't as easy as a players state.

what i have now: if a player picks up or moves an object, it sends it new location to the server, and the server sends the new location to the other players, resulting in everybody seeing the player picking up the object. but i don't think this is the right thing to do, because when another player picks it up, it either has to change its owner, or every player in the server constantly sends new object locations to the server which results in a mess of data being send to the server.

idk if someone already came across this problem because most people just use SmartFox or Unity's Build-in networking.

i hope someone can put me on the right path

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Fattie · Aug 19, 2012 at 03:14 PM

No problem at all, keep your current scheme.

Just add a quality "who's the boss"

You say: "when another player picks it up, it either has to change its owner"

Yes, that's exactly how it is done. Your rock should have a quality in the DB "operator". If someone touches it, change the owner to that new person.

Now, mark the time it changed operator. If someone else touches it, just DON'T change operators if it was less than say 3 seconds ago -- otherwise you will have it flip back and fore.

And/or .. if someone touches it, if someone else is ALREADY touching it, don't change operator.

Chances are the first system will work perfectly fine. Hope it helps !

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 Chesley · Aug 19, 2012 at 04:23 PM 0
Share

thank you! i really thought i was going in a wrong direction, i can continue without questioning if I'm doing the right thing all the time :D!

avatar image Fattie · Aug 19, 2012 at 04:26 PM 0
Share

great! thank goodness for the occasional advanced questions like this!

use Invoke! :)

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

9 People are following this question.

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

Related Questions

Multiplayer objects isn't equals. 1 Answer

Networking sync enabled state? 1 Answer

[PUN] Syncing Rigidbodies across network. 1 Answer

Multiplayer Raycasting 0 Answers

A node in a childnode? 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