I have checked the NEWS on GLBasic but it hadnt been updated since OCT 2016
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
Type Game
Function Title_Screen:
endfunction
Function Game_Screen:
Show_Background()
Show_Spaceship()
Shoot()
endfunction
Function Exit_Screen:
Exit Window
endfunction
Endtype
global _Game[] as Game
Game_Start=false
Repeat
if Key(spacebar)
g.Title_Screen
elseif
g.Game_Screen
elseif Key(Escape)
g.Exit_Screen
endif
showscreen
UNTIL KEY(01) = 1 // ESC
Quote
Why not use a timed itteration?
FUNCTION Shoot:
// Press Spacebar to Shoot
IF KEY(57) AND press=0
DRAWSPRITE Bang,MX+265,270-SY
ENDIF
SY=SY+2
IF press>0
DEC press
SY=270 // IF Player shoot off then restart the gun at top of spaceship to shoot even more :)
ENDIF
ENDFUNCTION
FUNCTION Show_Spaceship:
DRAWSPRITE SpaceShip,250+MX,50+MY
IF KEY(203) THEN DEC MX,SPEED // LEFT
IF KEY(205) THEN INC MX,SPEED // Right
IF KEY(200) THEN DEC MY,SPEED // UP
IF KEY(208) THEN INC MY,SPEED // DOWN
// STOP SPACESHIP GOING OFF THE SCREEN
IF MX<-250 THEN MX=-250
IF MX>350 THEN MX=350
IF MY<215 THEN MY=215 // STOP SPACESHIP GOING OFF THE SCREEN AT THE BOTTOM ------ PROBLEM !!!
ENDFUNCTION