# Host migration

**URL:** <https://forums.pixeltailgames.com/t/host-migration/7146>\
**Category:** Suggestions\
**Created:** [April 13, 2016, 8:59pm UTC](https://forums.pixeltailgames.com/t/host-migration/7146 "2016-04-13T20:59:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrDoctor](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/drdoctor/32/34156_2.png) [@DrDoctor](https://forums.pixeltailgames.com/u/DrDoctor)\
**Post date:** [April 13, 2016, 8:59pm UTC](https://forums.pixeltailgames.com/t/host-migration/7146/1 "2016-04-13T20:59:38Z")

</div>

If the performance by the host during a gamemode is consistently bad (all pings \>200) or if the host leaves, the game should be able to migrate to a new host.

---

<div class="post-metadata">

**Author:** ![Matt](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/matt/32/13208_2.png) [@Matt](https://forums.pixeltailgames.com/u/Matt)\
**Post date:** [April 13, 2016, 9:11pm UTC](https://forums.pixeltailgames.com/t/host-migration/7146/2 "2016-04-13T21:11:28Z")

</div>

As much as we’d love to slap this right in, it’s not necessarily an easy task. We’ll be looking into solutions for this in the future.

---

<div class="post-metadata">

**Author:** ![DrDoctor](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/drdoctor/32/34156_2.png) [@DrDoctor](https://forums.pixeltailgames.com/u/DrDoctor)\
**Post date:** [April 14, 2016, 3:09am UTC](https://forums.pixeltailgames.com/t/host-migration/7146/3 "2016-04-14T03:09:15Z")

</div>

If that’s the case, then can a solution be made for picking better hosts? What’s the system now? It feels like it’s random, because it’s very rare where we get put in a game with stable connections.

---

<div class="post-metadata">

**Author:** ![Matt](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/matt/32/13208_2.png) [@Matt](https://forums.pixeltailgames.com/u/Matt)\
**Post date:** [April 14, 2016, 4:37am UTC](https://forums.pixeltailgames.com/t/host-migration/7146/4 "2016-04-14T04:37:28Z")

</div>

I think one of the major factors is best ping to the lobby. @zak or @foohy would have more info on that, though.

---

<div class="post-metadata">

**Author:** ![Zak](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/zak/32/13_2.png) [@Zak](https://forums.pixeltailgames.com/u/Zak)\
**Post date:** [April 14, 2016, 5:30am UTC](https://forums.pixeltailgames.com/t/host-migration/7146/5 "2016-04-14T05:30:52Z")

</div>

Yes, hosts are currently determined based on best-ping with the lobby server they’re in.  
At some point in the future, I would like to develop a system where the host is chosen based on best ping with all other players.

Please refer to these horribly drawn MS-Paint diagrams for details:

**Currently, the best host is chosen by best ping against the plaza server**  
[![](http://i.imgur.com/Kf5C3Sr.png) ](http://i.imgur.com/Kf5C3Sr.png)

**While this works most of the time, you can end up with hosts that aren’t ideal**  
Here, Will was selected as the host because he is closest to the server and had the best ping.  
[![](http://i.imgur.com/Dspr8Jd.png) ](http://i.imgur.com/Dspr8Jd.png)  
_Sam and Wergulz are gonna have a tough time in ball-race._

**What we need is to have the clients ping each-other to determine best ping in their group**  
[![](http://i.imgur.com/Lz1cZj1.png) ](http://i.imgur.com/Lz1cZj1.png)

**Foohy is selected because he is closest to the center of this network**  
[![](http://i.imgur.com/TXVAeOf.png) ](http://i.imgur.com/TXVAeOf.png)

Basically I just need to come up with a system for doing this and it should solve most of the cases where poor connectivity is an issue.

---

<div class="post-metadata">

**Author:** ![Link](https://forums.pixeltailgames.com/user_avatar/forums.pixeltailgames.com/link/32/36125_2.png) [@Link](https://forums.pixeltailgames.com/u/Link)\
**Post date:** [April 14, 2016, 3:04pm UTC](https://forums.pixeltailgames.com/t/host-migration/7146/6 "2016-04-14T15:04:10Z")

</div>

thanks for the gorgeous explanation, Zak

---

<div class="post-metadata">

**Author:** ![Jacob\_Swanson](https://forums.pixeltailgames.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@Jacob\_Swanson](https://forums.pixeltailgames.com/u/Jacob_Swanson)\
**Post date:** [June 3, 2016, 7:27am UTC](https://forums.pixeltailgames.com/t/host-migration/7146/7 "2016-06-03T07:27:10Z")

</div>

My computer is across the house from my Wi-Fi access point, so my network latency can start out low, but suddenly jump if someone enters the signal path. Would it be possible to add an option for players to tell the game that they prefer not to host? Not flat out blacklisting themselves, but more like setting themselves to a lower priority for the selection algorithm. Of course, if everyone joining the game has the option checked, the plaza server still has to pick someone to host.
