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 AmirH2020 · Feb 20, 2021 at 10:01 AM · multiplayerserverclienthosthosting

Stop host without kick clients

Please help me with this subject, I really want help, I want that stop hosting without kick any client, by the way, I'm following BRACKIES multiplayer tutorials.

Comment
Add comment · Show 1
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 Llama_w_2Ls · Feb 20, 2021 at 11:41 AM 0
Share

You'll have to make someone else the host/master client.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by MUG806 · Feb 20, 2021 at 01:29 PM

If you stop hosting there is nothing for clients to be connected to. What you are asking for is completely impossible.

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 · Feb 21, 2021 at 01:02 AM 2
Share

Not completely impossible but quite difficult to pull off and requires several steps in order to be even remotely reliable. The overall them is host migration. There are different kinds of host migration depending on what exact situation you want to resolve. You can roughly split the scenarios into active and passive migration. Active host migration means the current host actively wants to give away his host role. Passive host migration is a lot more complex and is about a host that suddenly disappears / looses connection. Passive host migtation has a very low chance to be pulled off successfully. Active migration has a higher change but it's still not guaranteed that it will work.


Active migration essentially has those steps:

  • Current host picks one of the clients to become the new host.

  • Once the client has been informed about that decision that client has to start its own server.

  • The current host connects to the new host to see if the connection can be made. Ideally all other clients should also connect to the new host while still being connected to the old host, just to make sure no-one is left behind.

  • Once the connections are verified to work (just doing some handshaking) the current host can send the whole gamestate to the new host

  • Finally after the new host has setup its own environment to be a "clone" of the original one, the old host can officially send out a migration command to all clients. From that point on the connection to the old host can be closed by all clients and everything can continue over the new connection with the new host.

Passive migration has way more potential issues. To support passive migration all clients have to have a complete copy of the game state at all times since each client has to be ready to take over the host role. Ideally each client always runs their own server socket in parallel and all clients are essentially directly connected to all other clients. When the host dies the clients have to negotiate if the current host is dead or not and who's going to be the new host. Supporting passive migration has a lot of issues. First of all the whole gamestate has to be shared with all clients. This is a huge issue for cheating. Likewise because all clients have to know each other player it may be a privacy issue.


Note both types of host migration is not easy and require careful housekeeping of literally everything. UNet had support for host migration. Though the success depends many factors.

avatar image MUG806 Bunny83 · Feb 21, 2021 at 09:17 AM 0
Share

Good point!

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

200 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 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

Unity networking tutorial? 6 Answers

Multiplayer syncronisation 1 Answer

Using a database for unity multiplayer project 1 Answer

When i connect to my server the host can't move just the client can move. 2 Answers

Client interact with World Objects 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