It is currently Wed Oct 18, 2017 5:11 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed Sep 13, 2017 4:00 am 
Offline
User avatar

Joined: Sat Mar 07, 2015 6:40 pm
Posts: 4
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


Top
 Profile  
 
PostPosted: Wed Sep 13, 2017 4:27 am 
Offline
User avatar

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


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 7:40 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2285
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.


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 9:20 am 
Offline
User avatar

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


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 9:37 am 
Offline

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


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 9:55 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2285
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.


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 9:59 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10054
Location: Rio de Janeiro - Brazil
Regardless of whether plotting repeated pixels is faster, casting half as many rays and scaling half as many texture slices always will be.


Top
 Profile  
 
PostPosted: Sat Sep 16, 2017 10:10 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2285
I thought about it a little more. It probably does 2 pixels wide, and it rotates the Mode-7 BG by 90 degrees.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 0 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