; Strengths Const Gravity = 1 Const Thrust = 3 ; Ship position Local X Local Y ; Ship image handle Local Image ; Initial X coordinate (middle of screen width) X = 320 ; Initial Y coordinate (bottom of screen) Y = 480 Graphics 640 , 480 Image = LoadImage ( "Ship Pre Final.PNG" ) MidHandle Image ; Now drawing to the invisible screen SetBuffer BackBuffer () Repeat ; Space is being held down If KeyDown ( 57 ) ; Space ; Lift off! Y = Y - Thrust End If ; Gravity is always in effect Y = Y + Gravity ; Prevent ship from falling through the bottom If Y > 480 Then Y = 480 ; Display the ship DrawImage Image , X , Y ; Flip the invisible with the visible screen Flip ; Clear the invisible screen Cls Until KeyHit ( 1 ) ; Escape ; Manual cleanup (not required) FreeImage Image End