Re backgammon - I've found this javascript/DHTML version:
http://www.thomasweibel.ch/backgammon/. The board seems to be back to front to me. Also it is not clear whether it is open source. But it would probably make a very good starting point (would need to switch the board around).