Multiplayer turned based games

Monkey Targets Forums/Android/Multiplayer turned based games

Arabia(Posted 2014) [#1]
Just wondering if anyone has done this in Monkey yet?

Would Ironstorm's Google Play Game Services module be suitable for this? And even if it is, it won't port to iOS (or will it? can iPad apps access GPGS?) which is not really an issue currently as I would want to see how it goes on Android first, but it's something to think about.

If I don't use GPGS then I'm guessing I'd need to set up something like a MySQL database on my own server to host/keep track of games, players etc. I know very little about hosted MySQL databases, can a Monkey App easily query these databases?


Xaron(Posted 2014) [#2]
The easiest way would probably to just call server side php scripts but that way you won't get push notifications but have to poll here and there.


Arabia(Posted 2014) [#3]
Cheers.

Any idea where I should start looking to learn about this? I have zero idea about PHP scripts and would like to do some messing around with it to see if it will suit my needs.

Has anyone else done anything like this?

I'm looking at using it for a card game, which will be either 2 or 4 players per table and I want to have the ability for players to register prior to playing, and then be able to create or join tables, specify variations for the game etc. If anyone ever played online multiplayer turn based games on the now defunct Yahoo! Games you'll know what I'm wanting to achieve.

EDIT:

Just thinking about it, and assuming I did use MySQL and host my database on line. Is it possible to run a saved SQL query from my Monkey App (e.g. draw a card from the deck) from a hosted database and then get the result of the query back into Monkey? I'm really over my head here, sorry if this is a stupid (or easy to answer) question.


Snader(Posted 2014) [#4]
You can call for example a file like getcard.php at your webhosting from your Monkey program and in getcard.php you would query the MySQL database. getcard.php will for example output something like:

3;hearts

You read this output with Monkey


Xaron(Posted 2014) [#5]
I did some kind of a highscore list 2 years ago which shows some kind of how to have it on the server side: http://www.monkey-x.com/Community/posts.php?topic=812&page=1


Arabia(Posted 2014) [#6]
Thanks for the help guys.

I do recall reading that highscore list a few years ago, that's a great starting point so I'll have a play around with that.

Cheers.


Arabia(Posted 2014) [#7]
Been thinking more about this. There is plenty of code/examples available on the internet showing how to connect Java to MySQL. If I am going to focus just on Android, how hard and would it work to just port some of this Java straight into my game and connect to my database online?