Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to make a game like "words with friends" or "chess with friends" or "Draw Something" or any of the other online multiplayer type games that are based around friends having game sessions with each other. I have made one app before that had no online features so I know the basics of objective-C and xCode. I looked up facebook connect so I know how to make friends find other friends to play with through Facebook. Just not how to make the gaming session.

I only need my game to send a small array (or XML if it's better) of strings and integers from one iPhone to the other as each iPhone takes a turn. I'm NOT sending some complex video or anything like in "Draw Something."

I was hoping someone could point me in the right direction (whether link to website or book or just a general idea) for how to do gaming sessions between two iPhones. I read this tutorial http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server but it seems to be more about having two iPhones communicate over a server on a laptop or through the same wifi, not how to have iPhones game together over any Internet connection like in "with friends" games.

I've tried to research this in other places but I'm never quite sure if what the articles I find are talking about is related to what I want or not. Someone please just point me in the right direction or give me a general outline of what to do. I will look up the specifics on my own once I know what to look for. Thank you.

share|improve this question
    
"Draw Something" Surely doesn't send any complex video data. Also, AFAIK you can't host servers(or matches) with a mobile(2G/3G/4G) network. Maybe these games use a master server on a computer to guide connections, like the lobby pattern? –  Gustavo Maciel Apr 10 '12 at 2:00
add comment

3 Answers 3

My guess, at least in the case of games like * With Friends, is that they host their own server and database that keeps track of turns/game states- not the either of the users phone. This way, the games persist for each user, and are harder to manipulate than if they were being computed on the devices themselves.

If I were to make a game with turns/sessions, I would set up a database with tables of players, games, and the moves within each game. I would also have some sort of authenticated API (in my case, in PHP) which would be used by the app to check the state of the game, and to post moves/changes to it.

The concepts themselves aren't necessarily game related, so not all the information you'll find on them will be either.

share|improve this answer
add comment

If you want to make a multiplayer online game then what you need is a server that the iOS devices can communicate to. So you can get your own or you can use apples game centre for your requirement.

If you are having your own server than i dont think that you are need to be told what do to then but if your using apples game kit framework then you can use these links to get your game development started and test for the desired results.

http://vivianaranha.com/integrating-apple-gamecenter-to-your-application/

http://vivianaranha.com/apple-gamekit-bluetooth-integration-tutorial/

You can also check out some really awesome tutorials from the same website's home page

http://vivianaranha.com/

share|improve this answer
add comment

I know this was asked about a year ago but let me see if i can shine a little light on the subject for anyone else trying to figure this one out. (Do not quote me on this) I believe the answer to your question is this. The "with friends" games, I believe, are actually web applications coded in html5 and js and then through a service is "downsized" and remapped for iOS and android devices. I do not remember the site I saw that did this and mentioned the company, but that would make the database and server connection easier than using Xcode or even eclipse.... thats my two cents. Not sure if right or not, but thats how I would do it if i were to make something like this.

share|improve this answer
    
Welcome to the site. References to how these games are implemented would greatly improve your answer. If those are unavailable, the general answer to "how was X done in game Y" questions is "ask the developers". Other answers are (without references) only guesses. About your method being easier: that seems to be a matter of technology familiarity. ObjC and Java are both quite capable of http communication. Better/worse technology questions are considered off-topic exactly because there is no correct answer. –  Seth Battin Apr 6 at 16:39
add comment

Your Answer

 
discard

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.