I am planning a relatively simple online multiplayer game, and I'm at a standstill about what to use for communication between player and player.
More about the game:
- 6 players
- Chat
- 30 second rounds (breaks)
- Time synchronization is important.
The players choose and act, and at the end of the round an action is performed, there is a short break in the details of the action and a new round begins.
I decided to completely create this game in JS and PHP (of course AJAX). I just don’t know what I should use for client-client interaction. At first I planned to use constant AJAX calls with 1/2 second support in a PHP script using mySQL to store game / user data, but I'm afraid it will be too slow and unpredictable.
I was considering using something like XML instead of mySQL and using something like the php fopen () function - what do you guys think about this?
I read in this question here , where the poster is considering using XMPP, could this be a good solution?
Should I go for the socket? Is it necessary for a game that does not require much data exchange? What will be required for this?
Any suggestions for round time synchronization? Or is that what I really need to worry about?
I am open to all suggestions and really appreciate any help I can get.
source
share