#39613 - Ultima2876 - Sun Apr 10, 2005 7:52 pm
I've been messing with the Hblank interrupt for a while, and was wondering what kind of effects can be achieved using it. I can imagine the basic ones - changing the alpha blending values, perhaps shifting lines of sprites, and I've heard of using it to fake more than 128 sprites onscreen. Are there any more that you can do, and if so, could you give a brief description of how one might go about doing them?
Thanks very much.
#39614 - Kyoufu Kawa - Sun Apr 10, 2005 8:05 pm
I used it in my little jukebox test to warp the background layers around in sickening ways.
Catnip Dreams uses it to add gradient effects to some in-game window styles, one of which includes a kind of scanline effect, even. And the credits background is an HBlank gradient effect too.
#39638 - tepples - Mon Apr 11, 2005 12:25 am
Three words: Tetanus On Drugs.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#39644 - poslundc - Mon Apr 11, 2005 12:59 am
You can use the Mode 7 raster-technique to simulate perspective on scale/rot backgrounds.
You can apply sinusoids to background offsets and sprites to make stuff all wavy.
You can change the dimensions of your windows to create windows that are circular, diamond-shaped, interlaced, and other funky effects.
You can switch modes, fiddle with background settings, etc. to make the screen change behaviours partway down (eg. displaying things above and below a waterline, a horizon, etc.). Caveat: you can't turn a background on during HBlank without disrupting the display. There are ways around this, though.
Dan.
#39651 - tepples - Mon Apr 11, 2005 1:52 am
poslundc wrote: |
Caveat: you can't turn a background on during HBlank without disrupting the display. There are ways around this, though. |
This involves turning on the background a few scanlines early and then using a window to hide a few scanlines, right?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#39654 - poslundc - Mon Apr 11, 2005 2:26 am
tepples wrote: |
poslundc wrote: | Caveat: you can't turn a background on during HBlank without disrupting the display. There are ways around this, though. |
This involves turning on the background a few scanlines early and then using a window to hide a few scanlines, right? |
Possibly. Or obscuring it with another background should also work. What I did in my Mode 7 engine was have the background already on, but pointing to a dummy-map of transparent tiles. I then just switched it to point to the correct map during HBlank.
Dan.
#39675 - Ultima2876 - Mon Apr 11, 2005 9:27 am
Firstly; Tetanus on Drugs is awesome XD
THere's a lot more things you can do with it than I thought then. I haven't really looked into windows yet, but I can imagine those particular raster effects being very useful if you used windows.
I'll fiddle around some more and see what I can come up with. Thanks =P