Programming Question: Multi-Player Poker Game

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I have a programming task and was wondering if anyone has some thoughts on
the best way to achieve this.

I am programming a mulit-user poker game using ASP.Net 3.5 and AJAX. I do
not want to write a Java applet or any type of standalone program that would
reside on the user's

computer. I just want the user to use a browser as the user interface.

I have 5 users at the table. Each user has their own browser session (i.e.
they are located on different computers around the world).

Player 1 is the first player to act. He bets $5.

My question: How can the other users be notified on Player 1's action?

Now, my initial reaction is to have a database table that keeps track of the
hand's current "status" (i.e. who's turn it is to act). I could use an
UpdatePanel control and a Timer control

that queries the current status table every second or 2 and display a
message in the UpdatePanel that would notify all the user's as to whose turn
it is. I am pretty sure that I could get

this to work.

However, this does not seem very elegant nor scalable. Hitting the database
every second or two for each of the five players doesn't seem very desirable.

Is there any other technical solution that would be feasible?

TIA for any assistance or advice you can give me.
 
Paul said:
I have a programming task and was wondering if anyone has some thoughts on
the best way to achieve this.

I am programming a mulit-user poker game using ASP.Net 3.5 and AJAX. I do
not want to write a Java applet or any type of standalone program that
would
reside on the user's

computer. I just want the user to use a browser as the user interface.

I have 5 users at the table. Each user has their own browser session (i.e.
they are located on different computers around the world).

Player 1 is the first player to act. He bets $5.

My question: How can the other users be notified on Player 1's action?

Stop right there. You will not be able to accomplish your project without
some sort of client application installed. The very nature of HTTP (even
with AJAX) will not allow for messages to be broadcast to other users
instantaneously.
Now, my initial reaction is to have a database table that keeps track of
the
hand's current "status" (i.e. who's turn it is to act). I could use an
UpdatePanel control and a Timer control

that queries the current status table every second or 2 and display a
message in the UpdatePanel that would notify all the user's as to whose
turn
it is. I am pretty sure that I could get

this to work.

However, this does not seem very elegant nor scalable. Hitting the
database
every second or two for each of the five players doesn't seem very
desirable.

Is there any other technical solution that would be feasible?

Why not just do what all online games of this nature do and have a
client-based game that communicates over the web?
 
Back
Top