On MSX sprites are often used in games and demo's. In games they're really a must and in some demo's you see some pretty impressive sprites come by. Making sprites however is quite hard, as you'd have to make them with some little editor probably written in BASIC and what if you would have more colors in the sprite or even more colors on one line? This frankly is quite hard to make, because there are no good editors for that and thus people probably go to their graphic editor, make a sprite and from there of write down all colors and patterns. But if you have more than one color on a specific line, you'd have to split up the sprite in two sprites etc. etc. All in all, making a COOL looking sprite on MSX is quite hard.
These days are over. Chaos Assembler is proud to present (probably) the greatest (if not, the only) sprite mode 2 editor! With CA3 you can create beautiful sprites! More colors on one line are no problem. Copying the sprite data into Z80 data structures is NO PROBLEM. That sprite data is ready to be used in your applications!
Up to the sprite editor then. In figure 41 you see the sprite editor.
Figure 41. The sprite editor
The sprite editor also has a main menu extension in the main window of CA3, just like the image viewer has. You can find it when the sprite editor is active and it's called 'Sprite editor'...
The sprite editor is quite easy to use. The open button (folder icon) let's you open an MSX image as a sprite. It'll take the first 8*8 pixels of the image.
The save button is there to export the sprite to a bitmap image. Then there's the zoom buttons again and the palette button (see image viewer).
Sprite mode selection
You can decide to create an 8*8 or a 16*16 sprite mode using this drop down box. If you select another mode, the sprite you have at that moment will be preserved as much as possible. That means that if you switch from 16*16 mode to 8*8 mode a quarter of the sprite will be preserved and vice versa the complete sprite will be preserved.
Color selection
You can see 17 boxes at the left side of the screen. The first sixteen represent the colors on MSX. The seventeenth color (a bit green) is not actually a color. It's more a virtual color. It represents the transparency of the sprite. A sprite is build up out of pixels. And the pattern says there's a pixel, or there's not one. This color is for that. When you see this color in a sprite, it'll mean that on MSX this pixel will not be seen and thus have a transparent color.
Below those 17 boxes you see another box. This box shows the currently selected color.
To select a color, click on one of the color boxes. The current color immediately becomes this color. You can also change the intensity of a color. By clicking right, a little window will pop up in which you can change the intensity of the color, as shown in figure 42.
Figure 42. Changing intensity of a color
Here you see I've changed the fifteenth color of the palette from gray to blue using the color change dialog. The three boxes represent respectively the red, green and blue intensity of the color. By clickingleft or right on them you'll change the intensity of that index.
Making a sprite
With this knowledge, it's quite easy to make a sprite. The big green part of the window you see in figures 41 and 42 is the actual sprite. Clicking on it will change the color of the selected pixel (where the mouse floats over) to the current selected color. By clicking right on any specific pixel will result in the current index to be changed to the color that pixel has. You can put as many colors in the sprite as you like, but remember, this will also increase the sprite count the sprite would take create it on the MSX...
It's THAT simple. More about this I can't tell you...
The other tool buttons
In figure 43 you can see I made a little sprite myself.
Figure 43. A little example sprite.
Here you see I've created a sprite. I guess you'll see this sprite can't be made using one MSX sprite. By using the little button with the 'i' caption, CA3 will calculate how many sprites this on MSX will take in sprite mode 2. By looking at this sprite you see three colors (black, white and purple).
And the first thing you probably think is that this sprite will take three sprites on MSX. But this is not true. This sprite can be made using TWO MSX sprite mode 2 sprite.
As every line can have it's own color, the first sprite will contain all black pixels. The second sprite will have the second and third line filled with white, the fourth with purple, the fifth with white again, the sixth will be purple and the seventh will be white... In that way only two sprites will be necessary! And pressing the 'i' button will result in CA3 showing the sprite will take two sprites.
Using the left button will result in the complete sprite to be filled up with the current color. And the middle button is the most powerful. If you click this, CA3 will create pasteable Z80 data structures for the patterns and colors of this sprite. This code can be pasted in your source and is READY TO USE!