Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to wrap my head around how any one of the clients could become a new host should the current host leave the game. I'm not looking for any code, but more of a high level application design of how a feature like this would work.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Leader election is an interesting topic, and there are several solutions available.

One such solution is the "bully algorithm", in which all clients (including the host) have unique IDs, which determine rank/priority to control an election. When a client detects that the host is no longer present, it sends out an inquiry to higher ranked nodes to see if they are active. If it receives no response, it declares itself the leader (host) and notifies all other clients of the change.

You can read more about this method, and a few others, in the Wikipedia article I've linked.

share|improve this answer
    
Thanks for the starting point. –  Matt Feb 28 '12 at 15:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.