nesdev.com
http://forums.nesdev.com/

How did f-1 Race work?
http://forums.nesdev.com/viewtopic.php?f=2&t=15847
Page 1 of 2

Author:  DementedPurple [ Sat Apr 22, 2017 3:16 pm ]
Post subject:  How did f-1 Race work?

I'm really curious how they were able to pull of the 3d graphics in f-1 race on the NES. It's rather impressive how they did the turns on the road. How did they do it?

Author:  tepples [ Sat Apr 22, 2017 3:22 pm ]
Post subject:  Re: How did f-1 Race work?

Pole Position works by drawing the road as a triangle toward a vanishing point on the horizon, then scrolling each individual scanline of the road to warp that triangle. The road in F-1 Race is drawn the same way, as is the floor in Street Fighter II and NBA Jam. Rad Racer additionally vertically squashes and stretches parts of the triangle to simulate hills.

Author:  adam_smasher [ Sat Apr 22, 2017 3:41 pm ]
Post subject:  Re: How did f-1 Race work?

This page is a good reference on the technique.

Author:  rainwarrior [ Sat Apr 22, 2017 7:45 pm ]
Post subject:  Re: How did f-1 Race work?

Here's some info on Rad Racer I posted a few years ago:
https://forums.nesdev.com/viewtopic.php?f=2&t=8588

Author:  DementedPurple [ Wed Apr 26, 2017 7:39 am ]
Post subject:  Re: How did f-1 Race work?

Wait, with CHR-RAM couldn't you render 3d polygons? (With crappy frame rate)

Author:  tokumaru [ Wed Apr 26, 2017 7:42 am ]
Post subject:  Re: How did f-1 Race work?

DementedPurple wrote:
Wait, with CHR-RAM couldn't you render 3d polygons?

Yes.

Quote:
(With crappy frame rate)

Which's why nobody did it.

Author:  DementedPurple [ Wed Apr 26, 2017 7:47 am ]
Post subject:  Re: How did f-1 Race work?

Isn't that how they did FaceBall 2000 on the GameBoy?

Author:  tepples [ Wed Apr 26, 2017 8:11 am ]
Post subject:  Re: How did f-1 Race work?

And how Elite for PAL NES works.

But Game Boy also has a fairly long horizontal blanking period when VRAM can be written.

Author:  tokumaru [ Wed Apr 26, 2017 8:19 am ]
Post subject:  Re: How did f-1 Race work?

I don't know, but the Game Boy is better at dynamic patterns than the NES. The patterns are not in a separate bus, for one, and since the screen is smaller, less patterns are needed to cover the same percentage of screen space. The small resolution also means that there's more time every frame to manipulate patterns. Even with all these advantages, FaceBall is still annoyingly slow.

The NES just wasn't built for real-time 3D polygons, and most developers stuck with using the regular features of the system. The NES did see some attempts at real-time polygon graphics, like in Elite, but IIRC that was PAL only, only drew wireframes, and was still fairly slow.

Author:  zeroone [ Wed Apr 26, 2017 1:01 pm ]
Post subject:  Re: How did f-1 Race work?

I understand road drawing algorithm for F-1 Race, but how exactly did Elite work?

Author:  lidnariq [ Wed Apr 26, 2017 1:12 pm ]
Post subject:  Re: How did f-1 Race work?

Elite is actually doing 3D projection, line drawing, and hidden line removal.

Author:  zeroone [ Wed Apr 26, 2017 1:29 pm ]
Post subject:  Re: How did f-1 Race work?

lidnariq wrote:
Elite is actually doing 3D projection, line drawing, and hidden line removal.


How does it render the lines?

Author:  Memblers [ Wed Apr 26, 2017 5:49 pm ]
Post subject:  Re: How did f-1 Race work?

zeroone wrote:
lidnariq wrote:
Elite is actually doing 3D projection, line drawing, and hidden line removal.


How does it render the lines?


Writes them into CHR-RAM and maps them into the nametables somehow.. I still think that game is impressive as hell. I don't know how well it runs on a PAL NES, but I remember playing it on NESticle long ago and I thought the performance was just fine (though I was probably speeding up the emulated CPU or something).

One of the authors of the Elite made an NES demo with similar graphics, and he also released the source code.
http://www.iancgbell.clara.net/nestank/
I remember looking at it when I was first learning to program, and I couldn't make any sense out of it at all. Maybe I'd do a little better now but I'm still horrible at math.

Author:  zeroone [ Fri Apr 28, 2017 8:14 am ]
Post subject:  Re: How did f-1 Race work?

Memblers wrote:
Writes them into CHR-RAM and maps them into the nametables somehow.. I still think that game is impressive as hell.


Here's my guess (without doing any research; so, it might be completely wrong):

They created a frame buffer in RAM with a bit depth of 1; i.e. each byte represents 8 pixels. To display the frame buffer, they created 256 tiles, such that each row of every tile are colored per the binary representation of that tile index; meaning, the tiles look like colored vertical lines since the same colored row is repeated 8 times. Finally, during horizontal blanking (PPU dots > 255), the nametables are updated for each successive row.

Author:  thefox [ Fri Apr 28, 2017 10:35 am ]
Post subject:  Re: How did f-1 Race work?

zeroone wrote:
Here's my guess (without doing any research; so, it might be completely wrong): ...

It is.

I believe Elite draws the lines in CHR-RAM, allocates the tiles dynamically (i.e., only the tiles that have non-empty CHR data will have non-zero nametable entries), and uses palette switching to get double buffering.

Page 1 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/