I’m trying to create a card game for the Android platform, which will be played over the network, one turn at a time. I am hoping to use Google App Engine for my server backend, and Google Cloud Messaging to notify players when it’s their turn. My idea approach this implementation is to have users login through the Facebook APIs, store the facebook user id and then register the app with Google Cloud Messaging and store the Registration ID. Then both the facebook and GCM ids would be submitted to the server and stored in the GAE datastore. To generate a list of friends to start a new game with, would I just use the facebook Open Graph API to get a list of the user’s friends’ ids and then compare each of the facebook ids stored on the server to the list of facebook friends? Or is there a better way to get a list of facebook friends who also have the app installed?
After each turn, the android app would serialize a “game” object and upload it to the GAE, which would then use the saved Registration id to notify the other player(s). When the app opens on a device, it would download the serialized “game” object(s) pending on the server, and inflate it and proceed with the next turn. This is my first attempt at programming anything more complicated than a simple website with a little JavaScript. Any help or direction would be appreciated.
FQL query on the
usertable, selecting all users whose uid is connected to your current user’s id in thefriendtable, and hasis_app_userset to true.