I'm going to build a series of games, some of them support up to 4 players connected to a server (which is also a client, aka player), and some of them support only 2 players. Which communication route is the best approach for this particular problem? I've been searching and it seems Bluetooth on iPhone only supports P2P, and that alone is not supported in the first gen iPhone, but I've not been able to assert this correctly. Is it true? Thanks in advance.
Bluetooth vs WiFi - need advice
(7 posts) (5 voices)-
Posted 1 year ago #
-
As far as i know, you can use bonjour to connect up to 6(?) devices locally. It will use bluethooth or wifi.
Using the GK Peer Picker will allow you to connect just 2 devices, if you want to connect more, you will have to do it in some other way.
There are some good examples of both ways in apress' "beginning iPhone Games Development"
Posted 1 year ago # -
You can have more than two devices connected via bluetooth. Do note however that bluetooth is a bit quirky and you're bound to run into issues, especially cause the bluetooth range is incredibly small.
Have a look at apples Witap example, this will show you how to do both WiFi and bluetooth in one go.
Posted 1 year ago # -
Off-topic possibly, but is there a way to run multiple simulators at once to test networking, or have a simulator connect to your device? Or is having two devices the only way to test networking?
Posted 1 year ago # -
I've tested and released one of my app by testing with simulator and iphone 3g device for local wifi data transfer.
Posted 1 year ago # -
WiFi works in the simulator too so you can hook up to a device. Bluetooth can only be tested with two or more devices.
Posted 1 year ago # -
Thanks for your answers. I'm looking at the GKRocket example and making it more generic and player number agnostic.
Posted 1 year ago #
Reply
You must log in to post.