i would like to develop a HTML5 poker game with .net and Asp.Net MVC backend. What i would like to learn is that there are a lot of sections in the application that needs to be refreshed all the time.
Here is a sample scenario : Let's assume there's an active poker table. Players must decide what to(call, check, fold, etc.) in 20 seconds. Player A decided to put all his chip in 10th second. How can all the other players see that the Player A has decided to all-in in 10th second?
What i'm trying to ask is that how can i populate all the informations about the poker games, tables, users? What are the concepts, APIs i need to learn about HTML5?
Thanks for your help...
You got a few diffrent solutions here:
Either you make the clients check for new information in intervalls or you push the information to them, I would recommend the later option since you are going for HTML5.
In order to push the information to the clients you will need to have an open connection to them, would recommend HTML5 Web Sockets to achieve that.
It will probably look something like this during the game play:
An client connects to the server and joins an table.
When the client joins the table he requests information about the other players from the server (name, positions etc) and current status.
When a player makes a move, he pushes "Raise $10" to the server, the server checks if this move is valid (it is the players turn, the player got enough funds etc), if the move is valid the severs pushes out to all other players that the player made the move and this is the current status of the table.
You will probably have to write a "socket server" solution in C# for the actual game play if you are going for the socket solution. But it will be in addition to MVC since MVC will handle all the HTML stuff around.
Some more to read about Web Sockets: