Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Does anyone know of any good examples of 3D being faked in 2D (not necessarily code, but games I could look up)? The player has the perspective that they are going 'into' the screen and things are coming out at them. At the moment, I'm simply scaling the 2D enemies to give the illusion that they're coming closer, but it still feels quite flat. Are there any tips on how to give it more of a 3D illusion without actually using a 3D engine?

Edit: Just came across the term 'Mode7' and this video which shows pretty much what I'm trying to figure out. (especially the games at 0:13 and 1:03). What's a good way of implementing something like this?

share|improve this question
1  
Many computer games prior to the mid 90s "faked" 3d, and pretty much all console games prior to the fifth generation era (Playstation/N64) did. It might help to clarify what you're doing now with a screenshot or something... –  thedaian Sep 21 '11 at 2:38
1  
I've updated the post with a video I just found. –  XSL Sep 21 '11 at 2:44
1  
All 3D in computer games is faked 3D. None of that stuff really exists! (I mean this in the sense that any 'faking' of 3D in a game is just a relative of what you are thinking is 'real'. Mode7 is just a middle ground between them. Same basic math.) –  DampeS8N Sep 22 '11 at 17:40

5 Answers 5

up vote 12 down vote accepted

One of my favorite classic arcade games also happened to do fake 3D: Space Harrier

In that video you can see a few tricks they used, but one of the most effective visual effects is so seamless that you might not even notice it happening: when the player (or importantly the camera) moves, they use parallax to give objects in the scene a feeling of depth.

That is, closer objects move side to side faster than distant objects. The classic example of parallax is looking out the window of a moving car: nearby stuff like street signs whip by in a blur, trees further away move more slowly, while distant things like mountains barely appear to be moving.

In addition, objects don't scale linearly as they get closer. That is, objects only scale a little while far away and scale up faster when close; scaling linearly would be if they scale up at the same rate the entire time. You say you're already scaling your objects as they get closer, but you may be scaling them linearly and that looks flat.

ADDITION: Afterburner is another classic arcade game that used a lot of the same graphics tricks.

share|improve this answer
1  
Shadows are also very key parts of making things 'appear to be' 3D. Depending on the game style this may or may not be that easy to do, can your character cast a shadow on the ground or is your ship large enough to cast a shadow on a planet? This is the general concept behind bump or normal mapping. (Not suggesting that be done, just as a high end example) Shadow of your character going over the tree slightly in the background but not the hill way off in the distance just might add an edge you are looking for. –  James Sep 21 '11 at 22:03

Most of these games use the famous "Mode 7" tricks. It is just a rotozoom. This operation was done by coprocessor on console so it was very fast on these hardwares. Real 3d operations were too costly. But with actual hardware, it is easier to simulate with real 3D.

A rotozoom is a rotation and a zoom on a sprite. Look this explanation or this SDL implementation.

Search on google "MODE-7 floormap" to find samples and code.

F-Zero Mode 7 was one of the first game to use it on snes.

share|improve this answer

I found a fantastic review of these techniques, with examples and explanations, several years back. Your question prompted me to search for it again: Lou's Pseudo 3d Page. He used to have a working Outrun engine but removed it for some reason (the Wayback Machine if your friend here)

To further answer your question, here is a list of the games from his page:

  • Street Fighter II (arcade) (the "raster effects" on the dojo floor)
  • Outrun (arcade)
  • Space Harrier (arcade)
  • Super Hang-on (arcade)
  • Enduro (Atari 2600)
  • Pole Position (arcade, Atari 2600)
  • Road Rash (3DO)
  • Power Drift (arcade)
  • Racin' Force (arcade)
  • Hydra (arcade)
  • Outrunners (arcade)
  • Turbo (arcade)
  • Spy Hunter II (arcade)
  • Pitstop II (Commodore 64)
  • Enduro Racer (arcade)
  • Lotus (Commodore Amiga)
  • Test Drive II (Commodore Amiga?)
  • Speed Buggy

Again, not my list—all credit should go to Louis Gorenfeld for his awesome research.

share|improve this answer

All 3d games are fake 3d :P I'm joking, I know what you mean by 'fake 3d'..

Well, the 8/16bit has several examples of a very common technique of presenting the background in layers moving with different velocities, to mimic parallax. It was also very common to see.. actually, it's easier to just look at any racing game made for those consoles than explaining, which I believe is what you're trying to do.

I'm seeing some new stuff in the same spirit coming up in the flash scenario. Take a look at Missile Game 3d.

I don't know what path you're willing to take to achieve this effect, but it seems you're suggesting that you have started some programming and have access to graphics (an API, maybe?). So it's just a matter of finding the right parameters for movement across the screen and scale as a function of time. I don't think you're going to find specific equations for that, as it'll probably be highly dependent on your game's specific situation (the usual speed, racing, airplanes, tunnels etc) The trial and error you're already doing is your best bet, for finding the functions scale and trajectory on the screen in relation to time.

share|improve this answer
    
+1 for describing the effects so well. –  Randolf Richardson Sep 21 '11 at 8:54

Jazz Jackrabbit and the old Sonic games had those Bonus Worlds that were pseudo 3d.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.