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 guesses, 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.


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.



I thought it may be interesting to respond to the original believed possibilities for the “false horizon” draw distance:

  • Original design = Racetracks receding into mist
    • It is possible this was part of the design.  Given the game world is flat, if there were no draw distance, then you would see the whole track in any direction you faced.  It’s probably a good idea to not reveal the entire world, but enough that you don’t feel robbed of vision.  It looks like F-Zero achieves this.  Even if it could draw further, designing such that it fades into the mist is probably a good idea.  Then again, at the low resolution of the SNES, it likely wouldn’t matter too much.
  • Evolution from scan-line road engines to bi-linear texturing mapping Mode-7
    • This is not the case, since F-Zero was explicitly a tech-demo of Mode-7, and the evolution was that it became a game.
  • Fixed-Point math accuracy issues at far distances
    • In general, it’s the close distances where the fixed-point math runs out of precision.  The more significant digits must be present for Mode-7 to work, to correctly scan 1024×1024 pixels of the 128×128 tile set of 8×8 texel tiles.
  • Aliasing graphic artifacts of 1 sample per pixel at far distances
    • Very true that this is an issue, but F-Zero seems to ignore this everywhere in the game.  Right out of the gate, it uses very poor textures for this single texel sampling method of Mode-7 (no mipmaps), such that even the power-up recharge station lines flicker, and most of the off-track graphics are a flickering mess.
  • Memory limits to store more software sprite scaling at far distance
    • The extras for small versions are negligible compared to the memory for all of the larger versions.  When you consider creating mipmaps of a texture, the first mipmap (half width, half height) is only 1/4th the size of the original. The next is 1/16th the size. Etc. Making only 1.333x the required size of just the original. Now, while software sprite scaling requires many more levels than just 50% size reduction each time, it gives a sense that the extra few very small ones is not a real concern.
  • Limiting physics to “on-screen” track
    • Certainly possible that true physics only applies to what you see, however any “statistical model” used for far away vehicles could be maintained even if they are in view (since they are far away.


Two Player F-Zero

I suggest watching: The Making Of Super Mario Kart – Wrestling With Gaming and The Story of Super Mario Kart – Gaming Historian which describes Super Mario Kart arrived on the scene with a small world of just the 1024×1024 pixel world size, due to it being the only way that a 2-Player F-Zero could be made — which means you couldn’t have large worlds, and couldn’t have fast vehicles. Thus the go-karts. Thus the visibility of characters. Thus Mario and the gang being added.

These videos don’t explain why 2-player isn’t possible in F-Zero.

It’s because the current 128×128 tile set has to contain both players’ views, which means you have to limit them to 64×64 (or 64×128 or 128×64 — but you don’t know which direction they may face, so 64 is the limit).  This means you must halve the distance before the Mode-7 starts texturing mapping into the tiles of the other view.  While F-Zero “Single Player” already texture maps beyond the correct tile limits, you can imagine how much harder it would be to handle this with half the limit.

Off hand, you can double the size of the pixels on-screen, and have a super blocky looking F-Zero, with lots of chaotic random mess in the top-left and top-right corners of the screen (as those are tiles from your opponent racing into new tiles that have nothing to do with your viewpoint — again, while F-Zero “Single Player” does the same, at least those tiles are constant and unchanging!).  So you’d have to zoom even further.


Leave a Reply