Posted October 25, 2020 by indutny
The latest release (1.3.0) of SnakeLike includes automatic highlights/shadows for the on-screen blocks.
Technical details:
My initial idea was to paint variations of each sprite with various highlights, but then I realized that it could be done automatically. The direction of light is thankfully always from top-left and doesn’t change through the game so this is as easy as detecting and recording the neighbors of the block. After that I use this palette which (subjectively) let’s me go from a color to its brighter - darker versions:
and paint the corners of the block. It is so easy yet has a profound visual effect.
Let me know what you think!