So I have made a small multiplayer co-op game using Photon Unity Networking. A game consists of 2 players having to kill a boss in a relatively small arena.
A player can join the queue from the main menu and wait until another player is ready for it.
I would really like to change this and let the players join matches from a visual environment (instead of a dry GUI with the join/leave queue button, like it is now) like a “main city”, where they can walk around and meet other players. I find this more nice to see and also could give some sense of community to the players.
The player is put into the main city right after he logs in. I obviously do not need this to be a MMO experience, instead I would like the city to hold a maximum of 20/30 players - if a player logs in and finds the room is full, a new empty one will be created.
Do you think it is still okay to implement the “main city” room with Photon? Keep in mind that players in the main city room should only be able to walk around and see each other, but not interact in any particular way.
I am not sure if Photon will still be okay because I am very new to multiplayer/networking and I only have used Photon for a 2 players room (which so far works really great!). If it helps you, my game uses 2D graphics and apart from Photon I use Playfab for data persistence (account data).
You can use PUN for up to 16 players and maybe some more (depending on how much you sync). For walking around, I don’t see a problem.
The downside of this approach is that the built-in matchmaking won’t work while you are in a room. So you can’t use that to fill rooms should one of the players not follow into the match/instance they agreed on (in the visual lobby, which has to be a room).
Otherwise: Give it a go!
I am not syncing a lot of data (I think), since the player sprites are all the same, so all I can think of now is just synching player position. I would eventually like to add a Photon Chat to use during the lobby, but to my understanding it should not affect performance in the lobby as it is made with a distinct application.
About being unable to use the built-in matchmaking, hopefully there could be a workaround - e.g. when the players want to get into the queue they would be disconnected from the “lobby” room and be put into queue - do you think something like this wmakes sense?
I’d really love to only use Photon for networking to keep my project relatively simple.
Yes, you can leave your visual lobby and run the usual matchmaking (e.g. try to find a fitting room and if there is none with spots open, create one to let others find you). No problem.
Adding Chat is also possible. If you only need to send typed messages between the users in a single room, you can do that without Chat. It gives you options to communicate via multiple channels, independent of rooms. E.g. you may be playing but have a chat channel with a friend.