Digby wrote:<br><br>> Alpha blending <br>> Color key transparency <br>> Rotation by any arbitrary angle <br>> Scaling <br>> Clipping to edge of screen (viewport?) <br>> Mirror, flip vertically/horizontally <br>> Z sorting (sprite has a single depth value) <br>> Image loading (bmp, jpg, png? which formats?)<br><br>Here's what I did in the Nutcracker: I wrote a really simple sprite class that does the most basic stuff that a sprite should do: Draw itself, nicely clipped to the screen area. That's all. I did use alpha blending, but that trick could easily be done in the simple sprite class I just described. I also needed 'white sprites', like when the player gets hit (for that authentic flashing effect). Added that too.<br><br>My point is: You don't want a bulky full featured sprite library. You want some code that is reusable, fast at it's core, and extendible. I would never release a sprite library with my white flash effect (since probably no one will ever use it), but still I needed it. While on the other hand, I did not need rotation and scaling. If that would have been in my sprite library, it would have made the sprite code much more complex (especially the clipping), and my executable would have been larger.<br><br>One question: Are you creating this library for yourself, or for the general public?<br><br>And one last remark: Loading PNG/GIF/Whatever is not the core business of a sprite library. The sprite library should retrieve it's data from an arbitrary buffer. A PNG/GIF/Whatever library should take care of the image loading. That way, your paralax scrolling library can benefit from the same code.<br><br>Just some ideas.<br><br>- Jacco.
Give me some good data and
I will give you the world