We want to animate falling snow flakes in the Solarus game engine framework.

The main screen size is 320x240 (QVGA for those from bygone days), traditionally animated using wrapping tiles.
Let's pick up a 32x24 one, because the dimensions (width && height) of one tile must be multiple of 8 under Solarus.
Put it into motion with 24 frames so the animation can loop at 40_ms delay per frame (slow snow, persistence of vision).
We get a 18.432_kpx animation (32*24*24), tiled 10x10 on the screen as shown hereafter.
One small tile
Preferring something with less -- if not without -- patterns ?
We could generate a more evenly randomized tile and ...
we would replace patterns with a grid or ...
we should try to make one single 320x240 tile.
One big tile
This tile is 1000 times heavier (320*240*240=18432_kpx).
Too large / too tall for Solarus, which prefers the overall size of tiles sets
to be less than 2048 for compatibility reasons.
So, besides getting rid of patterns, we also need to limit pixels overweight in the process.
The good news is both those goals can be reasonably achieved by superimposing
two differently sized tiles so that they conceal each other's patterns.
Two differently sized tiles
Let's begin theoff-putting underlying theory detailed explanations with a basic layout of two same size tiles.
Each one has its own patterns, we label them
and
.
When we overlay both, we obtain a new pattern, unrandomly labeled
.
Not that good once tiled on the screen. We still see patterns.
If we do the same thing with differently sized tiles as aforementioned, we get something more interesting.
Let's just take a tile of 2 patterns
and another one of 3 patterns
:
The overlay builds a 'meta-tile' comprised of 6 new patterns which then resume their cycling.
Those 6 patterns are built upon only 5: 2 from tile #3 (
and
) plus 3 from tile #4 (
,
and
).
Arithmetically, 6=lcm(2,3) and 5=2+3 (arrest this man, he talks in maths).
We do not 'see' 3 repeating
or 2 repeating
but only one larger
.
With this second tile example, the meta-tile is 48x24 (from a 16x24 tile and a 24x24 one).
Tiny compared to 320x240 but the bigger the meta-tile, the fewer patterns.
So what would be the best ratio for our screen (smallest tiles for biggest patterns-concealing) ?
That would be scann'd and dimensioj-kalkuli is here to enumerate all the possible combinations;
among which two in particular attract attention.
Since 32 is 1/10 of the screen's width and 24, 1/10 of its height,
let 32 be the width for tile #5 and 24, the height for tile #6.
We get a 160x120 meta-tile. 1/4 of the screen. Shiny.
There is also another scheme: 40x32 + 24x40.
Unfortunately, 40*32*32+24*40*40 = 79.36_kpx when 32*40*40+40*24*24 = 74.24_kpx only !
Now is time for kahelo-animi to (slowly) generate images magically.
Compared with the first two one-tile solutions, ≈ lightest * 4 but ≈ heaviest / 250.
Totally worth it, as it prevents eye bleeding. Judge yourself.
And, voila ! solarus-vetero.tiles.png solarus-vetero.dat
Crystal bits of snowflakes all around my head and in the wind.
The scenery provides its own patterns hiding as shown below
(customary animated GIF everywhere for compatibility).
Of course, the principle is not tied to two tiles top, it would work well with way more.
Needless to say, laziness can grasp even the most motivated ...
Similar to the context-free chaos theory, this method should be quite ecumenical
and couldtheologically theoretically be applied to animations other than snow: mist, rain, swell ...
It might as well already exists, just like this ancient 'differential scrolling' was indeed a mere parallax.

The main screen size is 320x240 (QVGA for those from bygone days), traditionally animated using wrapping tiles.
Let's pick up a 32x24 one, because the dimensions (width && height) of one tile must be multiple of 8 under Solarus.
Put it into motion with 24 frames so the animation can loop at 40_ms delay per frame (slow snow, persistence of vision).
We get a 18.432_kpx animation (32*24*24), tiled 10x10 on the screen as shown hereafter.
One small tile
WxH | | | kpx | | | tiling |
32x24 | | | 18.432 | | | 10x10 |
![]() | ![]() |
Preferring something with less -- if not without -- patterns ?
We could generate a more evenly randomized tile and ...
we would replace patterns with a grid or ...
we should try to make one single 320x240 tile.
One big tile
WxH | | | kpx | | | tiling |
320x240 | | | 18432 | | | 1x1 |
![]() | ![]() |
This tile is 1000 times heavier (320*240*240=18432_kpx).
Too large / too tall for Solarus, which prefers the overall size of tiles sets
to be less than 2048 for compatibility reasons.
So, besides getting rid of patterns, we also need to limit pixels overweight in the process.
The good news is both those goals can be reasonably achieved by superimposing
two differently sized tiles so that they conceal each other's patterns.
Two differently sized tiles
WxH | | | kpx | | | tiling |
32x40+40x24 | | | 74.24 | | | 2x2 |
![]() | ![]() |
Let's begin the
Each one has its own patterns, we label them


When we overlay both, we obtain a new pattern, unrandomly labeled

1 * tile #1 | ![]() | ![]() |
1 * tile #2 | ![]() | ![]() |
overlay | ![]() | ![]() |
Not that good once tiled on the screen. We still see patterns.
Tile #1
![]() | Tile #2
![]() | Overlay
![]() |
Let's just take a tile of 2 patterns


1 * tile #3 | ![]() ![]() ![]() | ![]() |
1 * tile #4 | ![]() ![]() | ![]() |
overlay | ![]() | ![]() |
The overlay builds a 'meta-tile' comprised of 6 new patterns which then resume their cycling.
Those 6 patterns are built upon only 5: 2 from tile #3 (





Arithmetically, 6=lcm(2,3) and 5=2+3 (arrest this man, he talks in maths).
We do not 'see' 3 repeating



Tile #3
![]() | Tile #4
![]() | Overlay
![]() |
Tiny compared to 320x240 but the bigger the meta-tile, the fewer patterns.
So what would be the best ratio for our screen (smallest tiles for biggest patterns-concealing) ?
That would be scann'd and dimensioj-kalkuli is here to enumerate all the possible combinations;
among which two in particular attract attention.
| | meta-tile | | | tile set | | | W / H | | | H / W | | | |
sizes A | | | 160 | | | 1280 | | | 40 | | | 32 | | |
sizes B | | | 120 | | | 960 | | | 40 | | | 24 | | |
Since 32 is 1/10 of the screen's width and 24, 1/10 of its height,
let 32 be the width for tile #5 and 24, the height for tile #6.
We get a 160x120 meta-tile. 1/4 of the screen. Shiny.
There is also another scheme: 40x32 + 24x40.
Unfortunately, 40*32*32+24*40*40 = 79.36_kpx when 32*40*40+40*24*24 = 74.24_kpx only !
Now is time for kahelo-animi to (slowly) generate images magically.
Tile #5
![]() | Tile #6
![]() | Overlay
![]() |
Totally worth it, as it prevents eye bleeding. Judge yourself.
One small tile
![]() | Two differently sized tiles
![]() | One big tile
![]() |
Remains to be applied to Solarus:
| ![]() | My God ! It's full of stars. |
Crystal bits of snowflakes all around my head and in the wind.
The scenery provides its own patterns hiding as shown below
(customary animated GIF everywhere for compatibility).
![]() Foreground flakes Are sparse, scattered and fast. Could also be big and bright. ![]() | ![]() Background flakes Are numerous, tight and slow. Could also be tiny and dark. ![]() |
Of course, the principle is not tied to two tiles top, it would work well with way more.
Needless to say, laziness can grasp even the most motivated ...
Similar to the context-free chaos theory, this method should be quite ecumenical
and could
It might as well already exists, just like this ancient 'differential scrolling' was indeed a mere parallax.