View Single Post
  #31 (permalink)  
Old 07-03-2009, 06:00 PM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Yet another version! While playing with square Sprites without transparency I found problems with fragments of the edges of Sprites being left behind. The problems were masked in the Demo because the edges of the Sprites there are mainly transparent and the displacements on each tick were only a few pixels. These are mainly solved (I hope!) but a GameWindow method is now provided to erase a Sprite from its' current position in cases where it might be necessary.

To provide more control over a Sprites' animation a Sprite now has a FrameCount property to get the number of frames in the animation and a boolean FrameForwards property to get or set the direction of animation. Previously the direction could be set by the SetFrameDirection method but could not be read back.

To allow the animation to be changed a Sprite now has LoadBitmap and LoadFile methods. The parameters for these are the same as for New2 and New3.

GameWindow now has an EraseSprite(index) method for use when manipulating a Sprite in some way might leave fragments of it visible. This might be before changing the animation to a smaller set of bitmaps or before moving a Sprite by changing its' X or Y properties.
Attached Files
File Type: zip Sprite1.26.zip (8.2 KB, 11 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 07-03-2009 at 06:03 PM.
Reply With Quote