Jun 20 2010

AndEngine – Multiplayer Extension – Sneak Peek

Category: AndEngine,AndEngineMultiplayerExtensionNicolas Gramlich @ 19:50

Hello Community,

just wanted to give you a sneak peek on what the brand new AndEngine Multiplayer-Extension.

It features a very efficient bidirectional  ’message’-based binary protocol, so depending on what you plan to do, probably only latency will matter, not really bandwidth.

How did I get this idea?
Over the weekend I’ve had been visiting the DroidCamp Stuggart (#dcs2010), which was a pretty amazing event, where I gave a little presentation  about AndEngine (I’ll post the slides here soon). There also was a Hackathon, where we decided to make a multiplayer card game based on AndEngine. Basically every player sees his own deck of cards on his screen, together with the shared stack where all players can drop cards onto.

Due to AndEngine, the graphical part of the game was not the problem,  so what we had to implement was a form of Client-Server-Communication, which took us about 2 hours to ending in a not so generic way. At some point I remembered that I already had done exactly that before (yeah I have a bad memory, I know), for my Android-to-PC remote control AndRemote. So today I sat down 2 hours and made the code a little more abstract and while I was mostly deleting AndRemote-specific classes, I could reuse 99% of the code without any change (felt pretty good actually =D ).

I’ll commit the code of the Multiplayer-Extension to Google Code as soon as possible, which is, when I have completed the final tests.

Best Regards,
Nicolas

16 Responses to “AndEngine – Multiplayer Extension – Sneak Peek”

  1. gsk says:

    You’re an idol man, thank you for everything you have done :)

  2. Jesse says:

    Hey is this part done I really wanted to take a look at how you accomplished it.

    • Nicolas Gramlich says:

      Hi,

      the source of this extension is not public yet. But if you want to just use it, have a look at the AndEngineExamples source. It contains a compiled jar and the MultiplayerExample.

      Best Regards,
      Nicolas

  3. felipe says:

    I don’t have 3 androids :P .. can I develop using just the emulators ?!

  4. hungdl says:

    Hi Nicolas,

    I want to create a multiplayer game, in which, Clients is mobile devices and Server is my computer. The connection is created through internet. Can your extension do that?

    • Nicolas Gramlich says:

      While the MultiPlayerExtension was made for playing locally, you could still use the server part to run on your non-android-server. The only thing you’d probably have to do is to get rid of the android dependencies (99.9% of them should be Log/Debug statements).

  5. Eddy Ferrão says:

    Hello Nicolas,

    I want to create a multiplayer game too, but in mine I want to use a other server than Andengine, but for all the programming I want to use your engine. Can your extension, or your API help me to do this?

  6. multix says:

    Hi Nicolas,

    Is the source of this extension now public?. I am really keen to see how you have accomplished that…

    Thanks in advance
    multix

  7. Sebastian says:

    Hi Nicolas,

    my comprehension is, that multiplayer extension is based on tcp. Is there a way to use udp insted of this for time critical applications.
    In my case I am developing a multiplayer slotcar game and want to send acceleration / position updates to the server several times per secound.

  8. Sebastian says:

    Hallo Nicolas,

    warum gibst du meine Nachricht nicht frei / beantwortest sie?

    Mfg
    Sebastian

Leave a Reply