12

i'm looking for a way to connect two devices using Bluetooth in Unity iOS and Android Basic for Multiplayer-Gaming. I found:

  • AllJoyn by Qualcomm - Bluetooth works apparently only with Root-Android Devices and currently not with iOS.

  • iOS GameKit Local Multiplayer by prime31 - Only for iOS.

  • Bonjour Plugin by Gregzo - Not Bluetooth but a other local-multiplayer solution only for iOS.

  • TNet: Not Bluetooth, only for Android and iOS Pro

Has anyone any other solution (especially for Android)?

I would be grateful for any help. Also for other p2p-Unity-Solutions.

Oli
  • 1,407
  • 3
  • 30
  • 47
  • 1
    Connecting across platforms via Bluetooth will be really difficult. Your best bet is to use Bonjour/Zeroconf. This will mean both devices will have to be on the same WiFi network, but once one device advertises a service the other should be able to see it and join. You'll still need to write you own Unity plugin for Android though. http://android.noisepages.com/2010/02/yes-android-can-do-zeroconfbonjour-jmdns/ – Calvin Oct 24 '12 at 18:44

3 Answers3

11

For Ships N' Battles (a cross platform multiplayer game Unity authored) we have built several ways to perform a multiplayer game:

via Bluetooth (using Prime31 plugin)

  • iOS

I've never seen a game with multiplayer between iOS and Android using Bluetooth.

via LAN (using Unity RPC)

  • iOS
  • Android
  • Mac
  • Web (Kongregate)

The players can start combats in a Local Area Network with any of above devices: iOS vs iOS, iOS vs Android, Android vs Mac, and so on.

via Game Center (using Prime31 plugin)

  • iOS

Uses the Game Center multiplayer to match combats.

via Global Server (an in-house solution)

  • iOS
  • Android
  • Mac
  • Web (Kongregate)

The players can start combats around the world with any of above devices: iOS vs iOS, iOS vs Android, Android vs Mac, and so on.

For this solution we have built a online server, but you can use something like Photon.

giacomelli
  • 7,287
  • 2
  • 27
  • 31
2

For Android, you can use plugin I've released recently: Android Bluetooth Multiplayer

For iOS, I've made a plugin as well: Local Multiplayer for iOS/tvOS/macOS

Both are designed to be compatible with Unity built-in multiplayer, so you can use any of existing tutorials about Unity built-in networking or reuse your existing networking code with minimal changes.

ZimM
  • 91
  • 1
  • 5
1

Unity Announcing UNET (UDP based Multiplayer)

http://forum.unity3d.com/threads/unet-sample-projects.331978/

Oli
  • 1,407
  • 3
  • 30
  • 47