Re: A85: Fighter relase


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

Re: A85: Fighter relase



At 08:34 PM 11/13/97 -0500, you wrote:
>>At 02:57 PM 11/13/97 -0500, you wrote:
>>>Who had the new sprite drawer?  8x8, black and white, I would very much
>>>so like to have it.
>>>
>>>Wyrmlord
>>>egillespie@juno.com
>>
>>As announced, the sprite routine is called 'slamsprite', and is available at
>>http://www.ticalc.org/pub/85/asm/source/routines/slamsprite.asm
>
>Yah, this is my routine that I resently released.  There is a small error
>in the code, but its easy to fix.  One line that should be jr SS_EndLoop is
>jr EndLoop.  Everything else is correct, and now I have used it in a real
>game, so I'm confident it works well.
>
>-Zico Kolter

I took a look at your sprite routine and I have some optimization suggestions:

1)  Get rid of most (if not all) the call statements inside the routine.
Each one takes 19 clock cycles and a lot of these can be removed to
increase the speed.  After that and after a couple other speed
optimizations, you can claim it is fast.
2)  The mask idea is EXCELLENT!  However, the downside is, if you only have
a few foreground objects (masked) and the rest are background (unmasked)
objects.  So, if you don't mask a sprite, you waste space since every
sprite must be masked.
3)  The routine doesn't support anything other than 8x8 images, partly due
to the fact that you use an aligned sprite section in your code.  Most
games use 8x8 sprites, but not all.
4)  Uses the VIDEO_MEM buffer.  This can cause serious flicker problems in
some games.  Use the GRAPH_MEM instead and have the user copy everything at
once instead of each seperate sprite being drawn directly to the video
display, therefore avoiding any possible flicker.

Optimizations 2 and 3 can be remedied by header information on each sprite.
 Opt. 3 will require some additional coding to support any sized image.  I
recommend having two different routines in which one supports only 8x8
images (and is therefore faster) and the other supporting any sized image
(slower).


                 Thomas J. Hruska -- thruska@tir.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
         http://www.geocities.com/SiliconValley/Heights/8504
                    http://shinelight.home.ml.org


Follow-Ups: References: