Home Artists Posts Import Register

Content

Welcome, everyone, to the 48th issue of Supper Mario Broth: Special Zone.

In this article, I will talk about the technical aspects of displaying snowfall effects in various Mario games over the years.


Technical Snow-How

As we approach the end of the year, snow has already begun falling in most places in the Northern Hemisphere that regularly experience snowfall, so it is a fitting time to talk about how snow is displayed in Mario games. 

In real life, snow is a complex meteorological phenomenon whereby microscopic particles in the atmosphere become nuclei for supercooled water droplets, which crystallize in beautiful ice crystals with hexagonal symmetry and then slowly float down to the ground, being blown around by the slightest breeze due to their low weight, creating a winding, almost dance-like path through the air as they descend. However, as fascinating as all of this is, for technical reasons, most video games simplify the process to the basic idea of "white dots fall down".

I will go through eight examples of snow effects being displayed in various Mario games, starting from the least complex implementations to the most complex ones.

1. Wario Land 4

Wario Land 4 does not have a snow level set outdoors, where snowfall is normally experienced. Instead, it has an odd example of indoor snowfall in an industral level called 40 Below Fridge (a name that is particularly clever as the Celsius and Fahrenheit scales intersect at -40 degrees, making this fridge have the same temperature regardless of whether the reader is using one scale or the other). While real-life large industrial freezers do have frozen particles floating through the air, depicting them as being anywhere near outdoor snowfall is of course a cartoony exaggeration.

Wario Land 4 uses an extremely simple method of displaying snow: a single layer of animated tiles. Each snow tile is a 16x16 pixel tile (consisting of 4 repeating 8x8 pixel sub-tiles) with 4 frames of animation. The Game Boy Advance has four background layers and one sprite layer; the sprites can be drawn behind any of the background layers, making them technically foreground layers. The layer used here for the snow is Background Layer 1.

Here is what that layer looks like isolated (i.e. with all other layers turned off):

You may notice that the snow is missing in some tiles. This is due to the layer being shared with other foreground elements like these walls and blocks. The tiling is very basic; instead of even attempting to spread the snow more evenly by creating special tiles e.g. depicting the snow in front of the icicles, the designers only put the snow on tiles that are otherwise completely empty and not occupied by any other elements.

In addition to that, in some cases, a tile is empty but still does not contain snow. I theorize that this was due to some parts of the level being moved around and the designers not catching the empty tiles; note that despite it being clearly visible when isolated in this manner, during actual gameplay (as in the first image), the snow barely stands out from the background and this is hardly noticeable, especially in motion (plus, consider the small screen size of the Game Boy Advance; these scenes were never designed to be viewed at the magnification with which I am displaying them).

This type of snow effect was most commonly used in NES and Game Boy titles (though none in the mainline Mario series, as no Mario platformers on those systems actually featured levels with falling snow, even the Ice Land world from Super Mario Bros. 3); I am merely using Wario Land 4 as an example as it contained the most missing tiles, a side effect of this technique that appears every time the snow is made to share a layer with anything else.

Starting with the SNES, most games started using more complex effects, such as...

2. Yoshi's Island

Here is footage from the beginning of Level 5-1 of Yoshi's Island, "BLIZZARD!!!":

Note how the snow appears shortly after Yoshi starts moving, and becomes more prominent until it covers the screen.

Here, the snow also uses only one layer, but that layer has some effects applied to it. Here is the snow layer (Background Layer 3 on the SNES), isolated:

This is a 32x32 pixel square, tiled horizontally and vertically across the screen. Although appearing much more complex than the Wario Land 4 snow, this one still only has 4 frames of animation. The secret here is that despite appearing white, each of the "lines" of snowflakes is actually colored with a different palette color. 

Older systems use palettes to color sprites. In the code, the graphics and the colors are saved separately; all the actual sprite data says is "this pixel is color 1, this one is color 2..." etc., but it is separately saved palette data that decides what colors "color 1" and "color 2" actually are in each individual scenario. This allows games to very easily reuse graphics by changing the palette, which is how Goombas in Super Mario Bros. become blue when underground or grey when in castle levels; in fact, in the Mario Bros. arcade and in many games until the 1990s, Luigi used the same graphics as Mario, only with a different palette.

So, here every line has a different palette color, but the palette assigns "white" to all of them. Why? Because on the SNES, there is another value that can be assigned to palette colors: transparency (represented as an opacity percentage, 0% being invisible and 100% being completely opaque). So what happens in the first piece of footage with the snow gradually appearing is this: the layer of snow is there from the beginning, but every line of snow has a 0% opacity value assigned to it. As Yoshi moves towards the right, one by one, the lines switch to being 50% opacity, and then 100% opacity, so that in the end, there is opaque snowfall covering the screen.

3. New Super Mario Bros.

Despite having access to the graphically higher capabilities of the Nintendo DS, New Super Mario Bros. does not attempt to do anything particularly impressive with its snow effect:

The screen is sparsely filled with snowflakes that descend slowly. On a technical level, the Nintendo DS is using three layers of snowflakes that all move in slightly different ways, but it is not using any dedicated graphical layers for it; instead the snowflakes are all just big sprites drawn on the sprite layer. Note that this doesn't mean the individual snowflakes are sprites - instead, each of the three snowflake layers is a big sprite that covers the screen by creating tiled copies of itself.

Here is the sprite layer isolated from the background. If you examine the motion of the snowflakes, you will be able to see three distinct movement patterns. Note how the largest snowflakes move the quickest and the smallest the slowest; then you will be able to see how the snowflakes are tiled by noting how all of the ones that move at the same speed are arranged in rectangular patterns.

Here is a stationary image that draws lines between some of the snowflakes that are connected by being part of the same sprite.

4. Donkey Kong Country

The Donkey Kong Country games have always been advertised as making the maximum use out of the SNES's graphical capabilities. As such, they have a more complex way of displaying snow, by actually using multiple layers.

This footage contains clips of gameplay of the "Snow Barrel Blast" level in World 4, Gorilla Glacier, where the background becomes incrementally more snowy. This is accomplished by adding snow to three layers - or, technically, making it more opaque as the layers contain snow from the beginning; the relevant tiles are just set to 0% opacity.

At first, the snow is turned on in Background Layer 2, the one that contains the trees in the middle background:

As you can see, here the tiling is finer than in Wario Land 4, with each 8x8 tile that is not being occupied by part of a tree being filled with snow. While the gaps between the trees where no snow can fit are visible if you are looking for them (particularly on the bottom of the gap between the two leftmost trees), this is done well enough so that it is nearly impossible to see during gameplay.

Then, snow is made visible on Background Layer 1, which contains the foreground tiles that the Kongs interact with (e.g. the ground they walk on):

Then, Background Layer 3, which is in the foreground from everything else, including the sprite layer, is made visible:

Note how Background Layer 3 actually uses layer movement in addition to being animated; the snow is still just a single tiled 32x32 square like in Yoshi's Island, but the entire layer is being moved left, right, up and down to simulate wind.

Finally, there is an extra effect that is added to the sprite layer itself: individual, more detailed snowflakes (each of them being their own sprite):

All of these four layers together create a very impressive snowstorm, and this is more or less the limit of what can be achieved on classic 2D hardware. Now, on to 3D depictions of snow.

5. Super Mario 64

Super Mario 64 marked the first appearance of a level with falling snow in a mainline Mario platformer, with Cool, Cool Mountain (and Snowman's Land). The snow consists of individual sprites that move around independently in 3D space:

However, despite appearing to fill the entire scene, they fill only a tiny amount of space positioned between Mario and the camera:

The snowflakes also do not follow the laws of physics: they move with the camera instead of staying wherever they are in space, and while they do move around whenever Mario moves, the motion follows its own script and has nothing to do with the snowflakes' actual position:

Note that the snowflakes move upward when Mario jumps, instead of continuing to fall. In essence, this is only slightly more realistic than drawing the snowflakes on a 2D layer that is superimposed over the screen, as they mostly act just as unrealistically and the 3D aspect is only used make some of them appear smaller due to being slightly further away from the camera, and to make them disappear when they intersect with the ground.

As Super Mario 64 has only a limited amount of objects it can load at any one time (of course, technically, so does every game - what I mean is that Super Mario 64's limit is much smaller than that of later 3D games, by orders of magnitude), and every snowflake is its own individual object, there is only a limited amount of them that can be loaded at once. The usual object limit is around 240 objects, with snowflakes occupying between 120-180 of these slots. Whenever another object must be loaded into memory, one of the snowflakes unloads.

This actually results in an implication for level design: in Cool, Cool Mountain and Snowman's Land, there are fewer coins found lying around in the open than in other courses, as each coin would reduce the amount of snowflakes that can be displayed. This is why most of the coins in Cool, Cool Mountain can be found in the indoor slide section, which has no snow, and most of the coins in Snowman's Land are found by defeating enemies, so that each coin only spawns upon defeating the enemy (and does not waste any object slots prior to that) and also so that any coins that Mario does not collect automatically despawn, as enemy-dropped coins are set to do, to not waste any slots afterwards.

6. Mario Kart 64

Mario Kart 64 uses the same basic system as Super Mario 64, but adds an interesting trick to it: in addition to the snowflakes that exist in 3D space, it adds fake ones to the background that are 2D.

This is a beginning of a race in Frappe Snowland. Note the snow beginning to fall. It is not actually possible to see a visual difference between the snowflakes falling around Mario and the ones in the background, but there is one:

The ones falling in the background are not actually present in 3D space, but instead sprites drawn onto the background graphic. They remain in the same position on the background no matter how the camera is turned. This both lets the engine not draw as many 3D objects, and allows for a correction of one particular behavior:

When a racer is going particularly fast, the game does not spawn enough snowflakes to cover the top of the screen, as the faster the camera moves, the more of them need to be spawned to create the illusion of them covering the entire track; so the game only spawns ones close to the ground (the faster the racer is driving, the closer to the ground they will be). This leaves the top of the screen free of 3D snowflakes - which is where the 2D snowflakes drawn on the background cleverly fill in the gap.

7. Paper Mario: The Thousand-Year Door

This game was the first one in the Mario franchise to use a visual effect that was later used by major entries like Super Mario Galaxy and Super Mario Odyssey: snowflakes that look like actual snowflakes instead of white dots if they get close to the camera.

Here is footage of the Fahr Outpost area. Note the snowflakes far away from the camera appearing as blurry dots, but the ones closer to the camera appearing as hexagonal ice crystals.

This is accomplished with the use of mipmaps. Mipmaps are a way to reduce processing power required to determine how high-resolution textures should appear from a large distance away, and to reduce unpleasant effects such as aliasing and Moiré patterns. This image from the Wikipedia article on mipmaps illustrates it best:

A mipmap is represented as a sequence of images, starting with the "original resolution" one, followed by 1/2 resolution (each side's pixel dimensions divided by 2), then 1/4 resolution and so on for as many steps as the game requires. Some games have mipmapping steps go all the way from 256x256 textures to 8x8 ones, though most of them have only 3 to 5 steps. The further from the camera an object is, the more successively smaller the mipmap is at which the texture is displayed. In essence, this can be summarized as "things get blurrier the further away they are".

Some games use mipmapping for other types of effects. It is possible to make the mipmaps all different colors to create a gradient that always moves with the camera:

The upper, Nintendo 64 version of Paper Mario is using mipmaps to make the floor change color the further away it is. The lower, Wii Virtual Console version automatically loads the highest-resolution mipmap regardless of distance (due to running the game at a higher resolution), ruining the trick.

Here in Paper Mario: The Thousand-Year Door, this trick is used for the snowflakes. The highest-resolution mipmap, visible only when the snowflake is really close to the camera, is this:

But all of the lower-resolution ones are just white circles with soft edges. This creates the "focus" effect where a snowflake will become "clear" if it is zoomed in and go back to white dot form if it is zoomed out:

In addition, here the snowflakes each spawn as a sprite containing 8 of them. This works due to the fixed camera angle; the parallel movement of 8 snowflakes at a time would have been very noticeable if the camera was able to be moved freely:

Note the snowflakes spawning in sets of 8 at a time. Each set spawns with a randomized direction and despawns once inside a certain area, which is why some of them appear to despawn immediately after spawning: they simply spawned with an unsuitable set of values and happened to immediately exit the active area after spawning.

8. Super Mario Galaxy

Super Mario Galaxy, being on even more advanced hardware than Paper Mario: The Thousand-Year Door, is able to draw many more snowflakes at once. It also uses the same mipmapping trick:

Now, however, every snowflake is an actual object in space that follows physics, and there are enough of them so that no tricks have to be used to spawn them between the camera and Mario; they can fill the entire playable space at once:

Of course, there are limitations to this, as well. Even though now there are thousands of them that can spawn at the same time, eventually even the Wii would run into problems if they are allowed to spawn everywhere at once. As such, the snowflakes do not spawn outside the view of the camera, and there is another system in place:

The amount of snowflakes is not being directly limited, but the space in which they can spawn is. A certain amount of space above all snow-covered surfaces is filled with invisible "snow boxes", which are the spaces in which snow will spawn. While Mario is on the ground, it is difficult to see that they do not reach very high up, but with the camera zoomed out, this is more easily noticeable (see the top left corner for the best example). If Mario jumps above the snow boxes, the snow will not move with him or spawn around him as in Super Mario 64; he will simply leave the snow area and be temporarily not surrounded by snow. 

In later games, particularly Super Mario Odyssey, the console has enough memory to be able to spawn snow particles that are:
-each individual objects,
-not limited in number, and
-not limited by where Mario is in the area,
solving all of these issues. However, of course, the next technical hurdle to overcome is simulating how snow behaves on the ground - not just footprints, but the accurate representation of snow accumulating, the ability to create physics-accurate snowballs, etc., which is a topic for another article.

I hope this article was able to be informative. Please note that I tried to keep explanations that are too technical to a minimum; if you either had trouble understanding any of them and would like a clarification, or thought it was oversimplifying and would like a more technical explanation, please let me know in the comments, and I will both rephrase the segment in the manner you request and take your feedback into account for any future articles of this kind.

Thank you very much for reading.




Comments

Anonymous

Wonderful article!! Very interesting seeing the progress of technology through the specific lens of snowflakes. I was also not aware of the special meaning of 40 Below Fridge's name. Good stuff!

Anonymous

I feel like 2D depictions of snow have a charm that 3D ones don’t. With 2D, you can recreate that "depth" effect from shifting your focus when looking at snowfall. I always liked Yoshi’s Island snowfall because of this!