General question regarding online multiplayer for iPhone game with masterserver

Hi,

I think this will work with Unity’s masterserver out of the box - but I’m not sure: I want to create an online multiplayer mode for my game where player connect directly to each other (p2p) but find each other via the masterserver. So, lets say I setup the masterserver on my Linux server - all he has to do is to manage the connections - and the player will find other player this way. Mmhh, I hope you know what I’m trying to say. :slight_smile: Is this the way how it works? Is there a limit how many connwctions the masterserver can handle? Or is there a better way to achieve an online multiplayer mode for an iPhone game?

Thanks!

Axel

Please define p2p

If you mean adhoc, then this can not be done with Unity Networking but requires GameKit usage.

If we talk about real networking between then, then keep in mind that this multiplayer capability is only possible on WiFi, 3G does not allow NAT Passthrough on most phone providers.
But yes on WiFi you could use the masterserver to find the game another ipod/ iphone created given they registered their game.

The normal way to achieve multiplayer, especially in the light that you might want local adhoc mode if you don’t have a game with a central server, is GameKit (bluetooth, adhoc wifi)

Thanks! I have already local multiplayer via WiFi and I would like to achive online multiplayer via 3g now. Maybe that’s a dumb question…but what is GameKit?

An iOS Framework allowing local multiplayer.
If you don’t use it you don’t have local WiFi multiplayer actually (with local wifi multiplayer I mean without a Wifi accesspoint) as thats only possible with GameKit

as for online via 3G: that means you must host servers, otherwise it won’t work. as mentioned, NAT passthrough does normally not work with phone providers and as a device on 3G can’t host games

Ok, now I got it. Mmhh, so I need a didicated server for multiplayer via 3g? What the best choice here…Photon?

There are multiple options, you best evaluate them. There is Photon, SmartFox, plain sockets and some name ElectronServer though I’m unsure if it works with iOS

Ok, thanks a lot for you help - this entire multiplayer-3g thing is much clearer now. I think I will give SmartFox a try.

AxelF, dreamora,

Yes, ElectroServer works with iOS just fine! You can achieve it via Unity or just writing Objective-C code. Here is a video tutorial showing you how to get started with ElectroServer and Unity.