RetroBASIC
Retrogamecoding(.org) => Examples => Topic started by: Peter on November 21, 2012, 02:25:09 PM
-
Hi,
A little bit fun with Kurbis.
if Kurbis isn't moved, he spins around the mouse cursor.
local y,rot,vel,mx,my,v,dx,dy =0,0,0,0,0,0,0,0
local angle,dist,da,p1,p2,z,x =0,0,0,0,0,0,0
p1=loadimage("kurbis/kurbis.png")
p2=loadimage("kurbis/font32x.png")
repeat
k=getkey()
cls()
mx = mousex()
my = mousey()
dx = mx-x
dy = my-y
v=v+.4
if v>=1 then
v=0
z=z+1
if z==16 then z=0 end
end
redraw()
wait (10)
until k==27
closewindow()
-
Oh, I see your font is ready for EGSL 1.6.0 ;)
-
I think you can use sync() instead of redraw(). Thus wait() after redraw() becomes unnecessary since you can manage speedness with setframetimer() ;)
(I tried with setframetimer(25))
-
wait (10) is only for reducing of CPU power.
actually is not necessary, at all.