Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(Cross post from stackoverflow)

I am creating a multiplayer 2D game for Mac and iOS devices. I'll be using cocso2d for graphics/game engine, however I am largely blank on what to use for multiplayer communication. Please note that I cannot use central severs e.g. SmartFox, RedDwarf, etc since I want the players to "host" games for others and be able to play it on their LAN, VPN or my own servers.

Any pointers? I checked lidgren but it's for .NET only and hence not an option for me.

EDIT: just in case it wasn't clear, the messaging has to be real time hence it's probably going to be over UDP

share|improve this question
Please post either here or Stack Overflow, but not both. – user744 Mar 8 '11 at 20:39
the guys at stackoverflow had asked me to post here, hence this post. I had no intentions to post twice. – ishaq Mar 9 '11 at 10:16
What is your question, specifically? "Any pointers?" isn't an answerable question. – Trevor Powell Feb 1 '12 at 1:56
let me rephrase: "looking for a framework that I can integrate into my games so that players can create their own games on LAN a.k.a one of them can become host and others can connect to it. The players may be playing games via iPhone or Mac OS X". And "Any pointers?" is totally answerable question, links to useful frameworks/articles that talk about the above mentioned problem would constitute the answer. – ishaq Feb 2 '12 at 16:19

I've used ReplicaNet with three different iOS devices connected to the same game. You need to know how to have bindings to C++ but the source compiled without needing many changes for what I wanted. It seems to be the best performing library for mobile devices out there at the moment. It is also well worth talking to the ReplicaNet guys about an indie license if you're short of cash.

share|improve this answer
thanks, let me look into it. – ishaq Mar 14 '11 at 18:17

You don't want to be hosting any games from an iOS device, so you are probably looking for something to run on OSX.

I'm not sure how lidgren works or if it is Mono compatible, but the Mono project has done an excellent job of bringing .NET to OSX and Linux. I highly recommend you look into it, especially if your library of choice is .NET.

The server architecture and platform don't dictate what the client must use, so having a Mono/.NET lidgren server and an iOS (Objective-C) client should be just fine; however, there is MonoTouch which brings .NET and C# to iOS, so you could use that if you felt like it.

share|improve this answer
actually I'd like my iOS devices to host the games too. and I can go for lidgren, but I was looking for something that was natively supported bo Cocoa/CocoaTouch so that engineering effort is minimized, if I chose lidgren, I'll have to write the client API myself probably, I don't know if mono-touch would compile with objective-c. like I said, for game engine i'm planning to use cocos2d which is objective-c – ishaq Mar 8 '11 at 20:27
I have not personally used MonoTouch so I can't speak to its ability to interact with Objective-C, but I've heard very good things about it. – Nate Mar 8 '11 at 21:12
Why not host a game on an iDevice? Historically games have been hosted of PC's weaker than the iPhone, with 56k dial-up connections, and it worked :) – Zaky German Apr 11 '11 at 15:04
I didn't mean it wouldn't work, I just meant that the 3G connection could cause issues for connected clients. As the phone moves 3G might move to Edge and/or drop for a short period, locking out all connected clients. – Nate Apr 11 '11 at 15:43
sure, i understand that. However i believe that (unlike what seems to be the standard these days) users are not totally mentally challenged and will survive a short text explaining that hosting games should be done on wifi or with strong 3G reception and that doing so is far from a deal-breaker. If you do want to go for the lowest IQ common-denominator you can always force wi-fi programatically. – Zaky German Apr 12 '11 at 20:19

You can also use check out AppWarp for building multiplayer games using MonoTouch/MonoDroid. It has a server but doesn't require you to host or deploy. Its on the cloud. Here is a pointer to a blog post describing how to get started on it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.