At the root of the resource file is the definition file. This
file tells Jin the basic information about the piece set. It is a
properties file and should contain the following
properties:
classname - This property tells Jin what kind of a resource
sits in the file. For piece sets, the value is
free.jin.board.PieceSet
id - A short string identifying the piece set. This will not
be visible to the user and must be unique between all piece sets.
name - The name of the piece set. This is the name that will
be shown to the user.
piecePainter.classname - The name of the Java class that will
draw the piece set. For regular, image based piece sets, use
free.chess.ImagePiecePainter as the value of this property.
If you wish to make a special, non image based piece set, you will need to
implement the free.chess.PiecePainter interface (look in
Jin's source code) and put the class file of your class in the resource
file (and set the piecePainter.classname property
accordingly, of course).
minJavaVersion - This is an optional property which tells Jin
the minimum required version of Java that this piece set can be used in.
For example, PNG based piece sets can't be used in Java 1.1, so if you use
PNG images for the pieces, set this property to 1.2.
free.chess.ImagePiecePainterIf you are using free.chess.ImagePiecePainter (which is
currently your only choice, besides writing your own piece painter), the
following properties must also be set in the definition file:
ext - The type, or extension, of the image files
(gif, png etc.). If this property is not
specified, it will default to gif. Also, note that Java 1.1
(the one Jin uses under windows, if a different version
isn't available, or when run with jin_ms.exe) only understands gif files,
so if you want to create a piece set to be used by everyone, you will need
to stick with gifs.
size.list - A list of space separated integers specifying the
sizes in which the piece images are available (in pixels). When the chess
board is resized, Jin will automatically pick the best available size, so
it is very important to provide as many sizes as possible.
For each size specified in size.list, a directory named as the
size must be present in the root of the resource file. Each such directory must
contain the following image files of the corresponding size:
bb.[ext] - Black Bishop.
bk.[ext] - Black King.
bn.[ext] - Black Knight.
bp.[ext] - Black Pawn.
bq.[ext] - Black Queen.
br.[ext] - Black Rook.
wb.[ext] - White Bishop.
wk.[ext] - White King.
wn.[ext] - White Knight.
wp.[ext] - White Pawn.
wq.[ext] - White Queen.
wr.[ext] - White Rook.
For an example of all of the above, unzip xboard.jar from
$JIN/resources/pieces/ and examine its structure.
If you have any questions or suggestions, email me at