The programmer created a game «Snake» on subpixels of the monitor

Published by Andrii Rusanov

Developer Patrick Gillespie created, possibly, the smallest version of the classic game “Snake.” This version uses individual subpixels of an LCD monitor.

The game launches in a web browser, and its gameplay is the same as the original “Snake”: subpixels crawl around the area and “eat” other subpixels, and the snake gets longer. As the developer says, a microscope might be needed to play it.

Usually, subpixels of three colors form all others within a pixel, and theoretically, one subpixel should be enough to reproduce one color. However, the practical side turned out to be more complicated. The complication arose with making the game display only one color in each subpixel.

Reproduction of green in sRGB

Although Gillespie programmed it, physically it did not work as expected. When only the green subpixel was supposed to be active, the red subpixel next to it was partially lit as well.

Gillespie used the Lab color space instead of sRGB and achieved the desired result. And still, playing this “Snake” is extremely difficult. The project is available on GitHub.

Source: Notebookcheck