Turn based game

I am curious if Corona Game Edition has the ability to create a “turn based game” whereby one player is one iPhone and the other is on another? I can’t find any information about this but would imagine that it is a feature lots of people would like to add.

A simple yes or no answer would be a great start. If it is possible then any links to further info would be fantastic.

Thanks

Paul [import]uid: 7863 topic_id: 2215 reply_id: 302215[/import]

I’m sure someone who’s done it (or not) will come along and give you a Yes or No, but as long as Corona can talk to an online server, I would imagine you could do it.

  1. Player A takes his turn and the screen switches to “Waiting for Player B…” and sends the move data to the server.

  2. Every x seconds Player A’s game sends a message to the server asking, “Is it my turn, yet?”

  3. When it finally gets a “Go ahead” it grabs the data that shows what Player B did, switches back to the game screen, and then Player A makes his move while Player B’s game is checking in with the server.

Obviously a 1000 foot view (1000 mile view?) but since Corona has http.request() available, I’ll bet you can do it.

Jay - J. A. Whye
[import]uid: 9440 topic_id: 2215 reply_id: 6711[/import]

Thank you Jay. It is great to know it is possible. I was hoping there was something built into it or some tutorials covering this topic. I guess it may require some special server to do this? Perhaps that is what the Open Feint thing is?

Thanks

Paul [import]uid: 7863 topic_id: 2215 reply_id: 6713[/import]

Never used OF but I don’t think that’s what it’s for. For a turn-based game you’re going to have to do some sort of server-side coding, and if you stop and think about all the steps for connecting two users it could get kind of gnarly.

Maybe someone here has already done the heavy lifting and will be along to share. :slight_smile:

Jay - J. A. Whye [import]uid: 9440 topic_id: 2215 reply_id: 6715[/import]

I’ve been wondering if the lua socket library could be used for checking the local network for servers as I know the library can operate as both a client and a server. The two problems here are that it would require the afore-mentioned heavy lifting (which I’m quite willing to do once I’ve finished my current app); and the second being that a piece of code listening as a server or client can run asynchronously, without locking the client game, of course. This I’ve looked into, but have not found a solution.

Like I said, if anyone knows of any informative lua networking forums, faq’s etc, I’m willing to do the coding required and share it here.

matt [import]uid: 8271 topic_id: 2215 reply_id: 6741[/import]