A83: Re: Re: Optimized Movax's sprite routine


[Prev][Next][Index][Thread]

A83: Re: Re: Optimized Movax's sprite routine




About the sprite routines...
Whenever i am making a game I begin writing the sprite routine using the
generic one that Movax made.  From this I can change/add certain features to
the sprite routine to generate the correct routine for what i am doing.

for instance, if you are doing a tiled map the sprite routine is always
aligned.  You should then concentrate on optimizing that routine to make it
work with your size sprite.

if you are moving a character across a background, you might want to
implement a MASK.  This would be best optimized by doing the masking and the
displaying of the sprite simultaneously( i use this term loosely, since you
actually lay down the mask right before displaying each 8 bit section of the
sprite).

if you are working with lots of variable height sprites like I do in
Punchout, then perhaps it would work well if the first byte of each sprite
was the height in pixels of the sprite.  This is easy to implement, becuase
you just set your loop to execute that number of times.

btw, if anyone wants my "hacks", i have a ton of them... so just email me

-harper



References: