Check out Symmetric Chess, our featured variant for March, 2024.

Play Chess online with Game Courier

Game Courier let's you play Chess, as well as many other Chess variants, by online correspondence. Click on a button below to select the board, pieces, and rendering method you prefer. The board may be rendered as an HTML table, with CSS, or as a graphic image in the GIF, JPG, or PNG format. You may change any of these settings during the course of your game and further customize them to suit your taste. Games will normally occur asynchronously with other people online, with Game Courier keeping a record of the game, enforcing the rules, and automating castling and en passant. Moves may be entered with the mouse without any knowledge of notation.

Default Preset for Chess






The preceding presets have all been updated to use the fairychess settings file and the fairychess include file. These use the most recent code I have written for playing Chess. This code is designed for making it very easy to modify for use with other games. It differs from earlier code by assigning names to pieces and by using piece names rather than piece labels for piece-related functions and subroutines.

It is a futher modification of of the Chess3 code (settings file and include file). This was designed to be better for adapting to other games than previous code for Chess was. I wrote the Chess3 code while writing the tutorial How to Enforce Rules in Game Courier. I have also used this code for the tutorial How to Make Your Game Display Legal Moves in Game Courier. You can refer to these tutorials to understand how the code works and what you need to modify to adapt it for use with your game.

The Chess3 code is a modification of the Chess2 code (settings file and include file). I changed the version number, because I made some changes that would break some games if I made them directly to chess2. Chess2 differs by being less streamlined and in small details that had to be preserved for games already using it.

Finally, the main code for Chess used to be what is in this settings file and include file. This code was more optimized for Chess, making it faster at the cost of being less adaptable to other games. In particular, it uses separate subroutines for checkmate and stalemate, and it uses a function instead of a subroutine to tell whether the King would be in check on a particular space. While this makes it faster in benchmark testing, it is a difference that players usually won't notice. But if you want to see how to do Chess even more efficiently, you can study this code.


Written by Fergus Duniho
WWW Page Created: 13 September 2003.