Hi,
here is a simple NaLaa program. just move the mouse.
import "speed.lib"
import "library.lib"
set window 0,0,640,480
set redraw off
visible:
x#;y#;rot#;vel#;tx;ty;dx#;dy#;angle#;dist#;da#;kurbis;zK;vK#;xfont
pumpa = LoadBmp("bmp/pumpa.bmp",0,0)
xfont = LoadBmp("bmp/afont.bmp",16,6)
radians
while keydown(27)=0
proc ClsColor 255,255,255
tx = mousex()
ty = mousey()
dx = float(tx)-x
dy = float(ty)-y
dist = sqr(dx*dx+dy*dy)
angle = atan2(float(ty)-y,float(tx)-x)
da = angle-rot
da = atan2(sin(da),cos(da))
vel = Min(1.0, dist/100.0)
rot=rot + da*vel*0.1
x=x + cos(rot)*vel*5.0
y=y + sin(rot)*vel*5.0
proc SetBmp pumpa,int(x)-5,int(y)-5,zK
proc iText xfont,"TROLL",196,16
vK = vK + 0.2
if vK > 1.0
vK = 0.0
zK = zK +1
if zK=16 then zK=0
endif
redraw
proc SPD_HoldFrame 60
wend
function Min#(a#,b#)
if a <= b
return a
else
return b
endif
endfunc