Trying to achieve an Authorative Server-like setup

Options
Heya, I'm trying to create a Windows build that starts a PUN Room as Masterclient, WebGL builds will then connect to that Room as normal Clients. The Masterclient will process and handle all the messages like an (authorative) server would so that the Clients won't have to process that much data. How would you try to accomplish this?

I've done some work already and it seems to work as I intended it work but it feels like I'm approaching the issue the wrong way.

One of the problems I noticed is that when the Masterclient gets shutdown the application keeps working because of the automated switch of Masterclients, while I intend to kick all the Clients and make them wait for the Masterclient to be back online, like a normal Server-Client setup would. Is there a way to achieve this? Like disabling Masterclient migrations?

Comments

  • MrWahloh
    Options
    Anyone?
  • Alfy00
    Options
    Hi,

    I'm busy doing the same thing and is busy trying to solve this as well.

    I'm currently busy to implement the following (Not sure it will work)

    The client keeps on checking if it is the master server the master server.
    If it is not the master server it continues, but if it's the master server, then it disconnect itself.

    So if the server goes offline, all the clients will basically kick themself.

    you can go further and let your clients do an RPC call to the master client. If you get the "incorrect" answer from another client that became the master the client disconnects as well. the advantage of this method would be that all your clients disconnects more or less at the same time where as te first method, it will disconnect in a chain.

    Hope it help
  • Alfy00
    Options
    Just an update,

    I managed to implement this method successfully


    Shout if you need help