Two Player Facebook Game Structure

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
JetPro
Posts: 15
Joined: Mon Apr 29, 2013 8:37 am

Two Player Facebook Game Structure

Post 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.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Two Player Facebook Game Structure

Post 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?
The indelible lord of tl;dr
JetPro
Posts: 15
Joined: Mon Apr 29, 2013 8:37 am

Re: Two Player Facebook Game Structure

Post 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?
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Two Player Facebook Game Structure

Post 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:
The indelible lord of tl;dr
JetPro
Posts: 15
Joined: Mon Apr 29, 2013 8:37 am

Re: Two Player Facebook Game Structure

Post 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.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Two Player Facebook Game Structure

Post 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.
The indelible lord of tl;dr
User avatar
Xaos
Posts: 940
Joined: Wed Jan 11, 2012 4:01 am

Re: Two Player Facebook Game Structure

Post 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.
Post Reply

Return to “Beginner Help and Support”