Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: unclebob on October 27, 2016, 09:07:45 AM

Title: Photon Rooms, Lobbys and who receives PHOTON or Custom events.
Post by: unclebob on October 27, 2016, 09:07:45 AM
Hi all

Jean, Alex and the team thank you for a fantastic environment.

Just a quick question regarding rooms, lobbys and PHOTON events as we do not have enough pcs to test on.

1. Our system creates more than one room eg a RedRoom, GreenRoom, BlueRoom, etc
2. We have players join the lobby and they are then are assigned to a room giving players in each room.
3. A single player broadcasts an PHOTON event such as Disconnect or a custom event.

The question is, is that event only received by the players in that room or do the the players in all the other rooms receive the same event?

If every player in every room does indeed receive the same event is the accepted practice to filter by:

Getting Room Players ===> Dumping into an array ===> Sending the event to this array of players only

Is there a more elegant solution?

Thanks in advance, if we had enough pcs and people we would simply build and test.

Cheers and apologies if this seems obvious but I cannot find a reference to this anywhere.

Unclebob
Title: Re: Photon Rooms, Lobbys and who receives PHOTON or Custom events.
Post by: jeanfabre on November 01, 2016, 03:21:31 AM
Hi,

 you don't need several pc to test, you simply publish your app, duplicate it as many time as you want and run them all.

(http://i.imgur.com/bEGfdNd.gif)

----------------

- PlayMaker event if not sent using Photon actions will only be received locally, in order for a PlayMaker event to go over the network, you need to send and RPC ( you'll find actions for this).

- Photon do not allow players to communicate if not in the same room, so no Player A in room X can not contact Player B in room Y.

However, you can do that using the Photon Chat sdk, you combine PUN and Chat sdk together and use Player authorization Id ( when they sign in your game, or as you define unity Id for player sessions), and then you can start having Players communicating across rooms. That's already pretty advanced, so some warning applies if you have no experience with medium complexity coding.

Bye,

 Jean