- 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.
Two Player Facebook Game Structure
Two Player Facebook Game Structure
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:
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Two Player Facebook Game Structure
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?
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
Re: Two Player Facebook Game Structure
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?
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?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Two Player Facebook Game Structure
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. 
The indelible lord of tl;dr
Re: Two Player Facebook Game Structure
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.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Two Player Facebook Game Structure
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
Re: Two Player Facebook Game Structure
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.