Hi.. =]
Sync on : sync rate 0
Load bitmap "1.jpg",1
Get image 1,0,0,50,50
Set current bitmap 0
Sprite 1,270,400,1
offset sprite 1, sprite width(1)/2,0
While Escapekey()=0
MoveSprite()
sync
Endwhile
Function Movesprite()
If Upkey()=1
Move Sprite 1,2
Endif
If Downkey()=1
Move Sprite 1,-2
Endif
if rightKey()=1
rotate sprite 1, wrapValue(sprite angle(1)+1)
endif
if leftKey()=1
rotate sprite 1, wrapValue(sprite angle(1)-1)
endif
Endfunction
Using sync inside the functions is not good.. because
if you have more than one function in the loop, it is gonna
slow down drastically..
"Sync" command is used to update the screen.. if you have nothing
different to show or anything that can be updated, so you
most not to update the screen (sync)..
If you can't understand any of the commands I used there,
just ask again, ok?
good luck..
The worst foe lies within the self..