Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Photon Multiplayer Question

Discussion in 'Connected Games' started by JollyJinks, Aug 8, 2018.

  1. JollyJinks

    JollyJinks

    Joined:
    Dec 16, 2017
    Posts:
    9
    ANSWERED
     
    Last edited: Aug 8, 2018
  2. JollyJinks

    JollyJinks

    Joined:
    Dec 16, 2017
    Posts:
    9
  3. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,196
    Your question is extremely broad.

    Generally, you want a Server authoritative architecture if you intend to prevent exploitation. This is fairly straightforward to do but after a day or two into developing there aren't going to be a lot of resources available since it all becomes very specific and unique to your game. Photon offers this, or really, any generic networking service offers this because conceptually its up to you to implement the design rather than the networking service, unless you're using a highly specialized system for a certain type of game.

    Essentially clients send requests of what they want to do, such as pick up an item. This request goes to the server, gets evaluated - like does the item still exist? Did someone else pick it up? - and then acknowledged back to the client(s) who when receiving this packet will actually do the thing - so everybody is on the same page. Apply that concept to everything requiring abuse prevention and you've got a server authoritative game.
     
  4. JollyJinks

    JollyJinks

    Joined:
    Dec 16, 2017
    Posts:
    9
    I'm not as concerned about abuse prevention [since there is not much, if anything, that can be really abused in this game] - I'm mostly concerned about the type of service Photon offers, and if it's the type of networking service that I need for this game.
    I wasn't sure if Photon is meant more for match-making and hosting several concurrent small-scale multiplayer games [say, for example, Ping Pong], as opposed to a large, single world with everybody in the same maps/server(s), or if it didn't matter at all and I'm just overthinking and being a big dummy. I just want to make sure I have a solution [or at least the beginnings of one] before I delve too far into my game's development.

    These are the two main questions, and they might be stupid questions, but I've never had to mess with the idea of networking as none of my games have needed to be online!

    "Can, let's say, a hundred people connect to the same server, on the same map, and comfortably explore their environments and see the other players' location, movements, animations and actions/emotes update smoothly with Photon?

    Can Photon support the various different invitations and exchanges between players, like keeping up with the different chats, friend requests, group invites, and party invites?"
     
  5. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    956
    Assuming you're talking about Photon PUN.

    Without a bit of tinkering you can't really get away with many more than 4-8 players in a single room before hitting the message per second limits. I've managed to get it to work with up to around 30 players per room for an RPG type game by implementing interest management and optimising traffic.

    Maybe you could implement each map as a separate room and have players move between rooms as they change maps, but I haven't tried anything like that so I'm not sure if it would work.
     
  6. JollyJinks

    JollyJinks

    Joined:
    Dec 16, 2017
    Posts:
    9