Make your own free website on
Mr.Potato (Version 1.0)

(This is important, please read this)

The "Mr.Potato" applet is supplied FREE of charge for use on personal homepages where the "personal" site does not
          a) Contain adult material.
          b) Promote any form of racism.
          c) Promote extreme political or religious views.
          d) Can be generally considered offensive.
If you are in any doubt whatsoever as to whether or not this does or might disqualify your site, either DO NOT use the applet, or e-mail me at, asking for permission to use it along with a description of your web site (in English), why you are unsure if you meet the conditions of use, and the URL(s) for your site.
Commercial sites should ask for, and recieve, written permission from me BEFORE using this applet. I do not make any sort of charge for the use of this applet whether commercial or otherwise, but I do reserve the right to refuse permission to certain types of commercial site.
In addition, I do not accept liability for anything whatsoever arising directly or indirectly from the use or download of this applet or any of its associated files. This applet and its associated files are provided free of charge and are supplied on an "as is" basis. No kind of warranty or guarantee is supplied or implied.
Modifications must not be made in any way whatsoever to either or both of the class files.
Distribution of the zip file or any of the applet components is not allowed without written consent from me.
All images supplied in the unmodified zip file, were created by me and can therefore be freely used in accordance with the conditions previously stated.

If you decide to use the applet, I would appreciate notification. I might add a "links" section later. Also a link back to me would be nice, although this is not a condition or requirement of using the applet.
The page to use for links (and the base page for all games applets) is
You can contact me at



Parameter Value Description
ImgWidth nn The width for the main image(s).
ImgHeight nn The height for the main image(s).
BgColor "#rrggbb" The background color.
PickFrameColor "#rrggbb" The color used for the "over item" frame.
PickSpotColor "#rrggbb" The color used for the "item selected" spot.
ButtonTitle "title text" The text to be used for the "Reset" button. This allows easy conversion to another language.
PartsPath "pathname/" An optional path to be used to locate all "piece" images (This MUST end with a forward slash).
Imagen "Display Name,
Add a primary image. "n" can be between 1 and 10. Image1 MUST be defined, and this is the image which is used when the game is started. Additional images are added until the next number in the sequence is not found or you have added 10 images.

Display Name - The name to show in the list.
path/image.fil - The image file (and path) to add to the game.

* If more than one primary image is defined, the list-box is automatically added to the applet window.
Piecen "Qty,
X Position,
Y Position,
Add a game piece. A maximum of 300 pieces can be used.

Qty - The number of copies of this piece.
Image.gif - The name of the image file
X Position - The starting X coordinate for this piece.
Y Position - The starting Y coordinate for this piece.
Orientation - (Optional) The starting orientation for this piece (0-3).
Width - (Optional) Set the width for this piece.
Height - (Optional) Set the height for this piece.
ShowPositions true When set to true, the position and orientation for pieces is shown in the top right hand panel.
This is mainly intended to help in setting the correct starting locations/orientation for pieces placed on the primary image.
The display shows,

X Position, Y Position, Orientation

USING Mr.Potato

Copying the class files
You need to copy the two class files "MrPotato.class" and "MrPotatoPiece.class" to the same directory as your web page. These files must be transfered in binary mode and must be named exactly as shown (take care with upper/lower case characters).

Creaing themes
You can create your own themes, by choosing or making your own picture(s) for Image1...n and creating your own pieces. This can be absolutely anything you like. For example, you could create a "dress the doll" type game by using boy/girl pictures for Image1 and Image2 and then creating various clothes for Piece1 - Piecen.
You could use a landscape picture with a river and add boats and fish, planes, houses, people, sun, moon. You could and so on...
You can use your own picture and allow people to "modify your face" (this is much cheaper than plastic surgery). You are only limited by your own imagination.

A plea for help from you
As you have probably noticed by now, I am not an artist. If there is anyone out there who is interested in creating "theme sets", free of charge for free download, I would be grateful if you would contact me. I would give you full credit if they are made available from my site, or just point people at your site, or maybe both. Anyway, let me know. The important thing is that you have the rights to freely distribute all of the images that you use in your "theme set" and that you agree to them being made available free of charge.

Making pieces
To achieve good control over different shaped pieces, you should create pieces as transparent GIF images. You should also think about the size of the image files that you create. Large images increase the time needed to load the game. Often you can get away with making smaller pieces and "stretching" them to a larger size in the game using the last two parameters in the "Piecen" definition.
The more pieces that you use, the slower the game will be when moving pieces around because of the amount of image updating that is occuring in the background.
As mentioned before, all of the images were made by me (some with the aid of a camera), but you are free to use any of these if you want to.

Writing the HTML code
The multi-parameter definitions (Imagen and Piecen) do not like spaces between the parameters ie;
    value="1,fred.gif,  90, 90"
    value="1,steve.gif,100, 90"
will not work. I might do something about this later.
Most parameters and parameter names are case sensitive, take care to write these correctly.
Although you do not have to specify images or pieces in the correct order, processing will stop when a gap in the numbering is found ie;
    <param name=Piece1      value="1,a.gif,10,10">
    <param name=Piece3      value="1,b.gif,20,10">
    <param name=Piece4      value="1,c.gif,30,10">
    <param name=Piece2      value="1,d.gif,40,10">
    <param name=Piece6      value="1,e.gif,50,10">
    <param name=Piece7      value="1,f.gif,60,10">
will add pieces 1,2,3 & 4 even though they are not defined in sequence. Pieces 6 & 7 will not be added because "Piece5" is missing (ie; processing of the pieces stops when "Piece5" is not found).
Pieces are processed in numerical order, this means that pieces with higher numbers will be painted after pieces with lower numbers and will therefore appear on top. You should remember this when designing themes. For example, if you were to use the following,
    <param name=Piece1      value="1,hat.gif,40,10">
    <param name=Piece2      value="1,hair.gif,50,10">
Then the "hair.gif" image would always be always be displayed over the top of the "hat.gif" image.
Pathnames should use forward slashes as a path seperator (dir1/dir2/ for compatibility.
The "PartsPath" parameter is intended to save you writing the full path for each "Piece" that you add, if you use this, you MUST terminate it with '/'.
To make it easier to create starting positions for all or some of the pieces, you can switch on the "ShowPositions" options when designing the game. It is better if you turn this off for the final version of the game.
You can also check out the examples provided with this zip file for more ideas and help.

If you do use the "Mr.Potato" applet, I would appreciate it if you let me know. I like to see how people have used my work and I might make a links page at some point.

Mr.Potato's homepage is

Send e-mail to

Enjoy the game,