How did they program 3d rendering for golf games?

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

ldsviking
Posts: 3
Joined: Mon Feb 25, 2008 5:03 pm
Location: Utah

How did they program 3d rendering for golf games?

Post by ldsviking »

Hello everyone, I was wondering if anyone could shed some light on how graphics were rendered and displayed for golf games on the NES and 8-bit computers, or games with similar graphic rendering. I'm talking about the scenes that take a few seconds to display, as the golf course is rendered from the player's perspective, and you can see the screen slowly filling with grass, trees, water, etc. Are the principles used to create these scenes the same as those used for modern 3d graphics, hindered only by using a slow 8-bit processor? If it was done a different way, how did they do it?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

I seem to remember some adventure games for the Apple II using 2D vector graphics for their static scenes. They too used slowly filling shapes.

So let me see if I can rephrase your question: These 8-bit golf games appear to use vector graphics. Are they stored in 2D, with a fixed set of perspectives, or in full 3D?

Can you give a title so that someone can possibly analyze the graphics engine?
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

Jack Nicklaus Golf is one that renders the graphics from a perspective like that, I didn't care much for how slow it is but I thought it was still pretty impressive.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Black box testing involves testing the behavior of a program solely by providing input and interpreting the output. It differs from white box testing, which involves analysis of the program code itself. Here's the outline of a black box experiment to try in Nicklaus:
  • Save the state, then take a shot. Save a screenshot of stroke 2 setup.
  • Load the saved state, line up the next shot slightly differently but the same distance, then take another shot.
  • Load the saved state, line up a shot at a slightly shorter distance, then take it.
  • Paste links to the screenshots here.
If the perspective changes appropriately, then it's some sort of 3D rendering. If they're all the same, it's 2D vector rendering with a static scene based on the rough distance from the pin.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Jack Nicklaus golf uses soft renderer with CHR-RAM. It does some tricks to make you think that the game window is larger than it is. On screen it is 176*128 pixels, but top of the window is always the same and constructed from just a few tiles (four rows), and also there is a trick at bottom part of the window (two rows displayed as four, through doubling scanlines). So there is just 176*80 window, which is 220 tiles total. Not that special.
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

It is not a true perspective rendering. Altering the angle and even distance slightly produce identical results. Rendering appears to be based on a grid system. By that I mean that the image only changes when you reach the next grid location.

My guess is it does use some form of perspective rendering, otherwise why would it take so long to render the display?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

qbradq wrote:My guess is it does use some form of perspective rendering, otherwise why would it take so long to render the display?
Because rasterization of even a 2D vector scene takes a long time on a 1.8 MHz 6502 CPU with a slow bus to the PPU. (Remember Videomation?) The scene at each grid point might be static.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

You can transfer ~270 bytes (roughly, could be less actually) to CHR-RAM per frame. 220 tiles *16 is 3520 bytes - you need 13 frames just for transfer. You may need even more time to do actual render, because it is more complex than just transfer series of bytes, and there is the trick with doubling scanlines on the screen. Also, I don't know if it has additional RAM, because without it you can only have a small buffer in normal RAM, it makes render more difficult.

On top of this, there is no reason to expect code in this game to be state of art. It maybe just written to do job just somehow.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Nicklaus does not use extra RAM. It uses Konami's clone of UNROM with that weird rotated chip, as seen in its entry on NesCartDB.
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

Wow, I didn't pick up on the fact that it had no work RAM. That's kinda impressive really :D
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

tepples wrote:Konami's clone of UNROM with that weird rotated chip
These boards are great for making devcarts, because there's plenty of space to solder a 32-pin EPROM/Flash in place of the 28-pin mask ROM. With normal UNROM boards this expansion can be tricky sometimes.
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

Greg Norman's Golf Power seems to be the most graphically advanced of the bunch. It renders the scene very quickly, and even small changes in position are rendered acurately and with perspective. It's quite impressive really.

Here's an animated GIF of three different positions on the tee, each just a few pixels appart. Note, I don't know if this will show up for everyone. Let me know.

View image
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

Greg Norman's does not use actual raster buffer in CHR RAM, at least not one with all the points addressable. It uses tile fill, and few first tiles in CHR are always fills. It uses less than half of one CHR bank to render background, just 112 tiles. The game does have both CHR RAM and WRAM, though, so my guess is that it renders frame into RAM, and then constructs nametable+needed tiles replacing repeating ones with 'fills'. Don't know how they were able to fit into 112 tiles all the time, though, maybe they drop some details if there is not enough room for all the unique tiles of a frame.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Try to use imgur.com for image hosting, it's much nicer than Google pages attachments.
Image


The golf game vaguely reminded me of "Plain Jump" for the TI83, except this was more like Mario Kart mode 7 than simple horizontal line drawing.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
qbradq
Posts: 972
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq »

There's a reason I use Goolge Pages for everything :P

I am just blown away with how well the golf view is rendered in this game. It's not something I would have ever attempted on the NES :D
Post Reply