Game server

I would like to have the user be able to play my game from multiple devices without losing their inventory/in game cash. For this, it seems that I will need to use my own/a third party game server.

I have played games that have this functionality, yet they only require the player to login to their apple account (I.E., there is no second login for the game studio).

I am curious if anyone knows how you would handle this type of scenario. Essentially you would need to have some information that was consistent with the users account (and not their device) being returned to the server, yet I cannot find any method by which to use the apple id for my own purposes.

Is there perhaps something returned in apples store receipts? Has anyone else had any experience with this?

Thanks [import]uid: 102017 topic_id: 19629 reply_id: 319629[/import]

It’s quite simple I think. On your server you have to build MySQL database where UserID will be key for store items/gold/etc etc etc. When user start your game first time you have to connect to youe server and create new account with id. Next when user get new item use
network.request( ) ( http://developer.anscamobile.com/reference/index/networkrequest ) to send it to server and in PHP file use $_GET[‘blablabl’] or $_POST[‘aaaa’] to intercept game data.
Now you can use it in SQL like:

UPDATE Users SET gold = ‘1000’ WHERE UserId = $_GET[‘1234’];

or get data into current game:

SELECT * FROM Users WHERE UserId = $_GET[‘1234’]; and send it as JSON response to your game. [import]uid: 12704 topic_id: 19629 reply_id: 75847[/import]

Thanks for the response.

I understand how to set things up the way you have described, but what I am looking to do is set up the server so that the user never has to create a user account separate from their app store account.

I am wondering if apple provides any output that is unique to the account and not the device so that they could use their in app purchases from multiple devices only using their app store id. [import]uid: 102017 topic_id: 19629 reply_id: 76238[/import]

It’s quite simple, you can use http://developer.anscamobile.com/reference/index/systemgetinfo
system.getInfo( “deviceID” ) [import]uid: 12704 topic_id: 19629 reply_id: 76242[/import]

It’s my understanding that deviceID would be unique to the device and not the user account, which would mean that the user would only be able to keep a consistent inventory on a single device.

Unless I understand this incorrectly.

Thanks again! [import]uid: 102017 topic_id: 19629 reply_id: 76246[/import]

Yes! You are right! My bad, sorry :slight_smile: I have two other ideas. First one is OpenFeint. Look at API, you can upload and download blob data. Unfortunatly we still don’t have native Game Center.

Secound is new native.showPopup(“mail”). It use default email to send message so you can build fake, empty message and get result to catch it. I don’t have idea it will work but I think it should. Still there is problem with different default email account but lot’s of people use the same configuration to synchronize devices. [import]uid: 12704 topic_id: 19629 reply_id: 76255[/import]

Thanks again for all of your help.

I have read about similar work arounds, but it just seems strange to me that apple wouldn’t have considered users may have multiple devices while not wanting to purchase everything for every app they own multiple times.

It’s either the best business strategy ever, or… [import]uid: 102017 topic_id: 19629 reply_id: 76280[/import]