xboard-fow: Chess with fog of war

Some person at a talk at CCCamp 2011 mentioned something about fog of war in chess. Following this idea I downloaded xboard and modified it so that squares are only visible if the are marked as visible by some rule.

Rules

The current rules are:

  • All squares controlled by player (player has a piece on the square) are visible.
  • All squares where to a player (in theory, eg. if it would never be blocked) can move a piece are visible.
  • All squares knights “walks” along (eg. from square i,j ⇒ markSquaresAsVisible( (i+1,j),(i+2,j), (i+2, j+1) ), and the remaining 3 directions) are visible.

In future the visibility of a piece should follow the chess rules, so that a square is only visible from a square if the piece on the square really can move to the square.

Please note! The implementation only modifies the view drawing of the board hence chess AI still have access to view the whole board as if no fog is applied. So playing a friend (who also uses the fog of war variant) over a ics-server is recommended :)

Download

Version 0.1 of xboard-fow is available at: http://www.umbraculum.org/public/xboard-fow-0.1.tar.gz

Install

  1. Download xboard source (tested on version 4.5.3) from: http://ftp.gnu.org/gnu/xboard/
  2. Download xboard-fow source as written above
  3. Unpack xboard:
    tar -zxvf <xboard_file_name>
  4. Extract xboard-fow in the unpacked xboard directory:
    tar -zxvf xboard-fow.tar.gz
  5. Apply xboarx-fow patches from xboard-fow directory:
    patch -p1 -i xboard.c.patch ../xboard.c && patch -p1 -i Makefile.am.patch ../Makefile.am
  6. Configure and compile xboard as normal
    ./configure && make

You can now play chess with fog of war!

Play xboard with a friend

Explain how to play xboard over ics…this section will come later.

 
xboard/fow.txt · Last modified: 2011/10/14 22:03 by jsc
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki