Issue with spriteslice? (Sample Programs)

by Jim ⌂ @, Russell, KY, Thursday, October 17, 2013, 02:37 (1316 days ago) @ UglyMike


Your problem is that you are redrawing the background over top of the sprites. The sprite code tries to optimize and only draw the sprites ABOVE the one being moved/shown.

If you change your code to

spritedim 3
# take a red splice
color red
rect 0,0,300,300
spriteslice 0,50,50,100,100
# take a blue splice
color blue
rect 0,0,300,300
spriteslice 1,75,25,25,100
# take a yellow splice
color yellow
rect 0,0,300,300
spriteslice 2,25,75,100,25
#make the canvas green
color green
rect 0,0,300,300
while 1=1
print "Input a spritenumber (0,1, or 2)"
input a
spriteplace a,150,150
spriteshow a
end while

The issues go away.


Complete thread:

 RSS Feed of thread

powered by my little forum