Host migration

Options
Hi!

Photon Unity Networking Intro (http://doc.exitgames.com/en/pun/current ... /pun-intro) says that PUN supports host migration, though I can not find any more information how it can be done. Can anyone explain it?

As far as I understand, Photon Cloud service only provides sending messages between players, making it possible to synchronize positions, animation states etc. But what if I want to make one of clients to control, for example, amount of resources players have? The game will break if this host will drop.

Comments

  • Tobias
    Options
    It supports host migration in the sense that you can achieve it - but it's not done automatically for any type of game.
    As the server connects all players, the game won't have to end when the current "boss" is leaving. All others can still communicate and if you accommodate this case, the new Master Client can take over responsibility.
    I think it becomes more easy if your game can store most state in Custom Properties. Then any remaining client can read this state and take over. But you can also track state everywhere and take over any other way you like or see fit.

    This is related:
    http://doc.exitgames.com/en/pun/current ... -and-state

    Hope that makes things clearer. If your game is hosted within random clients, host migration is nigh impossible.