How to ensure only one player sets game options in a match

I am able to authenticate the localplayer and find a match using the Game Center match viewcontroller.


Assuming the match is going to have 4 players, I would like to ensure only 1 player sets the game options before they are matched with 3 other players. Of course, the 3 other players must know they should not set game options themselves.


Any idea how this is done?

Answered by uncletr in 399641022

ok, I think I just need to have non-host players have a player attribute of "0" (ie: any) as follows:


0xFFFF0000 = Host player 1

0x00000000 = Non-Host player 2


This way it might work.

I am planning on using a "player attribute mask" as part of the match request to indicate I am a "host". The match would then find other players who are not hosts to join into my game. I hope this sounds correct.


Of course, being a host would allow myself to set up the game options before I send out the match request. Other players would start my application and select "Join a Game", which would mean they do not want to be a host and would not be offered the opportunity to set up game otions. They would just wait for Game Center to place them into a game only as a non-host

I still need help please


I do not think using a player attribute mask in the match request is going to work.


If I use a mask to represent i am the host of the game, then I am going to need the three other players to each have a different player attribute mask to represent they will be playing as a non-host:


0xFF000000 = Host player 1

0x00FF0000 = Non-Host player 2

0x0000FF00 = Non-Host player 3

0x000000FF = Non-Host player 4


It seems quite non-logical to expect player 2, 3 and 4 to submit different masks to mean the same thing.


For a 2 player game I can use two masks and make it work:


0xFFFF0000 = Host player 1

0x0000FFFF = Non-Host player 2


however, for 3 player or 4 player games using a player attribute mask falls apart it seems


Any idea how I can ensure only one player is responsible for setting up the game options before the match invites are sent out?

Accepted Answer

ok, I think I just need to have non-host players have a player attribute of "0" (ie: any) as follows:


0xFFFF0000 = Host player 1

0x00000000 = Non-Host player 2


This way it might work.

Just a quick suggestion - you may want toclose any of your recent threads that have been solved so others can easily see if/where you're being helped, before asking additional questions, thanks and Happy Holidays!


Ken

How to ensure only one player sets game options in a match
 
 
Q