Jump to content

  • Log In with Google      Sign In   
  • Create Account


User-hosted redundancy


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 3TATUK2   Members   -  Reputation: 695

Like
0Likes
Like

Posted 05 December 2013 - 06:14 PM

So, say you have a system where games are mainly user-hosted with a central server listing that does automatic matchmaking...

 

If the "player" who is really hosting the game quits early, then the whole game crashes..

 

Any ideas for workarounds to this? My idea is to assign a "backup" host, ie a second user that all clients are aware of who will automatically resume the broadcasting services if the main host quits.

 

What do you think? :)



Sponsor:

#2 Angus Hollands   Members   -  Reputation: 690

Like
0Likes
Like

Posted 05 December 2013 - 06:25 PM

Many games that do this will essentially choose a client to become the host. In doing so, the clients' state is the new authority.

How you implement this is rather dependant on your preference. You may wish to support some kind of lobbying system - where each client can register it's game session ID and state that it is looking for the new host, and the matchmaker service can match the client's up. Otherwise, you would be best implementing a peer to peer solution, either with predefined fallback hosts by the original server (so if host is dropped, the clients have a list of who to try, in priority order) or deal with the new host when the situation arises. In the case of the latter, it will require the clients to be aware of "some" connection data about the other clients, whilst having a matchmaker would remove this dependency. 



#3 frob   Moderators   -  Reputation: 18371

Like
0Likes
Like

Posted 05 December 2013 - 06:34 PM

The term is host migration, which should help you in your quest to learn the topic.

 

There are many approaches, generally they are all variations of each machine running their own copy of the simulation.


Check out my personal indie blog at bryanwagstaff.com.

#4 3TATUK2   Members   -  Reputation: 695

Like
0Likes
Like

Posted 09 December 2013 - 09:25 PM

hplus0603 ??

 

Your wisdom ??

 

laugh.png



#5 hplus0603   Moderators   -  Reputation: 4904

Like
0Likes
Like

Posted 10 December 2013 - 07:14 PM

Frob already got it -- host migration is the key words you want to look for.

Typically, all clients run the simulation, and thus any one client can take over.

The question is the who becomes host if the main host crashes out.

Options include the initial host pre-selecting the fall-back, or sorting by user id and choosing the lowest-numbered user, or some other consensus mechanism.

Clients obviously also need to establish a connection to the presumptive next host, so clients need to know the networking information about other clients, and NAT punch-through needs to be set up etc.


enum Bool { True, False, FileNotFound };

#6 3TATUK2   Members   -  Reputation: 695

Like
0Likes
Like

Posted 11 December 2013 - 01:44 PM

tyvm :)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS