Jump to content

Recommended Posts

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!

 

 

Link to comment
https://forums.phpfreaks.com/topic/235468-is-this-possible-with-ajax/
Share on other sites

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.

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.