This short 8K routine shows how to put graphics in motion. It displays a flying bird, seen best if viewed from a distance. To change the bird’s speed, change the PAUSE statements (lines 45 and 55). If you delete 45 and 55, it resembles a bat.
This listing is printed on CAI’s 40-column printer in regular mode. For a full review of the printer, see page 20.–AZ
0005 REM FLYING BIRD
0010 LET A=10
0020 LET B=11
0030 REM USE SHIFTED GRAPHIC "T" AND "Y" FOR BIRD
0040 PRINT AT A,B;" ▞▚ "
0045 PAUSE 15
0050 PRINT AT A,B;" ▚▞ "
0055 PAUSE 15
0060 PRINT AT A,B;" "
0070 LET C=INT (RND*2+1)
0080 LET D=INT (RND*2+1)
0090 IF C=1 THEN LET A=A+1
0100 IF D=1 THEN LET B=B+1
0110 IF C=2 THEN LET A=A-1
0120 IF D=2 THEN LET B=B-1
0130 GOTO 40
SYNTACTIC SUM: 19143, 8K
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.