I put together a shake animation where the screen rumbles and the picture sort of fades, but it is really slow. If it were faster then it would look pretty good, but it is much too slow at the moment. How could I make it faster? Here's the code:
+ Code Snippetsync on : sync rate 60
dx = screen width()/2 : dy = screen height()/2 :cls rgb(192,192,192)
disable escapekey : while escapekey()=0
if upkey()=1 and dy > 0 then dy = dy - 1
if downkey()=1 and dy < screen height()-1 then dy = dy + 1
if leftkey()=1 and dx > 0 then dx = dx - 1
if rightkey()=1 and dx < screen width()-1 then dx = dx + 1
if spacekey()=1 then
for y=1 to 10
if y=1 then get image 1,0,0,640,480
for x=1 to 100000
ink rgb(192,192,192),0
dot rnd(screen width()), rnd(screen height())
next x
delete image 1
get image 1,0,0,640,480
wait 100
cls rgb(192,192,192)
g#=rnd(2)
if g#=1 then m#=-1
if g#=2 then m#=1
paste image 1,rnd(10)*m#,rnd(10)*m#,
sync
if y=10 then cls rgb(192,192,192)
next y
dot dx,dy,rgb(255,255,255) : sync : dot dx,dy,0
endwhile : end