I'm creating an effect where a bar moves back and forth across the screen, and when the user clicks a button it will stop on a particular spot.
I have the effect down but I need to give it some speed; the problem is that when I increase the speed it creates this blurring effect because its moving so fast. Is there anyway I can smooth the movement out without decreasing the speed?
setvirtualresolution(960,640)
speed as float = 0
xpos as integer
//graphic size is 4x25
crate = createsprite(loadimage("bar.jpg"))
rem A Wizard Did It!
do
print (sin(speed) * 100)
xpos = sin(speed) * 100 + 150
speed = speed + 5.0
if speed = 360
speed = 0
endif
setspriteposition(crate,xpos, 100)
print(xpos)
Sync()
loop