Turning cloud networking to be fully authoritative

Hello,

Im using cloud to develop a game. I dont like the p2p. It sends too many messages, that cannot be trusted anyways. I know there is ways to make p2p more trustworthy, but still it sends too many messages. Im thinking of sending position and all the needed information directly to master client with RPC's and sending all positions from master client to other clients in normal way. So, instead of sending your position to everyone, just send it to master and master updates others.
If taken further, there could be 2 master clients, one that handles everything and other that just keeps an eye on master.

The problem in short: ( example )
Photon serializes position of all the important objects, to everyone. So, every new player adds lots of new messaging to system.

Question:
Could this work? Is there message size limit? If i serialize every object position and state and send in one update?
What "hidden" problems there could be?

PS: This is so called "Mindstorming" thing, so im just evaluating all the Possibilities.

Comments

  • Why would you want this? So that the masterclient is authoritative? This wouldn't be too hard to script, I suppose, except that the masterclient would have to handle a lot of data.

    If you have 10 players in your game, the masterclient will receive 10x (position, rotation, other player info), and send 10x that. Basically, if you want to know if this can work, which I think it will (unless you are creating a MMO or something), you have to either try it, and/or calculate the amount of data that the masterclient every time. (and compare it to average user upload speed)

    This:
    http://doc.exitgames.com/photon-server/ ... t-Protocol

    Gives you a bit more detail about Photon's binary protocol, data types and amount of data.
  • In general, this idea will work. It's a bit more complex but feasible in general.
    You even have the code to PUN and can modify how updates are sent. On "regular" clients you send to master only and the master processes this and sends the confirmed updates.

    In cases like this, I would usually "skip" PUN and make up my own messages and workflow without it by using the LoadBalancing API. This is in the Photon Unity SDK and just a plain API. It provide more direct control over what you send how, where and how much you aggregate.

    There is no fixed limitation but as always, network speed, bandwidth and processing on the authoritative server can be important.
  • Thanks for answers.

    Game is going to be played with max 6 or 8 players. So, i don't think this would drastically decrease performance of the master client.
    I like most of the features of the PUN, so thats why im thinking of using it.

    This just hit me, hard to head..
    For some reason, i thought its the cloud that handless on serialize view calls, but its the PUN? That means this is "very easy" to implement.
    I honestly did no see that i actually have to PUN code right here. I just thought automatically it's some Cloud magic *grin*

    Thanks for opening my eyes.

    -Riku
  • Hehe. You‘re welcome!
    The client is doing all the magic. The servers are just forwarding it ;)
  • MaarX wrote:
    If you have 10 players in your game, the masterclient will receive 10x (position, rotation, other player info), and send 10x that. Basically, if you want to know if this can work, which I think it will (unless you are creating a MMO or something), you have to either try it, and/or calculate the amount of data that the masterclient every time. (and compare it to average user upload speed)

    I just wanted to point out, that whether you code it that way or not, it's the same amount of messages. If a player owns the networkview and is serializing values 10x a second, they're still going to the server first and then to the other clients. Clients don't have direct communication lines with other clients.
  • legend411 wrote:
    MaarX wrote:
    If you have 10 players in your game, the masterclient will receive 10x (position, rotation, other player info), and send 10x that. Basically, if you want to know if this can work, which I think it will (unless you are creating a MMO or something), you have to either try it, and/or calculate the amount of data that the masterclient every time. (and compare it to average user upload speed)

    I just wanted to point out, that whether you code it that way or not, it's the same amount of messages. If a player owns the networkview and is serializing values 10x a second, they're still going to the server first and then to the other clients. Clients don't have direct communication lines with other clients.

    I think you are wrong. I can change, that serialization messages go only to master client and master serialize goes to everyone.
    So, instead of sending it to everyone, i just send updates of client movement to master client. Master client prosesses input updates and updates positions of players and updates all the clients with the new info.
    I havent done this yet, but from what i have seen, it should be doable.
Sign In or Register to comment.