coder71 Posted May 4, 2011 Share Posted May 4, 2011 Hello, I'm thinking of developing a multiplayer game...you can think of it like "Jeopardy!" I know PHP and MySQL very well, and JavaScript somewhat. I have no experience with Ajax. Would it be possible to create a multiplayer (from different computers) Jeopardy-like game with PHP, MySQL, and Ajax that would work well? For example, players in different locations could log on to the site, see a queue of game sessions available, join one, and play. The database would store the questions and record the player's scores at the end of each game. It would be a multi-instance game, where n number of games could be played by n number of players. Traditionally, this sounds like a C++ client-server app (like the online poker games), but I don't know C++ at all. Just wondering if this could be done with PHP, Ajax, and MySQL. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/235468-is-this-possible-with-ajax/ Share on other sites More sharing options...
requinix Posted May 4, 2011 Share Posted May 4, 2011 It's more like a chat client than anything, really, except the players can't control the messages being sent. But before that, we need to talk about how you'd make a Jeopardy! game work over the internet. There are more issues there than how to make this happen with PHP. - While Trebek's reading the answer the players cannot buzz in. How would you work that? - When the reading is done, how can you know who buzzed in first? There are lots of sources of lag and latency. Quote Link to comment https://forums.phpfreaks.com/topic/235468-is-this-possible-with-ajax/#findComment-1210165 Share on other sites More sharing options...
coder71 Posted May 4, 2011 Author Share Posted May 4, 2011 Great observations! While Trebek's reading the answer the players cannot buzz in. How would you work that? My illustration with Jeopardy! is somewhat flawed. I would have a question displayed with 4 possible answers, and whoever read and answered first would get the points (or lose points if answered incorrectly) When the reading is done, how can you know who buzzed in first? There are lots of sources of lag and latency Exactly - the server would have to know who clicked first in order to determine who has the right to answer the question. This would involve either locking out subsequent answers from other players OR displaying a message that someone else buzzed in first. Also, it would have to notify each player if the first buzzed-in player was correct or not. So, is this something I can do with Ajax & PHP? Quote Link to comment https://forums.phpfreaks.com/topic/235468-is-this-possible-with-ajax/#findComment-1210168 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.