1
\$\begingroup\$

I would like to add the option to play against another person over my wifi network in my pong game. How do I make this happen?

Also, I would like to know how to be able to have 4 players at the same time like I would if I make a monopoly type game or something similar.

I'm a newbee so please point me in the right direction or show me some code I can use for this and study. Thanks guys David

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

The two main options seem to be GameKit (built on top of Bonjour) and Bonjour. If you're taking the GameKit route, use peer session mode for two players and server/client session mode for more than two. If you're taking the Bonjour route, good luck.

Also, Gamekit supports wi-fi and bluetooth.

Peer-to-peer connectivity allows your game to create an ad-hoc Bluetooth or local wireless network between multiple iOS-based devices.

Helpful Links:
GameKit Programming Guide: Peer-to-Peer Connectivity
GameKit Examples at the iOS Developer Library - Try the GKTank and GKRocket examples.

\$\endgroup\$
1
\$\begingroup\$

Take a look at Gamekit sdk. It is an Apple sdk for what you want to do.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the reply, can I find working code for this anywhere? I'm a newbee so I want to find code that works and play around with. Anyone have code to share with me, it's only for learning purpose so I get a head start for school. Thanks guys David \$\endgroup\$ Commented Aug 7, 2010 at 20:18
  • \$\begingroup\$ I thought GameKit was a bluetooth library? Please enlighten me if i'm wrong :) \$\endgroup\$ Commented Mar 21, 2011 at 19:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .