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.

Beginners > Deleting Sprites from memory

#22034 - JuyLe - Fri Jun 11, 2004 5:57 pm

I'm writing text in mode 4 and it's fine but it's my 1st screen, then 1 BG arrive and the the is always there.

I'd like to know if you could help me to delete sprite after they've been used (when BG is on screen)
_________________
I'm better at french, sorry !

#22040 - CATS - Fri Jun 11, 2004 10:28 pm

you can just move it off the screen so it's no longer visible (i.e. set x = 240, y = 160)

#22051 - JuyLe - Sat Jun 12, 2004 11:12 am

AH ok so I know how to do that... <_<

Thanks
_________________
I'm better at french, sorry !

#22056 - Abscissa - Sat Jun 12, 2004 5:07 pm

Or, you can set the scale/rotate flag to off, and the size double flag to on. That's a sort of obscure trick that has the effect of the sprite not being displayed.

#22092 - sgeos - Sun Jun 13, 2004 3:49 am

The GBA can only display a certain of sprites per line. Even off screen sprites count towards this limit. If you are going to move sprite off screen to hide them, set y to 160 as that puts them on a different line. Sprites disabled with scale/rotat off + size double on are not counted toward the line limited if I recall corretly. Check the gbatek for details.

-Brendan