Video -- How Toy Story's 3D was programmed

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
User avatar
Holt
Posts: 4
Joined: Sat Mar 07, 2015 6:40 pm

Video -- How Toy Story's 3D was programmed

Post by Holt »

The lead programmer for Toy Story for Mega Drive / Genesis talks about how he programmed its 3D.

Thought this might interest people here. :-)

https://www.youtube.com/watch?v=IhMMK3QLxSM
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Video -- How Toy Story's 3D was programmed

Post by tokumaru »

It's a little disappointing how he talks only about texture scaling, while raycasting is a much broader subject. I guess that the other aspects aren't as interesting as the drawing optimizations he showed, so the general retro gaming public would get bored quickly.

Anyway, I think Wolfenstein 3D also had code for scaling textures to each possible wall height, but it was generated dynamically instead of loaded from disk.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Video -- How Toy Story's 3D was programmed

Post by psycopathicteen »

I wonder if he'll make a video about the SNES game. It's probably the same thing, except with Mode-7, and I don't think the SNES does the double pixel thing, but it probably does use unrolled loops.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Video -- How Toy Story's 3D was programmed

Post by tokumaru »

From looking at screenshots it definitely looks like the SNES version uses 2-pixel columns too. Why wouldn't it? I doubt the SNES has the CPU power to process twice as many columns as the Genesis does. Every port of Doom and Wolfenstein 3D on Sega and Nintendo consoles do this too.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Video -- How Toy Story's 3D was programmed

Post by tepples »

The Genesis uses packed pixels, where a byte represents two pixels side by side. Most S-PPU background modes, on the other hand, use planar pixels. A 2-pixel column is 2 bits out of each of 2, 4, or 8 bytes. The packed mode on the S-PPU is mode 7, and pixel doubling using the scaling feature would work better than trying to actually write a pair of distinct pixels.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Video -- How Toy Story's 3D was programmed

Post by psycopathicteen »

It would be harder on the SNES because I think this game draws pixels vertically (increment by 8), and doing 2 side by side pixels would be hard.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Video -- How Toy Story's 3D was programmed

Post by tokumaru »

Regardless of whether plotting repeated pixels is faster, casting half as many rays and scaling half as many texture slices always will be.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Video -- How Toy Story's 3D was programmed

Post by psycopathicteen »

I thought about it a little more. It probably does 2 pixels wide, and it rotates the Mode-7 BG by 90 degrees.
Post Reply