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 BuZZy · Mar 18, 2013 at 11:48 AM · networkserverclientnetworkview

NetworkView Component state update

Should NetworkView component send updates only from object's owner side, or from other's too?

What I mean is, if object with networkView is spawned by one client and that client moves the object it sends state update to all others, but should it send state updates when it is moved by other client?

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

Answer by Fattie · Mar 18, 2013 at 12:09 PM

say four iPads are playing a networked game.

As a general rule ...

ONLY ONE is the "boss" of the game. it does EVERYTHING. the others do NOTHING.

the others are PURELY PUPPETS .. the others only display what the "Boss" iPad decides on. all physics etc is on the "boss" iPad.

Please vote up any of these other discussions which may be useful to you:

http://answers.unity3d.com/questions/326626/games-with-multiple-maps.html

http://answers.unity3d.com/questions/332027/call-a-rpc-on-all-clients-at-the-same-time.html

http://answers.unity3d.com/questions/346961/question-about-buffered-rpc-calls.html

http://answers.unity3d.com/questions/190340/how-can-i-send-a-render-texture-over-the-network.html

http://answers.unity3d.com/questions/347567/how-do-i-sync-network-ais.html

be sure to search on this site for topics like networking, RPC, etc.

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 Bunny83 · Mar 18, 2013 at 12:16 PM 0
Share

Well, an authoritative server setup is quite common but not a requirement. It depends totally on what you want to use the Networking for. Not everything made with Unity has to be a game and not every game has a high requirement for cheat-safety ;)

avatar image Fattie · Mar 18, 2013 at 12:27 PM 0
Share

that's fair, man. Damn you and your accuracy! :)

avatar image
1

Answer by Bunny83 · Mar 18, 2013 at 12:10 PM

Yes, updates are only sent by the owner. All other players are just "listener". However you can use RPCs which can be send in both directions.

Comment
Add comment · Show 10 · 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 Fattie · Mar 18, 2013 at 12:29 PM 0
Share

BTW as previous often mentioned. I really worry about the nomenclature in the field on this. Whenever one says "server" it sounds like one is talking about "a web server" (I mean like smartFox, GC $$anonymous$$P, those cool games like Quake, or whatever).

There is no really good nomenclature distinction between "four ipads and one is the boss and the others are puppets" and "Quake -like server on the internet is the boss".

(Is Quake the one you play man? I always get those mixed-up as I'm so old :) Doom? Quake?)

avatar image Bunny83 · Mar 18, 2013 at 12:57 PM 0
Share

:D Yes i', still playing QuakeLive. And yes Quake has an authoritative server, even for single player. $$anonymous$$inecraft also switched to this model. When you start a single player game it starts a local server in the background and connects your client to it. This actually simplifies the design of the client because it's always a client-server model.

However, unfortunately that's not possible with Unity since one instance of the program can only be either client or server. You would have to start the game a second time just to run a server.

Btw, i just posted an answer which explains the term "server" briefly ;)

avatar image Fattie · Mar 18, 2013 at 01:18 PM 0
Share

An outstanding point -- Buzzy even if only one playing, you still have a "boss" routine and "client" routines.

fascinating info on QuakeAlive and $$anonymous$$C, thanks.

"However, unfortunately that's not possible with Unity since one instance of the program can only be either client or server"

Well you couldn't literally have two programs running on the device....

But you could certainly have a master routine in a run loop ('the boss routine") and you could also have a puppet routine in the runloop ("the puppet routine"). Indeed this is precisely what I did on a game, works great.

(So, if more than one iPad playing, on the Boss iPad it runs both the BossRoutine and a PuppetRoutine. On the others, only the PuppetRoutine. If only one iPad playing, it runs both the BR and the PR.)

avatar image Dave-Carlile · Mar 18, 2013 at 01:33 PM 1
Share

It doesn't start a separate instance of the app - it just opens a listen socket for the server and the client, which happens to reside in the same app, connects to it. From a program$$anonymous$$g standpoint, neither knows the client is within the same app. It's pretty much only Unity that doesn't allow this sort of thing, which is one of the biggest drawbacks in Unity's networking model. It makes coding the server much more complicated than it needs to be.

avatar image Fattie · Mar 18, 2013 at 02:56 PM 1
Share

you have to get REALLY SOBER to do stuff like that man ;-)

i believe (but don't know) Bunn meant it literally (these days) runs two instances.

also ... I added to B's discussion here:

http://answers.unity3d.com/questions/417626/masterserver-is-public.html

Show more comments

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

13 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

Related Questions

Network.Instantiate dont instantiate object 0 Answers

Unity software to act both as server in one network and a client in another 0 Answers

Smooth network communication like Unity remote 1 Answer

How do I change networkView ownership of a Rigidbody by clicking on it? 1 Answer

RPC not being called 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