I'm developing a simple game (for Android, using LibGDX Framework) and I would like to implement multiplayer feature to it.

So, since the main project with the logic of the game in LibGDX is separated from the android project, I have created an interface to allow my game to call the GPGS API in order to implement its services.

But, it doesn't work. Have someone an example to show me how to do this? However, this is what I have done (premise: GPGS SDK is already installed and its library is linked to my Android project):

  1. Copy the GameHelper class of BaseGameUtils (downloaded from Google) in my Android project.
  2. Make the interface in the main libgdx project
  3. Create a class (named MultiplayerOperations) that implement the interface, in my android project. This class is more similar of the BaseGameActivity available in the BaseGameUtils.
  4. In the activity of my Android project a make an object of the last class type and pass it to the constructor of the main libgdx project.

    mpOperations = new MultiplayerOperations(this);
    initialize(new CloseWall(mpOperations), cfg);

When I start the application, it doesn't work and it exit with an exception.


closed as unclear what you're asking by John McDonald, Anko, bummzack, Trevor Powell, Seth Battin Dec 16 '13 at 5:18

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    \$\begingroup\$ It would be helpful if you could explain "it doesn't work" and paste the exact error message you're getting from the exception. \$\endgroup\$ – MichaelHouse Jun 13 '13 at 16:25
  • 1
    \$\begingroup\$ Welcome to GameDev.SE! Could you possibly post the exact exception? Is it the initialize line that throws? \$\endgroup\$ – ashes999 Jun 13 '13 at 17:12