1

I recently made a game for Android and want to add a multiplay feature to it, to avoid server cost i plan to use bluetooth to connect up to 8 devices together and share small amounts of data on their progress within the game (score and if they are still connected). Spent a while looking at web tutorials and the Android API and thats just made me more confused. Anybody have any advice on what to do or any good tutorials on this issue.

Peter Jenkins
  • 31
  • 1
  • 5

2 Answers2

0

I believe bluetooth is more of a p2p type network.

I would suggest using wifi or wifi direct, maybe even have one phone be a hot spot they all connect to.

Or you can do something like the networking standard ospf does and instead of flooding the entire network with updates send an update to one designated device which sends it out to all others.

According to an answer here: Android Bluetooth API connect to multiple devices

You can certainly connect to multiple devices, but by the other answers I would heavily suggest against it given the other technology we have these days. Mist devices out there wont be able to handle 7 different devices, let along have a good enough battery to commit to such processes.

Given at least 1 of your devices are modern I would use wifi...

Community
  • 1
  • 1
FabianCook
  • 20,269
  • 16
  • 67
  • 115
0

Just to let you know of the existence of other possibilities, there's WiFi Direct, which allows the connection of Android devices via WiFi and without an access point. Quoting the intro:

Wi-Fi Direct allows Android 4.0 (API level 14) or later devices with the appropriate hardware to connect directly to each other via Wi-Fi without an intermediate access point. Using these APIs, you can discover and connect to other devices when each device supports Wi-Fi Direct, then communicate over a speedy connection across distances much longer than a Bluetooth connection. This is useful for applications that share data among users, such as a multiplayer game or a photo sharing application.

John Jorsett
  • 276
  • 2
  • 8
  • I don't really want to use WiFi direct as it means i will have to either drop support for older devices or only allow 14> to use the multiplay feature. – Peter Jenkins Oct 10 '12 at 16:53