is gameNetwork only allow to play with friends?

Hi, 

I want to develop a turn based game for Android and iPhone so I red the gameNetwork plugins for both Apple and Android. It seems like you can hookup with friend to play a game but that you cannot play with stranger. My goal is to make a game that supports both playing with your friend and stranger.

I’m guessing that I might be able to load any player using the loadPlayer but I don’t see any way to find a list of player waiting to play.

Is it possible to make a game with Corona, where the players login to some kind of waiting room, to play with the next player available?

Any help would be appreciated!

thanks a lot!  :slight_smile:

Hi @jerars,

I’m not as familiar with Google Game Play Services as I am with Apple Game Center, but I know the later (Game Center) allows you to match up with a stranger by letting the system “auto-match” you with another player, OR you can invite friends to play with you. I imagine the GPGS is similar, although I have not actually implemented that in any of my own testing apps.

Best regards,

Brent

That’s a beginning! :slight_smile:

do you have a chunk of code to demonstrate how it is done with apple?

Hi @jerars,

Unfortunately, multiplayer (as an overall concept) is not a simple matter. With Game Center, you can implement some aspects via Apple’s own UI interface, but other aspects will need to be done more “internally” via various calls to the plugin. GPGS is similar, and you’d need to set all of that up for Android.

As a very very general overview for iOS, you can let users set up matches with other players by using “gameNetwork.show()”.

https://docs.coronalabs.com/plugin/gameNetwork-apple/show.html

Then, other calls related to multiplayer would need to be done with “gameNetwork.request()”:

https://docs.coronalabs.com/plugin/gameNetwork-apple/request.html

Similar (but slightly different) methods exist for GPGS:

https://docs.coronalabs.com/plugin/gameNetwork-google/show.html

https://docs.coronalabs.com/plugin/gameNetwork-google/request.html

Again, this is a fairly complex process in general and there’s not just a module that you can drop into your code to get it all running. Such is the nature of game networking. :confused:

Take care,

Brent

hi Brent,

thanks for your answer. I looked at the doc on the .request() method, but I didn’t looked at the .show() at all, I don’t know why. It seems like my answers are there. I’ll play with this.

thanks a lot!

Hi @jerars,

I’m not as familiar with Google Game Play Services as I am with Apple Game Center, but I know the later (Game Center) allows you to match up with a stranger by letting the system “auto-match” you with another player, OR you can invite friends to play with you. I imagine the GPGS is similar, although I have not actually implemented that in any of my own testing apps.

Best regards,

Brent

That’s a beginning! :slight_smile:

do you have a chunk of code to demonstrate how it is done with apple?

Hi @jerars,

Unfortunately, multiplayer (as an overall concept) is not a simple matter. With Game Center, you can implement some aspects via Apple’s own UI interface, but other aspects will need to be done more “internally” via various calls to the plugin. GPGS is similar, and you’d need to set all of that up for Android.

As a very very general overview for iOS, you can let users set up matches with other players by using “gameNetwork.show()”.

https://docs.coronalabs.com/plugin/gameNetwork-apple/show.html

Then, other calls related to multiplayer would need to be done with “gameNetwork.request()”:

https://docs.coronalabs.com/plugin/gameNetwork-apple/request.html

Similar (but slightly different) methods exist for GPGS:

https://docs.coronalabs.com/plugin/gameNetwork-google/show.html

https://docs.coronalabs.com/plugin/gameNetwork-google/request.html

Again, this is a fairly complex process in general and there’s not just a module that you can drop into your code to get it all running. Such is the nature of game networking. :confused:

Take care,

Brent

hi Brent,

thanks for your answer. I looked at the doc on the .request() method, but I didn’t looked at the .show() at all, I don’t know why. It seems like my answers are there. I’ll play with this.

thanks a lot!