gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > The sprite window

#12683 - poslundc - Sat Nov 22, 2003 4:23 pm

From the Cowbite spec, with regards to windowing:

Quote:
There is also the "obj" window, which can be thought of as another window which is defined by the visible regions of the objs on screen.


Has anyone found a purpose for this particular windowing feature? I'm not entirely clear on what it can be used for.

Dan.

#12684 - tom - Sat Nov 22, 2003 4:52 pm

it can be used to create non-rectangular windows.
those sprites that have the object attribute set aren't actually displayed.
instead, their non-transparent pixels form the object window.

i haven't used it myself so far.
i think ham comes with a (nice) example that uses the obj window.

you can also create non-rectangular windows by reprogramming the normal windows during the display period (using hdma or hblank interrupts)

#12685 - tepples - Sat Nov 22, 2003 5:31 pm

Some of the Eurasia intros use sprite windows to create drop shadows behind the text onto a mode-4 layer.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#12686 - poslundc - Sat Nov 22, 2003 5:32 pm

Interesting. Does anyone know if putting a sprite in the obj window means it consumes a different amount of the 950 pixels/scanline available than a normal sprite?

Any suggestions of cool effects this can be used to create?

[edit: any MORE suggestions, seeing as tepples' post arrived before mine? :)]

Dan.

#12687 - DekuTree64 - Sat Nov 22, 2003 7:04 pm

You could do some nifty screen transitions that wouldn't be possible with normal windows. Vertical bars would be one example, or maybe a sort of diffusion effect by randomly plotting pixels in sprites covering the whole screen. I'm sure they'll be useful for spell effects in my RPG too, maybe something like a flame-shaped window with a scrolling fire BG showing through it. Plenty of cool stuff^_^
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#12714 - Miked0801 - Mon Nov 24, 2003 8:58 am

Think spotlights around a hero character in a dungeon - perhaps animating to make the edge flicker. There are so many ways to use this...