HOW TO MAKE TWO CHARACTERS MOVE USING FAMICON CONTROLLERS WITH FAMILY BASIC
5 CLS
10 SPRITE ON
15 DEF SPRITE 0,(0,1,0,0,0)=CHR$(0)+CHR$(1)+CHR$(2)+CHR$(3)
20 DEF SPRITE 1,(0,1,0,0,0)=CHR$(32)+CHR$(33)+CHR$(34)+CHR$(35)
25 A=0:B=50:C=100
30 X=1:Y=100:Z=100
35 SPRITE A,B,C
40 SPRITE X,Y,Z
45 S=STICK(0)
50 T=STICK(1)
55 IF S=1 THEN B=B+1
60 IF S=2 THEN B=B-1
65 IF S=4 THEN C=C+1
70 IF S=8 THEN C=C-1
75 IF B>250 THEN B=B-249
80 IF B=1 THEN B=B+249
85 IF C>250 THEN C=C-249
90 IF C=1 THEN C=C+249
95 IF T=1 THEN Y=Y+1
100 IF T=2 THEN Y=Y-1
110 IF T=4 THEN Z=Z+1
115 IF T=8 THEN Z=Z-1
120 IF Y>250 THEN Y=Y-249
125 IF Y=1 THEN Y=Y+249
130 IF Z>250 THEN Z=Z-249
135 IF Z=1 THEN Z=Z+249
140 GOTO 35
RUN
5 CLS
10 SPRITE ON
15 DEF SPRITE 0,(0,1,0,0,0)=CHR$(0)+CHR$(1)+CHR$(2)+CHR$(3)
20 DEF SPRITE 1,(0,1,0,0,0)=CHR$(32)+CHR$(33)+CHR$(34)+CHR$(35)
25 A=0:B=50:C=100
30 X=1:Y=100:Z=100
35 SPRITE A,B,C
40 SPRITE X,Y,Z
45 S=STICK(0)
50 T=STICK(1)
55 IF S=1 THEN B=B+1
60 IF S=2 THEN B=B-1
65 IF S=4 THEN C=C+1
70 IF S=8 THEN C=C-1
75 IF B>250 THEN B=B-249
80 IF B=1 THEN B=B+249
85 IF C>250 THEN C=C-249
90 IF C=1 THEN C=C+249
95 IF T=1 THEN Y=Y+1
100 IF T=2 THEN Y=Y-1
110 IF T=4 THEN Z=Z+1
115 IF T=8 THEN Z=Z-1
120 IF Y>250 THEN Y=Y-249
125 IF Y=1 THEN Y=Y+249
130 IF Z>250 THEN Z=Z-249
135 IF Z=1 THEN Z=Z+249
140 GOTO 35
RUN