playMaker

Author Topic: What is the functionality of Max Player in Photon Network Join Random Room  (Read 6503 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Hi,
Im back to working on my Photon project after a break:
I noticed on Photon Network Join Random Room the Max Player Entry.

Ill be wanting Fill Room, in order to fill up older rooms, in case people leave those rooms.
Im counting the number of players in a game anyway, and creating new rooms if all are full... but what does this do here? Ive tried it, to no apparent result.

It may be helpful

Mark
« Last Edit: February 17, 2014, 02:52:44 AM by markfrancombe »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What is the functionality of Max Player in Photon Network Join Random Room
« Reply #1 on: February 17, 2014, 10:45:38 AM »
Hi,

This will help the photon engine to decide which room to pick based on the number of players there are in there. max players set to 2 means that it should not join rooms that have 2 or more players.

 is it not what you are experiencing? I never had to use this property before so can't really testify it actually does work, but this is a straight port to the api call, so this should be ok.

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: What is the functionality of Max Player in Photon Network Join Random Room
« Reply #2 on: February 18, 2014, 03:43:07 AM »
OK, that clears one thing up, I suppose you mean that if Max player is set to 4, then Join Random room will join any room with 1, 2, or 3 players.
So what happens if there are no more rooms with free places? Does it fail? Can I link this property back to create room, IE: create a new room if its full?

I have made an FSM that creates a new room when there are 4 players, but something is a bit funky, i think its in the order that things are getting read. IE its creating new rooms instead of joining partially empty rooms, or something... not sure. I feel like I need this functionality in one place, so all creating and joining happens correctly... Like I need to fire a create room command when THIS action reports full, but at the moment thats being done elsewhere, and too early... or something... not sure..

Sorry Im not explaining this too well, Ill test a bit...
:)
M

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What is the functionality of Max Player in Photon Network Join Random Room
« Reply #3 on: February 18, 2014, 04:51:34 AM »
Hi,

 I am not too sure about the behavior to expect from this, I would ask on Photon forum actually on that particular behavior. Tehy iwll have a better expertize on such fine grain setup. I never had to do a real world project with random room joining systems yet.

Getting around these lobby setup is difficult, so plan this on paper, draw some charts, and spend time designing proper debugging tools to output what's going on duringt he process when published. this will help you getting results quicker in the end.

bye,

 Jean