I'm trying to develop a game that can be played by 2 players on different clients, and I can't figure out the mechanism how the server can communicate to both sites for the same game. A move on one browser gets communicated to the server, and the server must reply to both players. I understand PHP somewhat, but need help. I have developed the game on the browser using Javascript, which can be seen at www.dynodice.com . I'm a professional programmer with 40 years experience, but I'm a bit weak in this kind of gaming. Any advice?

Recommended Answers

All 2 Replies

Store the data in a database, get the clients to refresh/check the database at set intervals..

Thanks for your advice. That's exactly the direction I needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.