HQX Scaling and Retro Video Game Art

A couple of years ago I became interested in methods of automatically “up-scaling” retro video game art for the high resolution screens that are everywhere these days, without generating a blurry mess. I came across the “HQX” algorithm, which is a pixel art scaling algorithm developed by Martin Stepin, and which is used in various places, including several emulators (such as NestopiaFCEUX and more). There are three hqx algorithms, corresponding to 2x, 3x and 4x scaling respectively. Code for the algorithm can be found here.

This weekend I was playing around with art from my ZX Spectrum game Crosswize, and I thought I’d share some of the results obtained by applying hq4x. The original art for the game was in typical ZX Spectrum “2 color with 8×8 pixel attributes” mode (though nicely done by Colin Grunes). What I’ve done here is first added some color shading into the low resolution art by hand and then applied the hq4x algorithm (the final result is unretouched, bar some cropping for inclusion here).

First example:

Original ZX Speccy image

Color shading added

HQ4X 4x scaled result

And another example:

Screen Shot 2014-02-09 at 8.57.36 PM

Original ZX Speccy image

Screen Shot 2014-02-09 at 8.57.43 PM

Color shading applied

Screen Shot 2014-02-09 at 9.16.52 PM

Resultant HQ4X image

I think the results are pretty remarkable! The resultant images remove any pixel stepping contained in the original low resolution image, and I think have a “retro” charm of their own. What may not be obvious here is that the original art is really tiny compared to the result – the original art is shown magnified using pixel quadrupling so you can compare the images. Also note that the “original” images are not quite the same as the colored and scaled ones due to simple laziness on my part – I just grabbed a similar part of the image because it was more convenient to do so.

Here’s an image at the original scale:


Image from ZX Speccy @ original scale

Posted by Steve Wetherill

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.