John Watson
John Watson

Reputation: 869

two player turn based game android

I want to make a two player turn based game (think of tic tac toe) for android. I am not sure how to implement the communication between the mobile and the server. Should I use sockets or http client ? Can anybody guide. Issue with http client is I have to regularly poll the server to see if any data has arrived. Is there any other way to push the data from server if I am using http client ?

Upvotes: 0

Views: 1140

Answers (3)

Buzz
Buzz

Reputation: 516

This is an old question but if you are still looking for a solution you could try the new Google Play Game Services.

Upvotes: 0

Dominic
Dominic

Reputation: 3483

You can use App Engine's Channel API

https://developers.google.com/appengine/docs/java/channel/

Even though there is no official Android library you can use this WebView wrapper

https://github.com/burcu/android-channel-api

but I haven't tested it yet.

Upvotes: 0

Alexandru Cristescu
Alexandru Cristescu

Reputation: 3948

Have you considered HTTP requests + push notifications? Depending on the particular kind of game this might be the best solution I guess...

Upvotes: 1

Related Questions