Web? Project

Hey guys,

I am creating an app that will play out similar to a turn based strategy game. There will be a per-game chat and a global chat, but the turn based-ness is relatively small. I’m expecting long delays between turns, games will be short and one user will be playing in several different games. (However if the person is watching the game, I wouldn’t mind it being able to update itself without user intervention).

I had planned on developing the system in PHP and MySQL and then just making HTTP POSTs to PHP within the app and acknowledging their responses etc… within the app. If there are some particular technologies of interest for this I would love to learn more.

This app will eventually be ported over to facebook and possibly have a stand-alone website as well, if this makes any difference.

Thanks a lot! [import]uid: 130180 topic_id: 24057 reply_id: 324057[/import]

It appears you have stated what you are doing, but have not asked a question, or stated what you need help with.

Knowing what you are doing is nice and all, but what are you asking? That would be helpful to people who read this and are trying to figure out “What do you want?”

:slight_smile:

ng [import]uid: 61600 topic_id: 24057 reply_id: 97018[/import]

Sorry, I apologize for being unclear.

I am looking for some guidance on what technologies will be the most efficient for a project like this. Is making calls almost as if my app were a web browser a smart idea? Just HTTP POSTs to mirror what would be happening if they logged into the game as if it were stand alone, but with smaller return data (ie; ‘success’ instead of displaying the website back to them and having the game client know what to do and display based on seeing ‘success’ or ‘move a1 to c3’ and have the app pre-programmed to show the animation etc…)?

I am also concerned about how to keep the user logged in permanently, even after they close the app and re-open it, or power off the phone and back on. I normally handle logins with cookies or sessions, is the practice pretty much the same when using a mobile app?

Thank you. [import]uid: 130180 topic_id: 24057 reply_id: 97097[/import]

HTTP GET/POST (which Corona does quite well) will work with any old web hosting account where you can run PHP and MySQL. This will work fine for your game turns since the server just needs to know the current state and time doesn’t really matter.

However for the chat aspect, chat generally needs to happen right away. When a player sends a message it typically broadcasts to all other connected players. I’m not really sure how you would integrate the two. This type of instant connectivity you’re going to need socket level programming (which Corona can do) and a server program running on a host where you can run programs in the background that listens for traffic.

You could have a message queue that when players connect, they see the messages left previously by the players. This would work with a typical webhost and would work with HTTP GET/PUT requests.

The other option for chat that doesn’t involve setting up a real time service is to use push notifications. You could do this using HTTP GET/PUSH and PHP scripts. Or you can use a service that does that for you like PubNub (see the sample code under Networking/MultiplayerPubNub)

They charge per message pushed but its pretty low and if your game gets successful enough to where their fees are adding up, you’re probably making enough that it will not be expensive.
[import]uid: 19626 topic_id: 24057 reply_id: 97102[/import]