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.

Graphics > OAM non-RS sprites

#2563 - peebrain - Thu Feb 06, 2003 5:55 pm

What's the point of the normal sprites (non-RS ones)? I mean, can't you just flip them h/v using the scale registers? Or is that slower? For example, have the RS0 = normal, RS1 = fliph, RS2 = flipv, RS3 = fliph+v, then you get RS4-RS31 for other effects. Why would anyone NOT use the RS for a sprite?

~Sean

#2566 - col - Thu Feb 06, 2003 6:36 pm

there are 128 available hardware sprites

there are only 32 slots for unique rotate/scale settings.

rotate/scale sprites use more hardware resources to display!

rotate/scale can look pretty rough - if you're using small sprites, you're best to create a new graphic for each direction you want it to face.

Rotate/scale will obviously rotate/scale any highlights/shadow in your graphic design which can totally mess things up...

Rotate/scale is great to have in the hardware, and for some things - eg - mode7 backgrounds - it is the only way, but for most normal game issues you should look for a standard sprites solution and save your r/s slots and your hardware rendering time for when its the only way.

cheers

col.

#2567 - FluBBa - Fri Feb 07, 2003 8:52 am

The horizontal flip doesn't work correctly in RS mode.
if you set the H-delta to -1 instead of 1, it will read an empty pixel before the real graphics and thus shifting the sprite and missing the last pixel.
And they eat more resources too.
_________________
I probably suck, my not is a programmer.

#2578 - peebrain - Fri Feb 07, 2003 5:14 pm

"rotate/scale sprites use more hardware resources to display!"

Does anyone have some stats to back that up? I've heard people say it but I haven't heard any "you can display X sprites without RS, Y sprites with RS".

"rotate/scale can look pretty rough - if you're using small sprites, you're best to create a new graphic for each direction you want it to face.

Rotate/scale will obviously rotate/scale any highlights/shadow in your graphic design which can totally mess things up... "

I'm not sure if you understand... if I don't want to rotate/scale something (which would be most sprites), I just set the RS field to 0, which in the RS array slot 0 I'll have pa = 0x0100, pb = 0, pc = 0, pd = 0x0100. So it'll technically rotate/scale it, but it should display it as normal.

The missing left pixel sounds like a good reason though. What a gip.

~Sean

#2579 - tepples - Fri Feb 07, 2003 5:41 pm

peebrain wrote:
Does anyone have some stats to back that up? I've heard people say it but I haven't heard any "you can display X sprites without RS, Y sprites with RS".

According to the documentation of the dead no$gba emulator, you can display about 1210 pixels worth of sprites on a scanline, or 954 if you allow writes to OAM during hblank. A rotated or scaled sprite takes slightly more than three times as much PPU power to draw as a normal sprite.

Quote:
if I don't want to rotate/scale something (which would be most sprites), I just set the RS field to 0, which in the RS array slot 0 I'll have pa = 0x0100, pb = 0, pc = 0, pd = 0x0100. So it'll technically rotate/scale it, but it should display it as normal.

Which is not efficient in PPU time.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.