1

I have made this game for Mac OS, but I realised that i need to make it better with multiplayer.

Im an experienced Cocoa developer (so please, no RTFM's) but for some reason I never even touched on networking. I was wondering how I could send game date from com1 to com2, and vice versa, over different wifi networks.

Cheers, Conor

Edit: When I say different wifi networks, I mean no bonjour. I want to be able to play the game in the US with a guy in china!

Conor Taylor
  • 2,998
  • 7
  • 37
  • 69
  • 1
    If you have "never even touched on networking", then I'm afraid RTFM is at least somewhat warranted. Perhaps you're looking for an overview of what's needed & links to T(relevant)FM? From your description, you'll definitely need a server app sitting somewhere public to mediate and match the "willing participants". Peer-to-peer with "just anyone" doesn't work out of nothing. Some central service for player match-making must exist. That means web app. Then "finding" the "other" is a simple "using web service on iOS" question; the rest is well-documented peer-to-peer gaming on iOS. – Joshua Nozzi Mar 05 '11 at 05:40

1 Answers1

0

I can just copy my answer from this question :)
MAC IOS IPC: how to write P2P applications in MAC and IOS?

Apple Bonjour is the way to go:
- http://en.wikipedia.org/wiki/Bonjour_(software)
- http://www.mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/
Especially the sample project from the last link might be useful.

Quin (multiplayer tetris game) also uses Bonjour for example:
- http://simonhaertel.de/

Community
  • 1
  • 1
Anne
  • 26,765
  • 9
  • 65
  • 71
  • Bonjour provides a general method to discover services on a local area network. Im kinda looking for a p2p thing. But I will try out your answer, its just not what im looking for. Thanks – Conor Taylor Mar 04 '11 at 23:22
  • Yes, it can discover services, but it also makes communication easy. It works quite well for games in my experience and is easy to implement. I added the link to Quin to my answer, good example of how powerful Bonjour actually is. – Anne Mar 04 '11 at 23:24
  • It can also be used over the internet :) – Anne Mar 04 '11 at 23:40