GetDotted Domains

Viewing Thread:
"Mode 7 explained"

The "Nintendo Games" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Tue 26/06/01 at 13:44
Regular
Posts: 787
A lot of people don't know what Mode7 is and get it confused with something that can do 3D graphics etc. So here is what Mode7 actually is and how it works:

Mode 7 is nothing on GBA, cause GBA only has modes 0 to 5! But GBA does have an equivalent of SNES mode 7, which is mode 1.

Now the mode itself has nothing to do with the '3D' graphics. The '3d' graphics are caused by rotation/scaling of a background, and on the SNES mode 7 was the mode that you could do rotation/scaling in. Now famous SNES games to use mode 7 were: Super Mario Kart (for the races) and Contra 3 (for the top down levels).

On GBA you can do rotation/scaling in modes 1-5, so the term mode7 can't really apply to a particular mode, instead 'mode7' in terms of GBA has come to mean 'a rotation/scaling background' which could be in any mode (except mode zero).

Also I would like to say that rotation/scaling go hand in hand, on gba you do one with the other, they aren't two separate processes (this is because they are calculated from a pixel projection algorithm) which can both rotate images and stretch them in both the x direction and the y direction.

Also note that rotation/scaling is only 2D, meaning that in Mario kart the track you see is not a 2D plane in 3D or anything, its just a visual trick, Mario Kart is actually a top down racer.

Now lets get down to what is actually is, and what it actually does:

So how does Mario kart (also f-zero) work?
Well first you start with a basic track. This is simply a 2D image on the screen, like any other picture. Using rotation scaling you can spin it around from any point, you can also zoom in and out using scaling. Please keep in mind that this is all 2D, there is no way to rotate the 2D picture around in 3D.

Then how do they get the '3D' in fzero you ask?
Well it’s quite a cool trick. What you do is you change the scaling size after each scanline (for you dev'rs that’s in h-blank).

So the top scanline is showing the top part of the background zoomed right out. The next scanline shows the next part of the background zoomed in a bit more, and so on and so on. The result is actually nothing more than a 2D image with each scan line showing different zooms of it, but the result to the eye is that it appears to be a flat plain in 3D, with perspective.

So in F-zero when you turn left or right, this is background rotation. When you go forward and back, this is changing the centre of rotation. And scaling is used to give the perspective effect.

In actual fact mario kart and f-zero are top down racers, if you were to disable rotation/scaling you would just see the road from top down view). In fact in early stages a lot of 'mode7' racing car games are made top down until they get the physics right for collisions etc. then they add the perspective in later, because it doesn’t actually change the game, its just a display illusion (obviously though sprite positions and scaling is effected though).

Some questions people ask all the time:

Is Tony hawk mode7?
No it is not. It uses nothing to do with rotation or scaling of the background. It uses basic 2D backgrounds, with different layers, so the sprites can disappear behind some backgrounds and appear in front of others. The see through sprite is actually always there; it has a different priority so that it can be seen through the background that the normal sprite can't. The sprite is kinda 3D; a look up table of positions for the points of the 'polygons' is used. It really just draws triangles and fills them with a color (just really really fast of course :-))

Why not make more 3D games with mode7, like FPS?
Now that you know what mode 7 is, its obvious that FPS games cannot be done in Mode7, you could only achieve something like yoshi's safari on SNES. It might be possible to do a '3D' fighter in mode 7 (like the fight scenes in GoldenSun), but this is doubtful because the number of animation frames required for all the angles of the sprites would be much more than the VRAM size (though it would be possible to do the sprites like in Tony Hawk, so a 3D fighter is certainly possible, and I believe will eventually be done).
Tue 26/06/01 at 23:19
Posts: 0
The FX chip would need to be like the Fx chip put into the newer Super Famicoms.

The FX chip is just used to do the calculations for a raycasting engine this would take longer than if just raycasting by itself was used. The GBA can't do this to the extent of a FPS because of the complicated mathematics involved and calculations per second.
It can do racing games perfectly because they don't require as much detail as many calculations. They are done on a single level. As for Star fox I think it may be mixing mode 7 with polygons and at the same time using raycasting for the objects.


Doom can be done for the GBA the same way it was done for the PC version. The snes version of doom uses the fx chip but this is not really needed.
Tue 26/06/01 at 23:00
Posts: 0
If Nintendo made a game with a FX chip in, would true 3D then be possible.
Tue 26/06/01 at 22:09
Posts: 0
I know most of this through researching web sites. GBA development sites are a good reference. I know about Tony Hawks and F-zero by reading reviews.
Tue 26/06/01 at 19:38
Regular
"---SOULJACKER---"
Posts: 5,448
where's this info from... coz whereever u got it- i must read it!

Sonic
Tue 26/06/01 at 19:29
Posts: 0
You really should read this mabye you could learn something.
Tue 26/06/01 at 17:21
Posts: 0
What's ICQ?

Anyone have anymore questions regarding mode 7?
Tue 26/06/01 at 15:57
Regular
"Fishing For Reddies"
Posts: 4,986
ICQ?
Tue 26/06/01 at 15:15
Posts: 0
No, sorry.
Tue 26/06/01 at 14:51
Regular
"Fishing For Reddies"
Posts: 4,986
Rik, Do you have MSN Messenger?
Tue 26/06/01 at 14:21
Posts: 0
I'm not sure how they do FPS games on the GBA.
As the GBA is similar to the SNES I can describe how e.g Doom works (partly). I'm not sure if you can mix 2d polygons with mode 7.

Doom on SNES was done the same way as Doom on the PC, this trick called Raycasting.

"Raycasting is:

Graphics technique used in Doom where a number of rays (or lines) where drawn from the current position out to the obstacles they would encounter. The distance of the line and the surface they hit would determine what would be drawn to the screen.
If there was a 320x240 sized screen, there would be 320 rays cast out to get a sliver for each pixel of the screen."

Heres a link to a Java program that explains it better. Use the arrow keys to move about and of course read the content.
http://www.stanford.edu/~kroymann/

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Top-notch internet service
Excellent internet service and customer service. Top-notch in replying to my comments.
Duncan
Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.