Jump to content
  • Advertisement
Sign in to follow this  
Darir

iOS Phone-to-Phone Connection

This topic is 2526 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm just starting into iOS development and was thinking of starting my first game. The first question that came to mind was whether or not I'd need a server for multiplayer. If I do, that might make things more difficult. Instead, I was hoping to find a way to use one device as a host and have the devices communicate directly. Is there a way to do this or do I have to use a server for multiplayer?

Share this post


Link to post
Share on other sites
Advertisement
Some 3rd party libraries and Apples Game Center allows you to do this, which is called matchmaking. This allows you to pair up players without a dedicated matchmaking server, alleviating some of the backend burden. If your game requires a persistant server then, yes you'll need one but most games just assign one of the peers to be the "server"..

see :

http://stackoverflow...-using-game-kit
http://developer.pla...e/developer.php

Enjoy!

-ddn

Share this post


Link to post
Share on other sites
Thanks for the feedback, but I was looking at something less like matchmaking and more like Words with Friends, wherein you play only with people that you already know. I was thinking of using facebook integration for that. What I really need to know is just how to send information directly from one phone to another, if that's possible. Sorry if I was unclear in my original post.

Share this post


Link to post
Share on other sites
Sure its possible words with friends use a central server which stores the moves and the app just pings it to grab the moves which was uploaded by whoever turn it was.. That's my guess anyways. For an asynchronous multiplayer game like that you would need to store the moves on a server since you can't depend on having both players being active and one player servering at all times. For that you can just use straight up web server technology no need for anything exotic.

There are a few 3rd party library which will handle the hosting of these moves for you like these :

http://www.scoreloop.com/
http://openfeint.com/

I don't know if they integrate into Facebook already or not but it's worth checking out.

Good Luck!

-ddn

Share this post


Link to post
Share on other sites
Though the game I have in mind is turn-based, it isn't exactly what I would call asynchronous. I think what I need to know above all else is whether there is a way for two phones to communicate over wifi or 3g that I could take advantage of in my game. I've been looking at Game Kit, but it seems to be emphasizing "close proximity." Could this leverage 3g or would the players actually have to be near each other?

Share this post


Link to post
Share on other sites
Hmm well you would use the matchmaking server (provided by Game Kit or Play Phone) this will allow you to connect 2 devices to each other and start sending data. It's a complicated process, esp when people are behind firewalls, roaming, etc.. There are other ways to connect 2 devices such as direct ip on the same lan, by proximity through bluetooth, etc..

You can use Game Kits Auto-Match functionality to connect players together or you can use Play Phones web based solution..

Good Luck!

-ddn

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!