It is currently Fri Dec 15, 2017 2:51 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How did f-1 Race work?
PostPosted: Sat Apr 22, 2017 3:16 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 303
Location: Colorado USA
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?


Top
 Profile  
 
PostPosted: Sat Apr 22, 2017 3:22 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19348
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Sat Apr 22, 2017 3:41 pm 
Offline

Joined: Sun Mar 27, 2011 10:49 am
Posts: 219
Location: NYC
This page is a good reference on the technique.


Top
 Profile  
 
PostPosted: Sat Apr 22, 2017 7:45 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5898
Location: Canada
Here's some info on Rad Racer I posted a few years ago:
https://forums.nesdev.com/viewtopic.php?f=2&t=8588


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 7:39 am 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 303
Location: Colorado USA
Wait, with CHR-RAM couldn't you render 3d polygons? (With crappy frame rate)


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 7:42 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
DementedPurple wrote:
Wait, with CHR-RAM couldn't you render 3d polygons?

Yes.

Quote:
(With crappy frame rate)

Which's why nobody did it.


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 7:47 am 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 303
Location: Colorado USA
Isn't that how they did FaceBall 2000 on the GameBoy?


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 8:11 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19348
Location: NE Indiana, USA (NTSC)
And how Elite for PAL NES works.

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


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 8:19 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
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.


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 1:01 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
I understand road drawing algorithm for F-1 Race, but how exactly did Elite work?


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 1:12 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6532
Location: Seattle
Elite is actually doing 3D projection, line drawing, and hidden line removal.


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 1:29 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
lidnariq wrote:
Elite is actually doing 3D projection, line drawing, and hidden line removal.


How does it render the lines?


Top
 Profile  
 
PostPosted: Wed Apr 26, 2017 5:49 pm 
Online
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3488
Location: Indianapolis
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.


Top
 Profile  
 
PostPosted: Fri Apr 28, 2017 8:14 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.


Top
 Profile  
 
PostPosted: Fri Apr 28, 2017 10:35 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2983
Location: Tampere, Finland
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.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group