Tile-Making Tutorial -------------------- Here's how to make a tile. First, tiles can only be 8 pixels wide but their height can range from 8 to 64 pixels. After you've decided what dimensions your tile is going to be, get out some graph paper and draw the tile on it, where each square is a pixel. Remember - you can only use the default colours unless you change the palette. In any case you can only use up to 16 colours (in screen 12, 9 and 7 for which this program was designed). Now redraw the tile but using the colour codes in place of the colours. So if the first row of your tile is:- | red | blue | black | black | green | red | red | dark blue| then you'd write:- | 4 | 9 | 0 | 0 | 10 | 4 | 4 | 1 | instead. Now rewrite the codes vertically in binary with the least significant bit at the top. Our example line now becomes:- _________________________________ | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | --------------------------------- Looking more like a computer's kind of language? It get's worse, we're not done yet! Now, for each binary row use CHR$ to get the character that number represents and concatenate them. Let's go that over. Considering that the least significant bit is to the left, use the CHR$ function to obtain the character that that binary number represents. Do this for each binary row and then conctenate the characters to form a string. Now we have:- _____________ | CHR$(065) | | CHR$(008) | | CHR$(134) | | CHR$(072) | ------------- Let some string variable "row$" be "CHR$(65)+CHR$(8)+CHR$(134)+CHR$(72)". Now remember way at the beginning of this tutorial we were actually dealing with ONE row of pixels of the tile? Good. Now go repeat the above process for EVERY row in your tile! ........... .............. .................. Finished? That was quick. Almost finished now. Okay now concatenate all your "row$". So now you should be doing something like "tile$=row$+row1$+row2$+row3$..." and so on. You're ready to paint! Just call the PAINT procedure as usual but enter "tile$" where you would the colour to paint with, e.g. PAINT(10, 20), tile$. Happy PAINTing! Comments, criticisims, anything - email "cag104@york.ac.uk".