Compiling the Tileset
Congratulations! By now youíve drawn everything the tileset needs, made all the palettes it needs, made a mask, youíve got everything the tileset needs and all thatís left is to turn it all into a proper tileset file. Here, have this smiley as a reward!
In case you havenít guessed yet, this section will explain how to compile all your work into a working Jazz2 tileset ready to use in JCS. But before I carry on babbling, here is the final part of tileset making!

Tweaking Before Compiling
Before you actually start compiling the tileset there is something you must do first. This might sound crazy, wait, this WILL sound crazy but whether you like it or not it really is important. Before you compile your tileset you need to open up a brand new tileset image and rearrange all the tiles youíve drawn so far inside it. What does this mean? Well, open a new image, make it a grid, load your tileset palette into the image and start again, copying and pasting all the tiles from your other tileset image into the new one.

Why am I doing this? For ease of use, there is absolutely no way that any person is able to draw all the tiles for each part of the tileset together without forgetting any. At some time or another you wouldíve forgotten to draw a certain tile, had no space left to place it along with the other tiles of its kind so instead just shoved it into some random spot where you had space. It happens to everyone, but if you donít place it along with the other tiles of its kind some level maker is going to search everywhere for the tile giving him a very hard time in making the level.

This is the last thing you want, because level makers very rarely choose a custom tileset unless it is extremely high rated, and even if it is they will think twice if itís hard to use. People that already make tilesets should know that getting someone to make a level with your tileset is near impossible, it rarely happens (I would guess that about 5% of all custom tilesets made are actually used by someone else than the person that made the tileset) and the thing that people dislike the most is if the tileset is hard to use.

When arranging a tileset, you need to start with all the most commonly used tiles at the top and end with the tiles rarely used. Below is a guide you can follow that shows the different categories you would arrange the tiles in (number 1 being at the top of the tileset and number 10 at the bottom).
Note: The sub-themes mentioned are the different platform types for layer 4 e.g. in a space tileset two sub-themes would be metal platforms and rocky planet surfaces. The example list has 3 sub-themes but a tileset can have as many as it needs.

  1. Layer 4 Sub-theme 1
  2. Layer 4 Sub-theme 1 Eye Candy
  3. Layer 4 Sub-theme 2
  4. Layer 4 Sub-theme 2 Eye Candy
  5. Layer 4 Sub-theme 3
  6. Layer 4 Sub-theme 3 Eye Candy
  7. Event Tiles
  8. Foreground Layer Eye Candy
  9. Background Layer Eye Candy
  10. Layer 8 Eye Candy (Textured Background)
Arranging the tiles by layers is in my opinion the best arrangement method, when people make levels they do it one layer at a time, so all the tiles they need for that layer will be placed together. Yes, it does take a while to arrange tilesets like this, but in the end itís worth it, think of the poor level makers youíre making the tileset for.

Compiling a Tileset in JCS
Here it is, compiling a tileset. Before you can actually compile the tileset there is a small something you must do. JCS will only load tileset images out of a special directory, so make sure you place both your tileset image and its mask image inside the ĎTilesí directory inside the directory Jazz2 is installed to (Default path is ĎC:\Games\Jazz2\Tilesí). JCS also only loads 256 colour LBM, BMP, ANM or PCX files, so if youíve saved your tileset as another format make sure you rename it to one of these formats when copying it into the ĎTilesí directory (Mine has over 40mb of PCX and BMP files already ).

Set button in JCSYou are now ready to compile your tileset, open JCS and press the ĎSetÖí button in the tileset view menu to open the Tileset Organizer.

Tileset Organizer
This organizer lists all the tilesets currently inside your Jazz2 directory, but at the top of all those tilesets it also has a list of all the tilesets youíve made using JCS. The first thing you need to do when compiling a tileset is to add it to this list. To do this, press the ĎAddÖí button on top of the list of buttons on the right to open up a new window.

Select Tile Set WindowThe ĎSelect Tile Setí window is where you add all the different details about your tileset. Iíll explain each one of the boxes in a bit more detail:
Description: This is where you add the name of the tileset as it will be displayed in JCS.
Filename: The filename of the tileset in .j2t format.
Tileset: This drop-down box is where you choose the tileset image youíve made. All the files in the list are the compatible files inside the ĎTilesí directory of Jazz2.
Mask: This drop-down box is where you select the mask to use along with your tileset image. At default it is set to Ď(auto mask)í which will just use your actual tileset image as the mask. This is not recommended, you should ALWAYS make your own separate mask image to use with the tileset.
Remap tile set palette: This box has to be the most annoying feature ever placed inside a JCS. If it were up to me I would have it burned and destroyed so nobody would ever need to use it. Iíll tell you what it does; if you tick this box JCS will automatically place the Jazz2 palette inside your tileset. Thatís the good part, the bad part (quoted directly out of the JCS help file) is when:

ďÖthe colours you use in your palette will be remapped and optimized to a new palette, generated by JCS.Ē

This means that your palette will be replaced by a palette made by JCS. Itís ok if you donít have anything palette sensitive, but it could have some serious effects to things like palette events and a textured background that need exact palette entry values to be correct. If you are unable to make a palette for your tileset image, then tick this box and JCS will do it for you. However, if you made your own palette (which you should do) then DO NOT TICK THIS BOX!

Once you have entered all the details for your tileset, press ĎOKí to go back to the tileset organizer.

JCS Busy Compiling Compiling Finished
Your tileset should now be under the list of tilesets in the ĎTileset Organizerí window. Select it inside the list and press the ĎBuildí button. JCS is now busy compiling your tileset, isnít this exciting?

A new window will pop up, firstly showing a progress bar of JCS building the tileset piece by piece. It might not look complicated, but all the things itís currently busy doing is pretty incredible. When itís done it will show a small bit of info on the tileset (Number of tiles and size in kb), just press the OK button and close the tileset organizer because your tileset is finished! You can now open it in JCS and make as many different levels with it as you want; allow me to congratulate you on a job well done!

Compiling Errors
If you made the tileset while following the instructions on this website you shouldnít get any errors. However, errors during compiling are possible but are never too hard to fix, mostly these errors occur when something about the basics of tilesets isnít right. Your tileset will not have any errors if it has all the following correct:
  1. It is 320 pixels wide
  2. The height of the tileset is a multiple of 32 pixels
  3. The mask image and tileset image are the same size (in pixels)
  4. The tileset has a palette (itís a 256 colour image)
Thatís really not a lot to ask for. However, there is another error you might get which is very rare and at a first glance doesnít make any sense. It will say that you have used too many colours. Believe it or not, this error occurs with tileset images that already have a palette, and this is where a dark secret is revealed. Tilesets canít be 256 colours, but can instead only use 240, which is why Iíve mentioned before in the Palette section not to use the first row of the palette (palette entries 0-15) except for the transparency colours. The JCS help file explains this best I think, so here is the explanation quoted:

ďJCS's tile set compiler always checks your tileset to see which colours are used and which aren't. The colours that you do not use are automatically replaced with lighter and darker shades of the colours you use most frequently in your tile set. This will make your tile set look better when it is shaded in Jazz 2.Ē

So there you have it, JCS will automatically add a set of colours to your tileset it uses for the lighting special effects in the game. The lighter colours are used for that huge beam of light that follows the character when it is running, and the darker colours are used when the ambient lighting of the level is set to values below 100%. The part JCS doesnít tell you is that it NEEDS these colours and if it canít find enough empty tile spaces it will give an error during compiling. As long as you keep a few empty unused palette entries you will be fine. Personally I like to keep the top row of the tileset empty so that I donít have a space of empty tiles interfering with the space I use below the Jazz2 palette.

24-bit Tileset Nightmare
Tileset imageLADIES AND GENTLEMEN! BEHOLD THE GREATEST WONDER THE WORLD HAS EVER SEEN! It's uhhh...an arrowActual image in JCS
So youíve made a tileset using the 24-bit drawing method and everything is fine during compiling, but as soon as you open the tileset in JCS you are shocked to see that huge chunks of the tileset youíve drawn are gone! Upon closer inspection you will see that the problem is actually to do with the transparency colours, when you loaded the palette all your near-black colours have turned into black because of colour reduction which removed them from the drawing. Iíve stopped keeping count how many times this has happened to me. In fact, I would say that only two of the tilesets Iíve made using the 24-bit drawing method havenít had this bug happen.

Fixing this is easy though; just replace all these black colours with a near black colour in your palette. Palette entry 95 out of the Jazz2 palette is as close to black as youíll get (itís a very dark purple), so just replace all the black with this colour. The problem with this is that the colours look exactly the same to you, the human eye cannot see the difference between the two colours and you have no idea what parts youíve actually changed and what parts you havenít. Well, thanks to a great feature in Paint Shop Pro there is still hope for us in fixing this bug, in a matter of seconds even!

Iíll use my Corrupted Sanctuary tileset as an example for this section, itís so dark thereís bound to be an error somewhere. You can download a beta version (the latest version before I fixed the bug) of it HERE (Note: No longer available -BlurredD) so you can follow the instructions and try it out for yourself too; itís a little hard to explain with images.

Pink is such a wonderful colourFirstly, open the image in Paint Shop Pro. We need to make the black visible and easy to spot so we donít miss areas of the tileset. Edit palette entry 0 (the first entry of the tileset, pure black) to pink (255 red, 0 green, 255 blue) by going to ĎColors --> Edit PaletteÖí. Wow, what a difference! With all the black changed to pink there is absolutely no way you can miss those colours, even someone who is colour blind can see that!

Now you need to replace all the pink with the near-black colour in palette entry 95. There is a colour replacer tool in Paint Shop Pro that will do this automatically, select the tool by clicking this button (Colour Replacer) in the tool palette along the left of Paint Shop Pro.

Enlarging the size of the brushNext thing you need to do is make its brush big; and I mean really big. Open the tool options and set the size of the brush to as big as it can get, the bigger the brush the more you can replace in a single drag of the mouse.

Styles in Paint Shop Pro 7You also need to set the correct colours for the tool to use. The primary colour is the colour it will replace with and the secondary colour is the colour it will replace. Set the colours to palette entries 0 and 95 so that it will look like the styles example in the top-left.

No more pink!All that is left to do now is to use the brush on the image and see the pink magically disappear to a black that wonít be replaced by the transparency colour in JCS. At this point your tileset is ready to be compiled again, make sure you change the pink in palette entry 0 back to black when you're finished. If you donít there will be a nasty pink surprise waiting for you in JCS to remind you to change it back.

You can also double-click the brush somewhere in the image and it will automatically replace all the colours in the image. Can't ask for any easier than that.

Thatís all the info on compiling tilesets, by now you have a perfectly good working tileset. Itís hard work, but the satisfaction of knowing youíve made your very own tileset is worth it, congratulations!
Compiling the Tileset
Compiling the tileset is when you turn your tileset images into a .j2t tileset you can use in JCS
Before you actually compile a tileset, you need to make sure all the tiles in your tileset image are arranged in a way that would make it easy for the level maker to use
To compile a tileset, you need to:
  1. Place your tileset and mask image into the ĎTilesí directory
  2. Open the tileset organizer in JCS
  3. Add a new tileset in the organizer
  4. Build the tileset using the tileset organizer
There are some errors that could prevent the compiling from finishing, but most of these are just problems if the basics were wrong
One little known error actually occurs when you used over 240 colours in your tileset
The colour replacer tool in Paint Shop Pro can help you replace accidental transparency colours with a colour that wonít be removed in JCS

-=Tutorials=-
[Part 5: Making the Mask|Part 6: Compiling the Tileset|Part 7: Final Extras]