This is indeed a very interesting effect! As Oerg stated above, we did get something like this done, just a lot more efficiently and in pure ASM. I ran some basic benchmarking and optimised the HBlank handler a little, and there's a lot of free time during active display.
The bottom line is: I doubt you could do this in a Sonic hack or something, but it should be fine when you don't need to do many processing intensive things. Should work fine for most games out there. It's just a matter of optimising it, and knowing your game engine.
Axelay scroll proof of concept
Moderator: Mask of Destiny
-
- Interested
- Posts: 35
- Joined: Tue Sep 06, 2011 2:16 am
- Location: /dev/sa0
- Contact:
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Think of the vscroll as a means of skipping lines. If the source image is 512 tall, and you set the vscroll for each line so that you skip every other line, you are scaling the image to 256 tall. Now vary that scale at the top and bottom of the frame for perspective to make it look like the image is rounded instead of a flat shrink.
Set the top scroll to skip more lines, which shrinks the image more making it look further away. Gradually shrink the image less as you approach the middle to make it look like it's coming closer. Hold that across the middle, then shrink more as you move toward the bottom of the screen to make it look like it's further away. That gives a rounded or horizontal cylinder look to the image. Then offset all the scales to make it look like the cylinder is rotating.
Set the top scroll to skip more lines, which shrinks the image more making it look further away. Gradually shrink the image less as you approach the middle to make it look like it's coming closer. Hold that across the middle, then shrink more as you move toward the bottom of the screen to make it look like it's further away. That gives a rounded or horizontal cylinder look to the image. Then offset all the scales to make it look like the cylinder is rotating.