Ive just updated this simple game to use timers rather than just a loop.
Touch screen to boost the rocket upwards. Dont land too fast or it will crash!
Sub Process_Globals
End Sub
Sub Globals
Dim h,oldh,gap, thrust As Float
Dim canvas1 As Canvas
Dim Timer1 As Timer
End Sub
Sub Activity_Create(FirstTime As Boolean)
canvas1.Initialize(Activity)
If FirstTime Then
Timer1.Initialize("Timer1", 50)
End If
Timer1.Enabled = True
h=8%y
thrust=0
gap=1%y
End Sub
Sub Timer1_Tick
oldh=h
h=h+thrust
thrust=thrust+(gap/50)
canvas1.DrawLine(45%x,oldh,55%x,oldh,Colors.Black,4%Y)
canvas1.DrawLine(45%x,h,55%x,h,Colors.Yellow,4%Y)
Activity.Invalidate
If...