Mar 18 2009

Plugging a hole in GameKit

The GameKit framework in iPhone OS 3.0 is very interesting to a Bonjour / P2P head like yrs truly. It basically provides a very easy-to-use API for ad-hoc group formation and many-to-many messaging on a local network. Great for games, of course, but also for many other types of social apps. (I just saw a report on a dev forum that somebody had whipped up a basic chat app in about 15 minutes.)

GameKit uses BlueTooth networking; that lets it work where there’s no WiFi, but it also limits the range. BlueTooth covers just a few meters, whereas a WiFi network connected to an Ethernet subnet can easily cover a whole floor of a building.

My MYNetwork framework seems like a good way to bridge that gap. The TCP connection classes provide the Bonjour discovery and makes point-to-point connections, and the BLIP protocol lets you send data blobs over those connections.

It should be pretty straightforward to build some classes that are plug-compatible with the GameKit network classes but use MYNetwork. Then iPhone apps could easily support both protocols, and compatible Mac apps could be developed. Anyone want to try it?

[Note: I’m only referring to information that was publicly discussed at Apple’s press event yesterday. I’ve read through the APIs, but I won’t go into details about them here in public.]


3 Responses to “Plugging a hole in GameKit”

  • Rick Says:

    The different ranges of Bluetooth and Bonjour have different social implications, though. Bluetooth provides for starting a game with your friend across the table from you without any complicated setup, or for seeing if that cutie a couple rows up on the bus wants to chat… Bonjour isn’t good for such scenarios since there could be thousands of people in its “local” domain (think WWDC).

    A game or social app that uses both could be cool. Let whatever friend-finder UI it has start with showing only “Nearby People” (with an option to expand discovery to Bonjour range). Use GameKit’s Bluetooth to negotiate the initial connection, but switch to MYNetwork for actual data transmission so you can keep a more reliable connection.

  • Scott Says:

    I wish it could be used for creative things like saying hi to the cutie a couple rows up on the bus… but unless you’re both running the same app at the same time, it doesn’t sound like you’ll see each other. Maybe both apps don’t need to be identical — just both support a common data protocol — but that’s still asking a lot.

    For that reason, I think Scott Forestall’s example of having your company write an app so your salespeople could wirelessly leave info with others was sort of bogus… it presumes the potential clients already installed that same app so they can receive the salesperson’s data.

  • Nimi Says:

    My first thought when I read the GK guide was how am I going to integrate your MYNetwork+BLIP into it. I’m definitely going to give it a try as soon as I can allocate the time for it.