playMaker

Author Topic: Photon - Play with friends[SOLVED]  (Read 24362 times)

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Photon - Play with friends[SOLVED]
« on: August 01, 2013, 12:06:49 AM »
Hi,

I have been thinking about this for a while now and figured Id put it out there to see if there are any other/different ideas out there.

Basically my current game needs to be able to create a room (yes I'm using Photon) and only friends can join and or see. What is a friend?! Options are Facebook friends (best option) GameCenter friends (second best option)

The photon side of things would be rather easish?! Create a room that has a unique name to the Master, this could be the users facebook http as an example (just encase there are more than one John Smith playing my game at the same time) From there each user would check the list of rooms with the list of their facebook friends http address (is that very practice?) provided I haven't found a means to get facebook friends info yet. Gamecenter is the back up plan.

Just thought id see if anyone else has tackled this issue/problem.

Cheers
Andrew
« Last Edit: July 04, 2016, 09:17:12 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Play with friends
« Reply #1 on: August 02, 2013, 10:59:07 AM »
Hi,

 basically, dealing with this is something separate from Photon in terms of logic. It's up to you to deal with who  can view/access/join rooms.

you have two ways to go about room listing:
-- you can make room invisible, and you have your own server logic ( php/mysql or else) to maintain accessible rooms based on friends listing, and your game simply get that list
-- rooms are visible to all, but your interface simply filter them, this is the same principle as what you would implement on your own server side

as for friend listing, yes, you can use facebook  and graph queries. If you use your own system, you will need a lot of work to get to a point where you have your member management with all the tools to deal withs friends ( inviting, accepting, black listing, etc etc etc), so if you use a social system ready made, I strongly advice to do so, if you never tackled such system before.

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Play with friends
« Reply #2 on: August 02, 2013, 06:57:21 PM »
Hi,

Thanks for your input Jean :D Personally, anything server related scares the bajesus out of me just because I've never had to deal with anything overly complex .... I'm using Playmaker after all :P

I think the best bet is to filter the rooms via the interface, as you said. I've already designed the Ui and how it will/could work its just a matter of how to filter the users.

Facebook graph queries is where I'm headed, I've taken a look at a bunch of other networked room based game (Poker is a good example) where they allow other people to be added to your friends etc but I don't think that is needed for my game. I just need a way to find your friends and play with them otherwise you can play with random people.

P.S. Thank you so much for your Photon tutorial (and/or Alex) was rather easy to setup and everything seems to be working .... just need the friends aspect. Back to writing Facebook actions for me :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Play with friends [SOLVED]
« Reply #3 on: August 07, 2013, 05:07:16 AM »
Hi,

as I looked closer, Photon HAS a friend list system. So I'll be working on this to provide access to this built in friend system. It will not be in the very next release, but likely in the following one.

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Play with friends [SOLVED]
« Reply #4 on: August 07, 2013, 06:37:18 AM »
Sweet, I might have to rethink the way I do "playing with friends" then as I'm planning to submit my game around 13 weeks from now ... unfortunately this aspect is pivotal to its potential success :(

Might be able to create a room per player with their Facebook ID being the room name, then use that somehow to get a sudo 'play with friends' system.
« Last Edit: August 07, 2013, 06:42:20 AM by LampRabbit »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Play with friends
« Reply #5 on: August 07, 2013, 06:44:45 AM »
I guess there in no way to search the room titles so that idea is out.

Does GUILayout ToolBar With Players give us access to all the player names? :D
« Last Edit: August 07, 2013, 06:53:22 AM by LampRabbit »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Play with friends
« Reply #6 on: August 07, 2013, 07:51:14 AM »
"There is a new operation opFindFriends(). You pass an array with the names of the players that you want to look up. The client then asks the master server (the operation will fail, when you are in a game room, which implies being on a game server), if there are any players with these player names online and in which rooms they are, if in any.
You would just pass your list of players into this operation, but handling who is on this list and who is not, is up to you. Functionality therefor is not provided"

Sounds like exactly what I need, Via Facebook I the friends names, opFindFriends looks them up and gives back which players are online and in what room!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Play with friends
« Reply #7 on: August 07, 2013, 08:36:10 AM »
Hi,

 where did you get this?

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Play with friends
« Reply #8 on: August 07, 2013, 07:38:23 PM »
http://forum.exitgames.com/viewtopic.php?f=8&t=2864

"Photon is only able to find players by name. It does not provide the actual social component (adding friends, etc). This is up to you or a middleware of your choice.
We decided against designing and implementing another friend listing in Photon when most game-developers already have a favorite social API."

If its not much extra work, would this be possible for the next update as I'm building the 'social component' actions atm it would be a very powerful addition combine with Array maker.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Play with friends
« Reply #9 on: August 08, 2013, 03:19:17 AM »
Hi,

 Yes, this is planned. I'll need to make sure it works and all, so I am not sure it will go for the very next release, but definitly the next big thing for me to work on for Photon.

bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Photon - Play with friends
« Reply #10 on: May 16, 2016, 03:50:09 AM »
Hi Jean!

Was this ever further developed?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Play with friends
« Reply #11 on: May 20, 2016, 02:13:38 AM »
Hi,

 not really, The problem being that scripting is unavoidable in the case of friends because they need to be pulled from various systems and servers that you'll need to hook up with and provide server side scripts to get the list of friends from the social systems you'll be using and giving access to from within your games.

 So that's tricky indeed... What kind of back end you are thinking of using to manage users and friends list?


Bye,

 Jean

MABManZ

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 125
    • MABManZ.com
Re: Photon - Play with friends
« Reply #12 on: May 20, 2016, 04:45:18 AM »
I'm using Steamworks SDK, unfortunately my coding/scripting is weak, so I can't figure out how to use the Steam Overlay for invites, as this would be more intuitive to users.

However, using the Steamworks.NET Playmaker actions I can already populate a friends list using their Steam ID and assigning it as their Photon ID.

All I really need is an action to populate an array using the information from the OpFindFriends() function for Photon. Using this, users can at least get the room name of a friend's room and join manually.
« Last Edit: May 20, 2016, 04:51:30 AM by MABManZ »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Play with friends
« Reply #13 on: May 20, 2016, 04:51:24 AM »
I'm in the same boat, getting friends is not the issues it's finding them in rooms.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Play with friends
« Reply #14 on: May 20, 2016, 08:00:47 AM »
Hi,

 ok, good, let me work on this then. Thanks for the clear explanations of what you need, it always help :)

Bye,

 Jean