any dev who experience in multiplay?

Discussion in 'Public Game Developers Forum' started by Jerry1923, Mar 11, 2010.

  1. Jerry1923

    Jerry1923 Well-Known Member

    Jul 19, 2009
    144
    0
    0
    Hi there, do there any dev who wrote iPhone wifi/bluetooth multiplay before?

    Recently, I'm trying to make my latest game Doodle Kart to have mulityplay via bluetooth. But I found that there are hugh data need to share between the 2 devices.

    -your car's position and direction
    -your car's status(it is in normal state, it is hitting by bullet, it is falling into to hole....)
    -CUP car's position, dicretion, and their status
    -items position and status (pencil, bullet...)

    I'm thinking about one device calculate all the things, and the other device just wait and receive the data to display on the screen. Does it make sense?

    Hey, I should ask you the most important question first: Do you think it's possible to make bluetooth multiplay work on my game? It's just too much data need to share between the device.

    You can have a look on my game here:
     
  2. nazara_tech

    nazara_tech Well-Known Member

    Apr 17, 2009
    272
    0
    16
    project manage
    India
    Really nice game. Sure you can make multiplayer. Downlaoding lite version
     
  3. galent

    galent Active Member

    Should be doable, you just need to vastly simplify your data transmission. You could go with a host/client model, but the send/recieve for the client will be longer than multicast, and the host will need to do a lot of calc.

    Personally, I would do some predictive code, with small dual/mult cast updates. transmit 2d x,y for player cars, event signals (one byte if possible), and just let the game handle the rest as usual. All you would need is to give the enemy car ai a 2d coord every 2-4 frames (let it fill in the rest), don't let the ai use weapons without an event, and possible pre-calc the powerups at race start, and sync during the stop light start sequence.

    Just my thoughts,

    Cheers,

    Galen
     
  4. BenSS

    BenSS Member

    Mar 1, 2010
    22
    0
    0
    Software Developer
    PA
    Nifty little game, I'm curious how you did the recording with the touch points though?
     
  5. Jerry1923

    Jerry1923 Well-Known Member

    Jul 19, 2009
    144
    0
    0
    Thanks and I'll try to code later. Recently I'm still studying the bluetooth sample code downloaded from the Apple dev site. (GKTank). I found that if both of the devices' wifi is turned on during the bluetooth multiplay, the game will be data transfer is very slow and even show out the 'disconnect and retry' message frenquently. But it works well if both devices' wifi is turned off. I don't know why there are so large difference when wifi turns on/off.
     
  6. eJayStudios

    eJayStudios Well-Known Member

    Oct 17, 2009
    249
    0
    0
    #6 eJayStudios, Mar 15, 2010
    Last edited: Mar 15, 2010
    Bluetooth is completely unreliable on iPhone when Wifi is turned on because both connection types shares same antenna.

    Regarding Bluetooth in your game I don't see why it shouldn't work? Just pack your data wisely and use unreliable sending mode as game is real time and it should be fine.
     
  7. Jerry1923

    Jerry1923 Well-Known Member

    Jul 19, 2009
    144
    0
    0
    I'm still trying the apple's sample code(GKTank). Both devices can detect another device. But when I click the deteced device, it will show a dialog saying "Waiting for xx's iPhone". Sometimes, it holds the dialog for over than 5 minutes and still no any response. What's going wrong?
     
  8. MexicanJesus

    MexicanJesus Well-Known Member

    Nov 10, 2009
    316
    0
    0
    It's waiting for xx's iPhone.
     

Share This Page