F-Zero Draw Distance

Vanishing Point

Mike Birken’s fascinating F-Zero True Horizons page shows what F-Zero would look like if the rendering draw distance was not limited.

In-Game Screen Shot

Vanishing Point (courtesy of Mike Birken)

Mike discusses possible reasons F-Zero limited the draw distance.  While they are good guessed, I have stumbled upon the actual reason.

Teaser:  F-Zero already renders to the maximum draw distance allowed.  In fact, it draws further.  Some of the data near the horizon is actually garbage, but is unnoticeable due to the regularity of the level graphics.

So what’s the reason?

 

Level Size

While pondering writing an F-Zero style engine in modern technology using MonoGame — which is something I wrote ages ago in 320×200 x 256-color Mode 13h (the same graphics mode that the original 1993 Doom ran on) — I thought I’d look at actual F-Zero maps.  My curiosity was to see how the designers managed to draw the track-limit circles within the restrictions of a tile-based graphics system.  My intention was to use today’s bitmapped graphics mode, where I can control individual pixels, to draw these circles perfectly.  All I need is a big texture — say, 4096×4096!

I was astonished to find out the maps were 4,000 to 6,000+ pixels in size.  Huge!  These size maps are much larger than the 1024×1024 pixel limit of SNES Mode-7 hardware.  Mode-7 is tile-based.  It can render 128×128 tiles, each 8×8 pixels in size, equaling 1024×1024 pixels.  Retro Game Mechanics Explained has a great video explaining these restrictions, “SNES Background Mode 7”.

Thus we have the true answer…

The Mode-7 1024×1024 tilemap limits the draw distance.

 

Tile-Based Graphics

F-Zero uses the same technology that Super Mario Bros. does.  SMB expands a video screen, that barely has enough video memory to draw a single screen, and makes it appear as though the world is vast.  It reuses the same video memory as the screen scrolls, updating it (loading new content at the edge of the screen) as you run.  (And you thought today’s massive world AAA games were the first to do streaming!)  Retro Game Mechanics Explained has a perfect video for explaining this “Loading Seam”.

Consider games like Pilot Wings.  It shows the entire world… yet it’s tiny.  Why?  That’s how small 1024×1024 is.  F-Zero maps get into the 4,000 and 6,000 pixel size.  But you can only “view” a 1024×1024 chunk of it, as those 128×128 tiles are changed and slide as though the camera is moving through the world.

 

Draw Distance Limitation

Using an F-Zero map (captured by Rick N. Bruns), let’s showcase a 1024×1024 section of that map, near the same location that Mike Birken shows in his F-Zero True Horizons page, Rendering section.

We’ll use “Map 3: Sand Ocean”, since it has some good artifacts to discuss:

In-Game Screen Shot (note draw distance and left/right side roads)

Overhead Analysis (with 1024×1024 overlay)

The white dot is the approximate camera location that Mike’s renders are using.

The blue square is a 1024×1024 pixel section marked off, centered on that camera location.

Since the game plays in 360 degrees, and players can spin quickly, the 1024×1024 playfield must capture in all directions.  Part of the “Loading Seam” technology is that you only need to update edges as you scroll.  This is what made Sonic the Hedgehog fast with its Blast Processing.  The same is true for F-Zero, running at 60 frames per second, using the slow SNES 3.58 MHz CPU.  You would not be able to use the entire tilemap for the forward direction (doubling the draw distance), as you would not be able to turn, because turning would require you to update half of the play field (8000 tiles) in a few frames, vs only 100 to 200 tiles per frame like F-Zero does.

 

Draw Distance Limit Artifacts

The view distance is quite limited.  If the renderer attempted to render more, it would access beyond the tilemap edge.  You will not get more of the road in the distance.  You will get whatever is on the other edge of the tilemap, which is garbage.  You do not notice since usually the background track graphics are similar (sand is sand)..

You can actually see this wrapping limitation in action!

Take a look at the in-game screenshot again:

In Game Screen Shot (notice the distant roads on the left & right)

There are two roads in the distance; one to the left and one to the right.  In the actual map, neither of these exist.  The roads are gray, but only one side is black.  Not both sides, like a true road.  The same side is black for both.

Why?

Because they are the same road; they are being rendered from the same tilemap data.  Also, the tiles are garbage tiles; this draw distance has exceeded the tilemap limit, and is accessing tiles on the other side of the tilemap.  If you’ve watched the Loading Seam video, you’ll know that these are just random tiles from another part of the map.

The programmers of F-Zero really stretched the limits of the draw distance — so far that it actually draws garbage at times, where they hope you don’t notice.

Leave a Reply