Hi All, Please suggest me which of the below ways would be best to make a multiplayer flash game in PHP. I want all players to simultaneously see the steps made by other players. 1) Polling the server at regular intervals using AJAX. 2) Using Socket programming. Please also suggest me if there is any other way possible using AJAX and Action Script etc. I personally feel that socket programming would be the best way. If any of you feels the same, please suggest me how to go about this.. I would really appreciate. Thanks....
multiplayer flash games and php don't work very whell. PHP socket functions are not so good in creating real time games. You should use a java for the game (on the server side) and flash on client side. Ajax is good but for the client. Your problem is not sending the information is receiving the info. For this you'll need to use XMLSocket functions from AS. See Flash documentation for more detailes. Of course if you have lots of money you can use Flash Media server
I agree, if you want to bake a cake, hire a cook, not a doctor. PHP is at it's best elsewhere, thats what Java is for.
But now, the problem is that I am not acquainted with Java. Can you guys please tell me what actual performance difference is there between sockets in PHP and sockets in Java. Whether it is in terms of Load handling capacity , or speed , or anything else. Also, if I want to do this in PHP , how can I improve the performance of sockets in PHP . It seems that the Texas Hold'em Poker game on Facebook is made in PHP :- http://apps.facebook.com/texas_holdem/index.php This game gets a lot of hits and its performance is also good. How do you think does it manages this ?