Odd Behavior in New Corona Daily Builds for GPGS Real-Time

Hi Guys,

I’m hoping someone can help me. I had a game a few weeks ago that was using the GPGS real-time plugin to connect two devices together. That said, the version of the Corona SDK I had on my local machine was about a year old.

While I was on vacation one of my developers updated to the latest stable build. We could no longer get GPGS to login at all. I checked and he hadn’t made any changes to the settings build file or the main menu file where we are doing the GPGS initialization. So after about an hour of troubleshooting I updated to the daily build.

Aha! Now I am logging in and getting leaderboards, achievements, and the multiplayer selection UI. However…

When I attempt to create a room after selecting an opponent I get an immediate callback with a generic error code status:

Corona: room event happened

Corona: table: 0xb7fb1068 {

Corona:   [type] => “createRoom”

Corona:   [name] => “createRoom”

Corona:   [data] => table: 0xb7fb1068 {

Corona:               [isError] => true

Corona:             }

Corona: }

I really don’t have any idea how to troubleshoot this, or if it is something I can even fix since it seemed to be working previously. The actual create room code looks like this:

local function createRoom(roomListener, array)

 gameNetwork.request(“createRoom”, {

      playerIDs = array,

      maxAutoMatchPlayers = 0,     

      minAutoMatchPlayers = 0,    

      listener = roomListener,

   })

end

M.createRoom = createRoom

I call this after getting a successful return from the player selection callback:

Corona: user was selected

Corona: table: 0xb7f9aee0 {

Corona:   [type] => “selectPlayers”

Corona:   [name] => “selectPlayers”

Corona:   [data] => table: 0xb7f9aee0 {

Corona:               [1] => “g12793873521474890036”

Corona:               [minAutoMatchPlayers] => 0

Corona:               [maxAutoMatchPlayers] => 0

Corona:               [phase] => “selected”

Corona:             }

Corona: }

I load up the variable “array” which I pass into the createRoom function with the single opponent ID that is returned from the user selection:

create room req

Corona: table: 0xb7e0a6a0 {

Corona:   [1] => “g12793873521474890036”

}

I suppose it is possible I need to create the room with both the opponent ID plus my own ID, but in the past this is not how the code has been working, meaning I only needed to include the opponent ID when creating the room and mine as the creator of the room was assumed.

Can someone please give me some direction? Maybe even just run through whatever test scripts you have on your end to make sure this functionality is working in today’s daily so we both have a warm fuzzy?

Thanks!

Just checking again to see if anyone had any thoughts or possibly wanted to recommend another forum or something for me to post this on?

I don’t believe we have changed any thing regarding the GPGS plugin in a long time. It’s possible Google changed something on their end requiring different parameters. Since GPGS is a different activity, you should run “adb logcat” with no extra parameters so you can get all the system messages not just Corona generated ones. GPGS could be issuing their own messages that you’re currently missing.

Rob

Thanks, @Rob. It looks like something changed a little with one of the parameters. Maybe GPGS used to accept a single element or something? I’m not sure as my original code to create the parameter was flawed but had been working for a while just the same.

local playersArray = event.data[1]

should have been

local playersArray = {event.data[1]}

I appreciate you responding and sending me down the right path. I’ve used a couple different game engines and find myself always coming back to Corona, one reason being I’m always impressed with the forums here.

Thank you!

Just checking again to see if anyone had any thoughts or possibly wanted to recommend another forum or something for me to post this on?

I don’t believe we have changed any thing regarding the GPGS plugin in a long time. It’s possible Google changed something on their end requiring different parameters. Since GPGS is a different activity, you should run “adb logcat” with no extra parameters so you can get all the system messages not just Corona generated ones. GPGS could be issuing their own messages that you’re currently missing.

Rob

Thanks, @Rob. It looks like something changed a little with one of the parameters. Maybe GPGS used to accept a single element or something? I’m not sure as my original code to create the parameter was flawed but had been working for a while just the same.

local playersArray = event.data[1]

should have been

local playersArray = {event.data[1]}

I appreciate you responding and sending me down the right path. I’ve used a couple different game engines and find myself always coming back to Corona, one reason being I’m always impressed with the forums here.

Thank you!