#23924 - underthesun - Sat Jul 24, 2004 8:26 am
hi, just wondering:
how do most people handle this situation:
suppose you have a sprite. the OAM registers stores the topleft edge of the sprite as the coordinate (i.e on attribute0 and attribute1), and all is fine.
you have a sprite that needs to walk off-screen, i.e gradually get (move) out of the screen, from topleft. That means the x and y value has to decrease (moving topleft) slowly, and all is fine.
The problem is, when the x and y value reaches 0, and the sprite is at the topleft. but then the actual sprite hasn't moved outside the screen yet. however, the x and y value can't decrease anymore, since it's at it's lowest limit now.
How do most people handle this kind of problem?
oh and just wondering whether multiplication (*) operations are costly, like the mod (%) and division (/) operations.. since i heard about that.
cheers
_________________
I am just a gba noob. be gentle :p
how do most people handle this situation:
suppose you have a sprite. the OAM registers stores the topleft edge of the sprite as the coordinate (i.e on attribute0 and attribute1), and all is fine.
you have a sprite that needs to walk off-screen, i.e gradually get (move) out of the screen, from topleft. That means the x and y value has to decrease (moving topleft) slowly, and all is fine.
The problem is, when the x and y value reaches 0, and the sprite is at the topleft. but then the actual sprite hasn't moved outside the screen yet. however, the x and y value can't decrease anymore, since it's at it's lowest limit now.
How do most people handle this kind of problem?
oh and just wondering whether multiplication (*) operations are costly, like the mod (%) and division (/) operations.. since i heard about that.
cheers
_________________
I am just a gba noob. be gentle :p