Search code examples
androidmultiplayer

Android Turn Based Game Multiplayer Suggestion


I am making a very simple Android turn based game its UI will be like this.

UI Image

Game Concept:

  • Two player game.
  • Each user place his turn to make the winning sequence.

I want to make this game multiplayer. I'd like a simple solution, as I only need to send the button position to the other user.

I've looked at these things: Stackmob, Parse, Kinvey, AppEngine, Similar Question, but they all look more difficult than I had hoped. What is the simplest way to accomplish this task?


Solution

  • If your game would be playable on 2 devices at a time, you have 2 options to sync both instances of game.

    1) Using Bluetooth (A good example is given in android API examples ie Bluetooth chat)

    2) Using WiFi (its very very simple, just like a client server communication)

    You may encode / decode state in base64 string so it could be transfer quickly.

    EDIT:

    Here is a good example about using wifi for communication:

    http://thinkandroid.wordpress.com/2010/03/27/incorporating-socket-programming-into-your-applications/