Question to other developers

Hey, @drewns, am I right to understand that GPGS does offer turn based multiplayer.  Not just real time?  I guess by allowing Google Play version to access Apple Game Center??  (BTW, I’m not personally interested in realtime multiplayer on iOS…)

Naomi

Yes, GPGS has both turn-based and real-time multiplayer now, and so does GameCenter. Like you I’m not as concerned with real-time multiplayer (I’m using only turn-based multiplayer for now). However, it would be nice if Corona gave us access to both turn-based and real-time on both systems.

The biggest benefit to Corona developers though would be for Corona Labs to add the GPGS iOS SDK to the gameNetwork library. Basically, this would allow someone on an iOS device to login to GPGS (using their Google+ account–just like on an Android device), which would allow for cross-platform multiplayer play. It would allow Corona’s GPGS gameNetwork functions to be run on an iOS device.

It may also be possible to let the user login to both GC and GPGS to record achievements and leaderboard scores, and choose which game network to use for multiplayer, though I can’t say for sure if that would work.

That’s huge.  I cast my vote.

Naomi

I agree! Thank you for voting!

Voted but not holding my breath! With all they have on their plate I doubt this will be a priority for Corona Labs anytime soon.

Thankfully, Coronium Cloud does all I need in for turn based and now with Coronium GS for realtime… Wohoo. Much thanks Develephant.

@ksan, I’ve been reading/hearing truly great things about Coronium.  It’s just that I’d like to minimize the use of third party solutions wherever & whenever I can.

Naomi

Can’t find fault in that strategy. Having less moving parts generally make the machine simpler and more reliable. With all the high level abandoned 3rd party products of late one has to be more and more cautious… 

However, I think Coronium is here to stay and grow. I am betting all my future projects on Coronium. You can’t go wrong with Develephant’s amazing work. 

Coronium looks great, and will definitely fit the bill for many developers. And I certainly respect Develephant’s work. At the same time, it would be nice if we had the GPGS option as well.

I’m hoping that since the GPGS feature request is almost Top 10 now (at #11 as of this moment) Corona Labs might take a hard look at it. Seems like a very do-able feature for them to add, since they already have some GPGS features implemented.

My plan is to offer local multiplayer at launch.  If I get a high enough adoption and interest, I will look into online multiplayer.  

This is for exactly the reasons you cite above.  I didn’t want to ship the game with online multiplayer and then have to cancel it due to cost.  It seems like the players would hate me for that or at least quit playing.  I felt like multiplayer was really important to the success of my game so I made this design decision so that once I launch, the player will have access to what they originally downloaded indefinitely at no additional cost to me.

Since I will have local multiplayer, it won’t be a big leap to go to online multiplayer.  At least, not nearly the leap to go from no multiplayer to online multiplayer.  My data is already used to being bundled, shipped around and unbundled.  My UI accommodates other players info.  So far it seems this is the lion’s share of the work.

Here is another thing that I’m interested in, I’m hoping that local multiplayer will drive word of mouth.  The player recruits his/her friends to play because they want to play local multiplayer.  I’m still working on it so I can’t verify any of this, but I thought it was worth mentioning.

I really wish there was a good LUA api for Bluetooth.  It seems that a lot of public networks don’t support users connecting on the LAN.  I want to experiment with using one of the devices as a hotspot as well as the server.  I may be able to get that to work, we’ll see.

Hey Mark, can I ask what you are using to incorporate local multiplayer? I’ve been looking all ovr but there doesn’t seem to be any solutions other than the broken Autolan.

I just wrote it myself using lua socket.  I figured it out using these references:

This one is a competitors website, I hope I don’t tick anyone off for listing it but it is a good explanation of how to use UDP and TCP.  I went from not knowing anything about it at all to being able to code my own module reading this.  It says Gideros but it is just LUA code:

http://appcodingeasy.com/Gideros-Mobile/Using-LuaSocket-in-Gideros

Here is more info.  The explanation is not as good but it’s not bad code:

https://github.com/Overtorment/NoobHub/blob/master/client/lua-corona/noobhub.lua

Here’s something very similar to the link above, possibly taken from it:

http://stackoverflow.com/questions/19831520/lua-socket-connection-for-corona-sdk

Here’s the official documentation:

http://w3.impa.br/~diego/software/luasocket/

The gist of it is that you use UDP to let the clients find the server and then you connect them with TCP. I use a button that says “find servers” and “find client” that runs a loop for a few seconds so they can find each other. Then there is a handshake process to make sure you are actually talking to a client of the same game and then they just start sending messages back and forth using TCP. If you read that first article, what I just said will make sense.

My actual game is quite large and I didn’t want to break it while I hacked away at network communications so I just made an app that could link up two devices and then I could send text messages back and forth. Once I had it working I integrated it into the game.  The core of network communications is enabling a computer to send strings to the other computer which can then be interpreted.

It took me roughly eighty hours to get it working outside my game, including time to find resources and study TCP and UDP. I say that so you don’t just throw up your hands and go WTF when you read the links. It might take you less time, I don’t have a background in computer science but I’ve been working in LUA for a while. You kind of have to get your head wrapped around it so… be patient. Once you understand the terms, it’s not that tricky, it’s just a self contained kind of thing with it’s own jargon. Once you have written some acceptable code for your game you can easily use it in a future project which is a consolation.

Maybe I can write something up for Corona so they can have their own local networking tutorial.  We’ll see if I can find some time.

We welcome guest tutorials!

Rob

Hi Mark,

Thank you so much for the info! I will start looking into it right away. I would LOVE to see a tutorial too!