I want to make a simple online multiple player cards game using PHP/Ajax. I guess I need socket programming (I want it to be real time). I've worked with sockets before in Java, but not for an online program, just a network game. I searched but I didn't really find a comprehensive code.Also another issue is that several games might be played simultaneously and I don't want them to interrupt each other. How to manage them all?
Could you guys give me a simple understanding of how to do it? Do I need to write two codes, one for the management (host) and another one for clients? Is it possible to test these kind of programs on localhost(xampp)?
Also any simple codes will be appreciated.
Thanks in advance.
Could take a look on this project
I do not think PHP is the right language for this. Also, there is a difference between Ajax and sockets. However, despite my objections, the least I can do is point you to the right resources. My 2 cents.
In a similar question from earlier today I found the APE Project that while researching.
I haven't tried it but it looks fairly good with the main limitation seeming to be no Windows server support. So you probably couldn't install and develop it on a Windows localhost LAMP set up, maybe think of installing Linux and setting up a LAMP server locally on that - it's what I did.
Good luck, and if you give it a shot, let me know how you go. I'm quite interested but don't have an application for it at the moment.