Transforming Full-Colored Sprites into 1-Bit Per Pixel Sprites

The Iskra Delta Partner computer supports vector graphics and has the capability to draw green lines on a black background.

When porting a game from an 8-bit microcomputer with full colors to the Iskra Delta Partner, you have the option to manually create sprites based on color sprites. Nevertheless, there are instances where it's feasible to automatically or semi-automatically convert them. This text elaborates on one such technique.

In this project, we will be working with a sprite sheet obtained from the internet, featuring various sprites from the game of Karate. These sprites showcase several dominant colors, including both light and dark shades, such as red, black, white, gray, and two skin tones.

Our goal is to simplify the image by creating two distinct groups of colors: one for the light colors, which includes white and skin tones, and the other for the darker colors, encompassing red and black. Through a filtering process, we will selectively remove all colors except those we group into the white and black categories. As a result, we will obtain multiple images, each containing only the elements corresponding to the colors in the selected group. All other colors will be removed from these images.

Let us now commence with our transformation process.

1. Outline Sprites

The initial step involves locating the bounds of each sprite and outlining it. We achieve this by employing blob detection and subsequently determining the sprite polygon.

2. Isolating the Black Group

To proceed, we will now isolate the black color group (comprising red and black colors) as polygons and proceed to fill them.

3. Isolating the White Group

We will proceed to isolate the polygons belonging to the white color group and then outline them.

4. Merge Image and Overlays

Now, let's merge the outline and the two overlay images to create the final image.

And there you have it – the sprites are now converted. If you had a raster, you could also utilize hatch lines (patterns like 10101010) to create additional group colors. However, for the Iskra Delta Partner, we only used two groups because drawing other patterns would be too slow. Wishing you a happy converting experience!