A few weeks back I have released BTChess game on sourceforge, a bluetooth multiplayer chess game playable on mobile.
Project page: http://sourceforge.net/projects/enflexysgames
Here I explain the game. In later posts technical details will be explained.
The Game:
BTChess is a J2ME application, which you can download on your mobile and play. There are 3 options:
1) Play against another player who also has BTChess, via Bluetooth.
2) Play on the same Handset, take turn one-by-one.
3) Play against Chess Engine (TODO)
Option 2 is pretty straight forward. In Option 1, one of the player has to assume being "Host" of the game and then the other player "Join". Let us call Player 1 'The Host", and player 2 "The Guest".
The host selects the player's color, White or black and initial Clock Mode.
Bluetooth:
Only after a host starts listening, other guests can join. When a guest discovers a host, permission will be asked if he wants to play with the host. If not, another host will be searched for. If yes, host player will be asked for a permission whether he want to play with the guest. If not, it will wait for another guest. If yes, the game commence.
The guest stores the history of last hosts discovered, hence accelerating discovery. At any point of time, this cache can be cleared from Settings > "Clear Bluetooth Cache".
BTChess Clock: Clock can have 4 different modes.
1) No Time: Clock is disabled.
2) Per Move Incr: Some initial time is alloted to each player. Each move increases the time available. You can save time by playing fast initial moves, which would help later while planning strategy.
3) Fix Total Time: Some initial Total time is alloted to each player.
4) Fix Per Move: Each move has to be finished in fixed time. This will make game very rapid. Time saved in older move cannot help in new move.
Once the game is started, the remaining time will be shown in the nameplates along with the player name. The "moving" player's nameplate will be highlighted. A moving player can pause the game anytime. New games, loaded games, imported games etc. will start in Paused mode.
Any player can Set a new Clock any time in the game. This is also useful when loading/importing game, as the clock information is not stored in the Stored games. This is sometimes an anti-feature, if not properly used. Say, a player has taken total 10 minutes. If a new clock is set with 8 minutes for a player, this player will instantly loose.
Game history: In game, any time a player can undo the move (Move Back). Player will be asked, how many plys he wants to go back. A "ply" is a half move, hence 1 move consists of 2 plys, one by each player. "Moves" option displays list of all moves played till now. It also has an option of "Move Back" by selecting move from the list. A player can watch replay of the game when the game is going on. Currently there is no Pause replay option, but a bluetooth signal can pause the replay.
Storage: There are 2 sets of IO operations available, RMS and FileSystem.
RMS: "Save" will ask for the name of the game to be stored in RMS. "Load" complements this by showing available games already stored in RMS. RMS is useful when FileSystem is not available, and even if it exists, it is fast way to manage games.
FileSystem: "Export" would show a File Manager. User can browse thru folders and save the file in desired location. Additional options available for creating/deleting folders and files, getting information regarding files etc. "Import" complements this by showing FileManager for picking up file.
There are 2 formats you can store a chess game. First a native enflexys format, another Standard PGN format. Currently PGN import is not available.
Sounds: All sounds can be turned off or on from Settings option.
All special rules are properly implemented such as en Passant, castling, promotion, stalemate, draw by 3 repetition etc. Only rule not in effect is "50 move" draw, which is unlikely from mobile game perspective.