Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

How to challenge another user to a realtime match?

$
0
0
We are trying to implement a use-case in Basketball PVP in which a player clicks their friends name from their PlayFab friends list and then the app sends an invite to their friend. On their friends screen they will get an option to accept the invite, in which case both players will join the Photon room to play their TrueSync match.

In our original implementation we created an open room with the challenger & challengie's ID's, then the challengie's app periodically checks if this room exists. The problem with this solution is that any user joining a random room will accidentally join this room (taking up the friends spot). Another problem is that if the user is on a different Photon region they will not see the room.

To work around this we looked into using PlayFab for the communication. This is what we posted on their forum:

=====================================================

"How do we send a message from one user to another using PlayFab?

In Basketball PVP we would like a user to click on a PlayFab friend in the leaderboard, then our app would send a message to their friend's PlayFab account with the Photon region and the room name info. Then if their friend has the app open they would get the info and join the server/room."

========PlayFab answered with this===========

"Since you're using Photon, the way to do this would be by using their FindFriends method. And you can send other messages between players using SendPrivateMessage.

We are planning on adding a generic messaging system, and when we do, we'll provide a system for notification. Right now, your options would be Push Notifications, or a persistent connection to the client using Photon Cloud or custom game servers (Client/GetFriendsList contains the current Lobby IDs for friends)."
=====================================================

Would PlayFab's advice work? Won't it still have problems if the friend is not on the same Photon server?

What do you suggest we do?

Thanks,
Joe

Viewing all articles
Browse latest Browse all 15755

Trending Articles