[comp.sys.amiga.programmer] Non-Trivial Fast & General Sprite Reuse

djh@neuromancer.metaphor.com (Dallas J. Hodgson) (05/03/91)

Aaron Hightower writes:
>I can't answer why for the person who posted the original question, but
>I first used your technique for one game, but the problem is that if you
>use one image multiple times, you HAVE to copy it.  IE since the position
>and control information is a field in the sprite data structure, you must
>have a different copy of the image for each hardware sprite that uses it -
>no sharing sprite image data between two hardware sprites.

Actually, no. Gels' VSprites reuse sprite data while forcibly overriding
each sprite's posctl information with custom copper instructions. By the way,
the gritty details of how this is accomplished ain't documented anywhere;
the RKM's and the Hardware Manual completely overlook this technique.

I've been working on a certain pet-project game for several years. It
originally started out using VSprites and Bobs; bit-by-bit all the Gels code
was replaced with hi-performance custom blit routines and copper lists.
Part of my problem was designing a new virtual sprite engine, which required
quite a bit of research before I got it right. The wonderful thing about
VSprites is that they can partially/completely scroll off the top and bottom
of a ViewPort, whereas SimpleSprites scroll up just so far then
"disappear". The bad thing is all those slow Copper create/merge calls you
have to do to make 'em work.
-- 
+----------------------------------------------------------------------------+
| Dallas J. Hodgson               |     "These days, you have to be pretty   |
| Metaphor Computer Systems       |      technical before you can even       |
| Mountain View, Ca.              |      aspire to crudeness."               | 
| USENET : djh@metaphor.com       |            - William Gibson              |
+============================================================================+
| "The views I express are my own, and not necessarily those of my employer" |
+----------------------------------------------------------------------------+