PUN fit for multiplayer 3 v 3 ball game on mobile over the internet?

Options
Hello all, I've been prototyping a relatively fast paced 3v3 ball game (could be hockey or soccer) on UNet and wish to port it to Photon. The game is on mobile platforms to be played over the internet.
The one non-negotiable is for the game to continue if the master client leaves the game (to be replaced with AI), so I guess that already rules out Bolt and TrueSync.

I've doing some research and it seems like the best way to handle non-player neutral objects (the ball and AI), is to put them under control of the master client.

1. Under this arrangement, would the game performance be capped by the master client? For example, if the master client that is controlling the ball and AI has a dip in ping (we are talking mobile data connection here so very likely), it would severely affect all other 5 players.
2. If above is true, are there other tech in Photon that help solve this issue?
3. Please let me know if you think Photon doesn't have the right tech for this type of game. It would save me a lot of time. I have done my own research and found this Rocket League clone listed under games done with Photon. https://play.google.com/store/apps/details?id=com.digitalpixelproductions.rocketball&hl=en It is quite playable and the lag acceptable. Although for all I know it could be using Bolt or TrueSync and already violated my one non-negotiable of having the game continue if the master client disconnect.

Thank you for your time!

Comments

  • Tobias
    Options
    Hey there.
    You are right about Bolt and TrueSync: If the game should continue when a player (the master) drops, then these solutions are ruled out in this case.

    In general, any client could control the Non Player Objects (NPOs). If the Master Client does, that's just easy to make every client agree on (in a room).

    1. Yes. A bad network or framerate will affect all other players. This is the same as in uNet, Bolt and TrueSync, as a random player controls (general) objects that the game relies on.
    2. The only way to solve this problem (no matter which tech you use) is to put the logic on a machine and network you can rely on.
    3. As far as I can see, Super Rocket Ball is using PUN.

    You could use the Photon Server Plugin SDK to run a C# game logic (simple physics, scene, etc) on the server. This is the only way you get more control over the host and it's not ruled out by you ;)

    To run your c# logic in the Photon Cloud, we have to manage some machines for you. This means, you need an Enterprise Subscription for the title, which in turn means it's only applicable to a title you have some faith in.
  • robokai
    Options
    thank you for your explanation, it makes a lot of sense for me now
  • robokai
    Options
    Tobias said:


    You could use the Photon Server Plugin SDK to run a C# game logic (simple physics, scene, etc) on the server. This is the only way you get more control over the host and it's not ruled out by you ;)

    To run your c# logic in the Photon Cloud, we have to manage some machines for you. This means, you need an Enterprise Subscription for the title, which in turn means it's only applicable to a title you have some faith in.

    I'm trying to test this by setting up Photon Server on my machine locally to start a Unity instance (which I read is possible) to handle all logic, which includes not only the neutral objects like the ball and AI, but also movement of all players. I guess what I'm meaning to say is to make the game authoritative. I've searched all over the place but can't find any tutorial/examples or documentation on how to do that. Could you kindly direct me to the right path?

    Some additional context on what I'm trying to achieve:
    Playing the popular .io games and even the latest game Brawl Stars from Supercell, there is a noticeable lag between an action and the result (for example in Brawl Stars you would hit shoot, but the bullets will only start shooting about a half second later). It feels like the server is authoritative and they managed to make the latency feel acceptable and still fun. I feel that latency isn't a big deal with such an arrangement, but please stop me in my track if you think I'm making a big mistake going down this path :)



  • Tobias
    Options
    Those games usually implement their game logic in C# but not based on Unity. Their whole simulation is simplified and customized to not run the overhead of Unity and that will end up in a lighter server-side simulation and less cost.
    Yes, you can run Unity on the server side per room/game but you have to be aware of the effort to manage the instances and the incurred costs.

    We can't currently provide samples how to make Photon start/manage Unity instances but C# is of course capable of doing this. Stackoverflow maybe?