It is currently Fri Feb 23, 2018 3:54 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: overlapping parallax
PostPosted: Sun Dec 03, 2017 4:32 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2540
I've been thinking about trying to make the Panorama Cotton effect, but in order to pull that off, I need to figure out the Donkey Kong Country 2 parallax effect, but in order to pull that off, I would need to know how to vertically block parts of the BG layer, with another part of the same BG layer.

Is this typically done with a byte for every scanline, and fill the layers over each other, or is there a faster way to do this that isn't too complicated?


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Sun Dec 03, 2017 8:37 pm 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 613
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
All comes down to changing vertical scroll value every line to a new position on the tilemap according to what is the current line being drawn. All sorts of displacement, masking, windowing and scaling effects are done that way.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Sun Dec 03, 2017 9:10 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2540
I was just wondering what sort of algorithms were used to decide which scan lines get blocked off by what. Do they just write over the "HDMA table" when drawing something in front, or is there a way to figure out what layers are partially cutoff before hand before making the scroll table?


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 7:28 am 
Offline
User avatar

Joined: Mon Jan 23, 2006 7:47 am
Posts: 85
psycopathicteen wrote:
the Panorama Cotton effect

I've looked at YT videos... but what exactly do you mean?

psycopathicteen wrote:
the Donkey Kong Country 2 parallax effect

This?

psycopathicteen wrote:
vertically block parts of the BG layer, with another part of the same BG layer

?
Depending on the system, you just write a different horizontal scrolling value for the BG in each line via HDMA / interrupts / timed code.
For this effect you change the vertical scrolling value.

It might help to look at the VRAM (e.g. in BizHawk) while playing the game.


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 8:18 am 
Offline

Joined: Mon Mar 30, 2015 10:14 am
Posts: 230
The rtype effect is only a vscroll effect ??


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 8:32 am 
Offline
User avatar

Joined: Mon Jan 23, 2006 7:47 am
Posts: 85
Yeah I think so, at least as far as the hardware is concerned. Of course you have to find the right values for each line, too.


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 9:44 am 
Offline

Joined: Mon Mar 30, 2015 10:14 am
Posts: 230
Ok,I thought it was a little bit complex to be done with only vscroll .


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 12:47 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10300
Location: Rio de Janeiro - Brazil
TOUKO wrote:
The rtype effect is only a vscroll effect ??

There's clearly some shading going on too.


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 1:09 pm 
Offline

Joined: Mon Mar 30, 2015 10:14 am
Posts: 230
You're right, it's so discreet, i didn't notice.


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 7:13 pm 
Offline
User avatar

Joined: Sun Dec 12, 2010 10:27 pm
Posts: 303
Location: Hong Kong
I think it's just done like the colony stages in Metamor Jupiter of the PCE. The shading part could be just palette change (I remember in Metamor Jupiter only colour 0 was changed, but probably the whole subpalette was updated for each "face" in that SFC R-Type game) or maybe transparency effects?


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 7:52 pm 
Offline
User avatar

Joined: Tue Apr 05, 2016 5:25 pm
Posts: 182
The shading effect in R-Type III most likely used the color window + HDMA to adjust the fixed color (used by the color window). That's the power of color math: you can change a whole bunch of colors at once without having to strain the CPU in doing so (or spread palette uploads over multiple scanline interrupts for a single change across multiple colors).

If you look at a lot of 16-bit era games you'll find that per-scanline adjustments form the backbone of a lot of different effects. It's probably one of my favorite aesthetics.

As far as deciding what values to use, you'll probably want to compute the ranges to use before you do anything else, to avoid unnecessary processing.

_________________
SNES NTSC 2/1/3 1CHIP | serial number UN318588627


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 8:23 pm 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3211
Location: Nacogdoches, Texas
HihiDanni wrote:
The shading effect in R-Type III most likely used the color window + HDMA to adjust the fixed color (used by the color window).

Playing the stage in BSNES debugger, I can verify that it's doing this. It's actually using Mode 7 so it doesn't need to calculate what lines to drop. It's unfortunate that it isn't also shrinking the pillar F-Zero style since they were dealing with Mode 7, as the 3D effect would then be more convincing, but this would mitigate the saved CPU time by using Mode 7 for this in the first place. The bigger question to me, is how the game is calculating the collision for this: https://www.youtube.com/watch?v=djW3WTE ... 285#t=3m5s I mean, granted, it slows down through almost the whole segment.

R-Type III has a lot of cool visual gags. The stage 1 intro is probably the most cinematic thing in an SNES game:

Image

Gilbert wrote:
I think it's just done like the colony stages in Metamor Jupiter of the PCE.

That's honestly ugly af. :|


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 9:43 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2540
To do collision, they would have to convert the orientation with X=ax+by+c and Y=dx+ey+f. I need to think about how to calculate a, b, c, d, e and f.

I see DMA overload at 9:20. I don't see that happen in too many games.

Quote:
As far as deciding what values to use, you'll probably want to compute the ranges to use before you do anything else, to avoid unnecessary processing.


...and that is the tricky part. I think I need to get something done right now so I'll try a quick "copy coordinates 224 times in a row and see how much speed it takes up.


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Mon Dec 04, 2017 10:40 pm 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3211
Location: Nacogdoches, Texas
psycopathicteen wrote:
I see DMA overload at 9:20. I don't see that happen in too many games.

I don't think I've actually ever seen that happen in an SNES game before, including this one. Using the hyper wave beam over the standard charge shot (the only two ways you're able to kill it with the original R-Type force pod) in that scenario is kind of stupid though, (what is likely generating the DMA overload) as you have to make sure you don't shoot the eyeballs and it still takes longer to kill it anyway.

About hardware pushing, I think this game probably has the worst sprite-per-line dropout in an SNES game and possibly any "16bit" game (different video, same game) https://www.youtube.com/watch?v=ExfYd_1D5Ww#t=19m25s

That's the area that the SNES and Genesis really get murdered relative to arcade machines from the time. :|


Top
 Profile  
 
 Post subject: Re: overlapping parallax
PostPosted: Tue Dec 05, 2017 1:36 am 
Offline

Joined: Mon Mar 30, 2015 10:14 am
Posts: 230
Gilbert wrote:
I think it's just done like the colony stages in Metamor Jupiter of the PCE. The shading part could be just palette change (I remember in Metamor Jupiter only colour 0 was changed, but probably the whole subpalette was updated for each "face" in that SFC R-Type game) or maybe transparency effects?


Yes in metamor the technique used and palette swap was obvious,but the rtype wrapping effect is more impressive and mainly less common for me .

Quote:
If you look at a lot of 16-bit era games you'll find that per-scanline adjustments form the backbone of a lot of different effects. It's probably one of my favorite aesthetics.

i agree .

Quote:
About hardware pushing, I think this game probably has the worst sprite-per-line dropout in an SNES game and possibly any "16bit" game (different video, same game)

I remember the lava boss in axelay, there is many sprites dropout in this part,even if the part herself is beautiful .
We can thanks the two size limit in the same frame, is really a pain to maximise sprites on screen with that,it's more obvious when you know the snes has the best sprite pixels/scanline limit in H32 .


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

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