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
Video -- How Toy Story's 3D was programmed
Re: Video -- How Toy Story's 3D was programmed
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.
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.
-
- Posts: 3140
- Joined: Wed May 19, 2010 6:12 pm
Re: Video -- How Toy Story's 3D was programmed
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.
Re: Video -- How Toy Story's 3D was programmed
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.
Re: Video -- How Toy Story's 3D was programmed
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.
-
- Posts: 3140
- Joined: Wed May 19, 2010 6:12 pm
Re: Video -- How Toy Story's 3D was programmed
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.
Re: Video -- How Toy Story's 3D was programmed
Regardless of whether plotting repeated pixels is faster, casting half as many rays and scaling half as many texture slices always will be.
-
- Posts: 3140
- Joined: Wed May 19, 2010 6:12 pm
Re: Video -- How Toy Story's 3D was programmed
I thought about it a little more. It probably does 2 pixels wide, and it rotates the Mode-7 BG by 90 degrees.