Skin Image
To make a skin file you must first create an image file. This can be a PNG file, JPG file,
GIF file or a windows BMP file with at least 24 bits color depth. PNG is the preferred format.
The skin image will contain all the square images needed to make a complete skin. The images
are placed side by side.
The size of each image can be any number of pixels, but a size around 100x100 is
reasonable for a PNG image and 50x50 for a BMP image. A larger size gives nicer graphics but
larger skin file and a smaller size doesn't look so good when enlarged. You can use any image
editor (Photoshop, PaintShop or any other) to create the skin image.
The total number of images needed depends on the following choices:
- Floor: Two images, one for plain floor and one for goal.
- Package: Two images, one for package on floor and one for package on goal.
- Sokoban: Two images, one on floor and one on goal. Can be complemented
by two sets of four images, one for each direction (up, down, left and
right) both on floor and on goal.
- Wall: One or sixteen images. One for simple walls or sixteen for connecting
walls. In the case of connecting walls one more image can be used to
cover the top of four neighboring walls (see Wall Top below).
The order of the images is not important. The Classic skin looks like this in the skin tool.
Transparency
The images can be made transparent, this is useful for the package and Sokoban images.
When a package or Sokoban passes from floor to goal and is halfway between, it looks
much nicer if the image is transparent.
Transparency is controlled by the Transparent parameter in the skin file. The
color of the bottom left pixel of the image is the color that will be transparent.
Transparency can also be used to reduce the number of images needed. If the
Sokoban image is transparent, you could use the same image for Sokoban on floor and
on goal. I choose to use separate images in the classic skin because some of the background
color will show around the edges due to antialiasing.
Wall Top
The Wall Top image is used to cover the hole that appears when four walls are placed in a
square. The left image is without Wall Top and the right is with. Wall_Top_X specifies how
much to offset the image to the right and the Wall_Top_Y gives the offset downwards.
Background Image
The background is what is shown around and outside the actual level. It can be specified with
the
Outside parameter which indicates one of the pictures in the Skin image.
A background can also be a separarate image with a different (larger) size than the pictures
in the skin image. Use the Assign External Background function to
include a background image and the Imbed External Background function
to make it imbedded in the skin file. The background should be a tiling picture.
Skin Tool
The skin file is a text file. It can be created with any text editor, but easiest is to use the
Skin Tool. Use
New or
New from Template to
create a new skin file. You can
also open an existing skin file and use
Save As to
give it a new name and then start to modify it. Now, you must assign the image you created.
Make sure you saved your image in the same folder as the skin file. Use
Assign External Skin to connect the image with the
skin file. Please note, that the skin now consists of two files, the skin file and the image file.
It is a good idea to have the image external during the design of the skin, this makes it easy to
modify the image, save it and immediately run the game and see how the skin looks.
When you are satisfied with the design of your skin you should use Imbed
External Skin to imbed the image within the skin file. Use
View Images to see the image. On top of the image window, you can see the
numbers of the individual images. Use these numbers as parameter values. Below each image is
a checkbox, check the box to make an image transparent. The size of the images is shown to the left.
The next step is to edit all the values in the skin file. Fill in the Description part with the
appropriate values. The skin section contains the values that identifies the individual images.
See the Skin Reference for a complete description of all
parameters. See also Skin File Format for an example
skin. Next use Validate Skin to make sure there are no
errors. Run the Sokoban game and select your skin to see the result of your work, just make sure
you saved the skin file in the path specified in the game options.