1. Download our Official Android App: Forums for Android!

Apps Android - Bluetooth garbage collector

Discussion in 'Android Development' started by monnti, Sep 12, 2011.

  1. monnti

    monnti Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Dec 22, 2010

    Dec 22, 2010
    5
    0
    5
    Hey!

    I am developing a real time game. Therefore, I also want to provide a Bluetooth multiplayer mode. Now there is my problem
     

    Advertisement

  2. jonbonazza

    jonbonazza Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,930
    Joined:
    Jul 13, 2010

    Jul 13, 2010
    1,930
    457
    163
    Male
    Unfortunately, there really isn't a way around this... in Java at least... Your best bet would be to use the JNI, find a C/C++ BT library and write it in native code.
     
  3. monnti

    monnti Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Dec 22, 2010

    Dec 22, 2010
    5
    0
    5
    I have looked inside of the AndEngine Multiplayer Extension. They use a DataOutputStream/DataInputStream. But I
     
  4. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    How large are your messages? Can you trim them down and/or can you keep to only sending when needed, and predicting movement/behavoir when waiting for a message?

    If you've ever noticed this is what online games have done for years due to latency etc. When you see a character run sometime they will "rubber band" when stopping or changing direction. That's because the actual position data just caught up with the predicted position.
     

Share This Page

Loading...