I am thinking of adding some code to WinBoard to facilitate live webcasting of the games it is playing. I am not very experienced in web programming, however, and wonder what would be the best way to do it.
The best idea I have so far would be to add an option -serverURL to WinBoard, with which the user could specify an URL where WinBoard should post any moves as soon as they are made. It could use the format
http://serverURL?game=GAMEID&pwd=server ... &move=e2e4
to post the move e2e4 to the server, accompanying it by a GAMEID (an arbitrary integer, e.g. obtained by a random() call at the start of the game) and the value of the -serverPassword option to prevent abuse.
The server receiving the moves (some CGI script) could then maintain a file on the server for each GAMEID it got sent, and append the received moves to it. It should also keep a 'game directory' in a file, to which it adds every new GAMEID it receives, plus some information about the game (basically stuff that usually would be in PGN tags, like players, event, TC). Of course WinBoard would have to upload that info as wel, e.g. through a request with the format
http://serverURL?game=GAMEID&pwd=server ... ack=Nebiyu
The server would also put this information in the corresponding game file. Viewers could fetch the directory file to see which games are in progress and which games are finished and stored, and then fetch the file for the game they are interested in to get the moves.
WinBoard and webcasting of games
Moderator: Ras
-
hgm
- Posts: 28475
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller