Your server needs to run the games, and you need to look at "server push" mechanisms to update the client board displays with moves. You probably also need to do this so people can invite each other to play. One method is polling, the other is blocking threads (known as "comet"). You can look these up on this group and elsewhere for details. Once two people decide to play, you can create a new game instance on the server and "push" the game start state to both clients. Basically if player 1 (White) makes a move "e2e4" it is submitted to server, but the request is left hanging (blocked). Player 2 (Black) already has a "hanging request" from the game start, so "e2e4" is transmitted to him/her to complete this request with the move. When player 2 submits "c7c5" player 1's hanging thread is written to, and so on.
An interesting question would be how best to manage the player clocks, especially for speed chess. "Pushing" opponent's move to client should be reasonably easy, but synchronizing the three clocks (player 1client , player 2 client , server) in a fair way might be trickier even though move packets should be very small. You probably need to think through the implications of the delay between player I making move and player 2 receiving it etc. regards gregor On Jan 27, 3:33 pm, Owen Powell <opow...@gmail.com> wrote: > Hi guys, > > I'd like to know a bit about how to setup user interactions. For > example, suppose I wanted to make a website where people can play > chess against each other. People login, see a list of open tables they > can sit at, when two people sit at the same table a game begins. > What's the general idea for setting this up? How do I share > information from one client with another client (player X just sat at > table Y)? Do both users have to "share" the same instance of my GWT > app, or is this not at all how GWT works? > > Thanks in advance, > > ~Owen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---