java - How to make a client/server game using Google App Engine -
I use my first client / server game as my last end (specification requirement) using Google Apps Engine I'm trying to 'tutorial' (java), but it all seems very browser-centric.
Actually, I would like my app (Mobile, not this important):
- To log in with that account, No allow your Google account!)
- create.
- "Marco" button to send an account-identification request to the server.
- Receive "polo" feedback from the server
- Data (such as a JSON object, XML-DOM or similar), not in the form of a web page.
Do any point to me a good tutorial / sample project / reading detailed To help me get this for myself? I'm pretty sure that, once I get that job, then I'll do everything else But I'm having a "stuck at the starting gate" problem, the basic account is not able to login, and non-HTML data exchange.
Thanks!
Unfortunately all my AppEngine knowledge is using its Python SDK but it should be translated into "Java".
< P> You need to create a user system I created some account in the form of a cover around the Google account system But if you do not want Google Accounts, you can create a simple user table and session system yourself. Concepts are very simple but you can see how a look at the top of APIIN has been made here:In that example, the user system has bugs (cookie content), but you will not care as much as you can not use live cookies. Needing to certify against those accounts, starting a session with authenticated account, and the ability to return the session key back to the customer app. The client application then uses that session key to authenticate in the future. For most of those parts, I can be shining with the examples given above.
Once you have the ability to start and authenticate the session, then in reality you just need the ability to do RPC server with the server. How do you start the RPC depends on the app platform, but when you talk to APPN, you have to talk about HTTP. Basically the client will make an HTTP post request to the server that contains a session to POST, a session key with a JSON / XML object, the name of the function that you want to call, and any arguments for that function. The response from the server will be an HTTP response with the response body being only a JSON / XML object. In Python you can use simple json API to easily convert jason to python dykes and an xml lib works the same way. There should be an equivalent Java API.
An example of requesting an RPC for APIN on HTTP (again in Python, sorry) can be fond of:
You can leave all the client accessories until you Javascript is not being used (which is actually a great way to prototype a test client for this) The part you are interested about is how the server tells which function calls and How does the answer Is:
self.response.out.write (simplejson.dumps (result))
Hopefully some of you start up on this project gone. Good luck!
Comments
Post a Comment