![]() |
OChess v0.0.2
Programmer's Manual
|
In OChess, every board skins (squares and pieces) are made of 200x200 pixels tiles stored in .png images. OChess is in charge of breaking these tiles apart into individual elements.
Squares skins are .png images, with a dimension of 400x200 pixels (2 tiles next to each other). The tile starting at pixel (0,0) are for dark squares and the other one for light squares.
Pieces skins are .png images, with a dimension of 400x1200 pixels (2 columns of 6 tiles). The first column, starting at pixel (0,0) are for black pieces and the other column for the white pieces. From top, to bottom pieces are in the following order: King, Queen, Rook, Bishop, Knight, Pawn.
To create a pieces skin named myskin, create the folder tools/skin/pieces/myskin
. In this folder, place all the pieces in the .svg format with the following name convention: bb.svg
for black bishop, wk.svg
for white king, wn.svg
for white knight, bn.svg
for black knight,...
Then, run the tools/skin/generate.sh
script. This script will combine the .svg file into a single .png file located in tools/assets/pieces/myskin.png
.
Use the same approach to create boards skins.
Note: The tools/skin/generate.sh
script is meant to be used on Linux Distributions and requires Bash, ImageMagick and Inkscape.