Flappy Bird game

This program is a very simple demo of a 'Flappy Bird' like game.

Screen shot

Video

10 GOSUB 2000
20 h=0
30 CLS:PRINT "Flappy Birdy"
35 PRINT "Top ",h
44 PRINT "Keys s f"
46 REFRESH
50 REPEAT
60 k=INKEY(0)
70 UNTIL k="s"
100 x=0:y=30:sc=0:coly=0:colh=0
110 FOR x=0 TO 320
120 GOSUB 600
130 GOSUB 500
140 GOSUB 200
150 SYS 20,1,60,INT(60-y)
155 PRINTAT 3,3,"SC:":PRINTAT 40,3,STR$(sc)
160 WAIT(25)
170 REFRESH
180 NEXT
190 h=score
195 GOTO 30

200 CLS
220 FOR I=0 TO 15
221 px=(0-x MOD 8)+(I*8)
223 SYS 20,3,px,56
230 rpos=(x DIV 8) + I
240 H = VAL(MID$(map,rpos,1))
245 IF I=8 THEN coly=H
250 FOR H1=1 TO H
255 spr=5
260 IF H1=H THEN spr=4
265 IF H>0 THEN SYS 20,spr,px,60-(H1*8)
266 sc=sc+1
270 NEXT
280 NEXT
290 RETURN

500 y = y - 1 
520 RETURN

600 k=INKEY(0)
620 IF k="f" THEN y=y+2
630 colh=(coly*8)+8
640 IF y60 THEN GOTO 1000
650 RETURN

1000 BEEP 3000,100
1005 h=sc
1010 GOTO 30

2000 SYS 50,1,"3E4AA9A7D453221C"
2020 SYS 50,3,"00000000FF3366CC"
2030 SYS 50,4,"FFC1FF4262426242"
2040 SYS 50,5,"6242624262426242"
2050 map="0000000000200020200005000030004050000020"
2070 RETURN

(c) 2017 PicoCreate

Terms and conditions apply, click here for further details