Page 1 of 1

Two Player Facebook Game Structure

Posted: Mon Jul 22, 2013 12:35 am
by JetPro
I am currently developing a Two Player, Real Time Facebook Game. It is a card game that allows interaction between two players. I have already created the game with JavaScript but it's not yet playable by two Facebook users. I want to have some idea to do this. Here are the things to be considered:
  • A Facebook user must see his complete friendlist and he must be able to send real time request to his friend to invite to join a game in an instant.
  • Users must be able to see his friends who already played the game and the friends who haven't played yet. This is for the users to send an invite to them who haven't tried it yet.
  • They must also see if their friends are currently playing. If they're not, they can send a request to them to invite them in to join a game.
I have some knowledge in PHP, My-SQL JavaScript. Please give me some idea to start this. Thanks.

Re: Two Player Facebook Game Structure

Posted: Mon Jul 22, 2013 1:19 am
by Jackolantern
I am not too familiar with the Facebook API, or exactly how much of this would be done on their side, or if it is just a matter of getting the names of friends, and you have to do it all yourself.

However, with PHP, the best way to send invitations to users instantly is through long-held AJAX polling. However, they would have to be in your PHP application already.

Could you explain a bit more about the structure you already have?

Re: Two Player Facebook Game Structure

Posted: Mon Jul 22, 2013 3:28 am
by JetPro
Thank you for responding quickly.

As of now, I have the plain JavaScript that runs in my local device. It is plain JavaScript and it does not implement client-server structure.

Will Node JS help me achieve this goal?

Re: Two Player Facebook Game Structure

Posted: Mon Jul 22, 2013 6:02 am
by Jackolantern
I'm afraid I don't know much about the Facebook API (it is something I have been meaning to get up to speed on sometime soon), but I do know that if it has anything to do with real-time, 2-way communication on the web, yes, node will definitely help. :cool:

Re: Two Player Facebook Game Structure

Posted: Mon Jul 22, 2013 10:25 pm
by JetPro
Please help me create the structure of this game. I don't know what to include in my database. I think I really need Node. But I don't have any idea on how will I allow users to send invites in a real time manner.

Re: Two Player Facebook Game Structure

Posted: Mon Jul 22, 2013 11:18 pm
by Jackolantern
We are always here to help with any issues you may have while developing, but I am currently working on my own game (in the Project Showoff Tier I section). Also, like I mentioned before I am not familiar with the Facebook API. If you don't even know how to start, you probably need to go back to some tutorials and learn more about the platform you are targeting.

Re: Two Player Facebook Game Structure

Posted: Tue Jul 23, 2013 3:42 am
by Xaos
I'd also check with Facebook and see what is required/needed to host a game on Facebook. You wouldn't want to do all of that work, wait for Facebook implementation, and they deny it to you, or they say they basically do all of the connecting all you have to do is provide the game and you've done a bunch of stuff with APIs.