Home » Archimedes archive » Acorn User » AU 1995-02.adf » !StarInfo_StarInfo » Fields/MouseRace

Fields/MouseRace

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1995-02.adf » !StarInfo_StarInfo
Filename: Fields/MouseRace
Read OK:
File size: 0501 bytes
Load address: 0000
Exec address: 0000
File contents
   10 MODE 15
   20 MODE 12
   30 OFF
   40:
   50 ON ERROR MODE MODE:PRINT REPORT$ " at line ";ERL:END
   60:
   70*CHANNELVOICE 1 9
   80 MOUSE ON
   90 red_stripe%=1
  100 white_stripe%=0
  110 white_count%=4
  120 off%=0
  130 speed_count%=500
  140 dest%=RND(1280)-640
  150 speed%=4
  160 time%=TIME
  170 crashes%=0
  180 REPEAT
  190 PROCplot_road
  200 red_stripe%=1-red_stripe%
  210 white_count%-=1
  220 IF white_count%=0 THEN white_count%=4:white_stripe%=7-white_stripe%
  230 IF off%>dest% THEN off%-=speed%
  240 IF off%<dest% THEN off%+=speed%
  250 IF off%>dest%-speed% AND off%<dest%+speed% THEN dest%=RND(1280)-640
  260 speed_count%-=1
  270 IF speed_count%=0 THEN speed_count%=500:speed%=speed%+4
  280 MOUSE X,Y,B
  290 IF POINT(X,Y)=2 THEN crashes%+=1:VDU7
  310 IF TIME-time%>50*60 THEN PROCend
  320 IF crashes%>100 THEN PROCgame_over
  330 WAIT
  340 VDU11
  350 UNTIL 0
  360:
  370 DEF PROCplot_road
  380 GCOL 0,2
  390 RECTANGLEFILL 0,992,off%+490,32
  400 RECTANGLEFILL 790+off%,992,1280,32
  410 GCOL 0 TINT 0
  420 RECTANGLEFILL off%+490,992,300,32
  430 GCOL 0,red_stripe%
  440 RECTANGLEFILL off%+490,992,32,32
  450 RECTANGLEFILL (790+off%)-32,992,32,32
  460 GCOL 0,white_stripe%
  470 RECTANGLEFILL (off%+490+150)-16,992,32,32
  480 GCOL 0,2
  490 IF RND(100)>90 CIRCLEFILL RND(1280),992,25
  500 ENDPROC
  510:
  520 DEF PROCend
  530 VDU 30
  540 PRINT "You completed the race with "+STR$crashes%+" crashes"
  550*CHANNELVOICE 1 1
  560 END
  570 ENDPROC
  580:
  590 DEF PROCgame_over
  600 VDU 30
  610 PRINT "You've crashed so many times you're mouse is dead."
  620*CHANNELVOICE 1 1
  630 END
  640 ENDPROC

	 � 15
	 � 12
 �
(:
2! � � � �:� �$ " at line ";�:�
<:
F*CHANNELVOICE 1 9
P	 ȗ �
Z red_stripe%=1
d white_stripe%=0
n white_count%=4
x off%=0
� speed_count%=500
� dest%=�(1280)-640
�
 speed%=4
� time%=�
� crashes%=0
� �
� �plot_road
� red_stripe%=1-red_stripe%
� white_count%-=1
�D � white_count%=0 � white_count%=4:white_stripe%=7-white_stripe%
�  � off%>dest% � off%-=speed%
�  � off%<dest% � off%+=speed%
�@ � off%>dest%-speed% � off%<dest%+speed% � dest%=�(1280)-640
 speed_count%-=1
8 � speed_count%=0 � speed_count%=500:speed%=speed%+4

 ȗ X,Y,B
" � �X,Y)=2 � crashes%+=1:�7
6 � �-time%>50*60 � �end
@  � crashes%>100 � �game_over
J Ȗ
T �11
^ � 0
h:
r � �plot_road
|
 � 0,2
� ȓȐ 0,992,off%+490,32
� ȓȐ 790+off%,992,1280,32
�
 � 0 Ȝ 0
� ȓȐ off%+490,992,300,32
� � 0,red_stripe%
� ȓȐ off%+490,992,32,32
�! ȓȐ (790+off%)-32,992,32,32
� � 0,white_stripe%
�% ȓȐ (off%+490+150)-16,992,32,32
�
 � 0,2
�$ � �(100)>90 ȏȐ �(1280),992,25
� �
�:
 � �end
	 � 30
: � "You completed the race with "+�crashes%+" crashes"
&*CHANNELVOICE 1 1
0 �
: �
D:
N � �game_over
X	 � 30
b; � "You've crashed so many times you're mouse is dead."
l*CHANNELVOICE 1 1
v �
� �
�
00000000  0d 00 0a 09 20 eb 20 31  35 0d 00 14 09 20 eb 20  |.... . 15.... . |
00000010  31 32 0d 00 1e 06 20 87  0d 00 28 05 3a 0d 00 32  |12.... ...(.:..2|
00000020  21 20 ee 20 85 20 eb 20  eb 3a f1 20 f6 24 20 22  |! . . . .:. .$ "|
00000030  20 61 74 20 6c 69 6e 65  20 22 3b 9e 3a e0 0d 00  | at line ";.:...|
00000040  3c 05 3a 0d 00 46 15 2a  43 48 41 4e 4e 45 4c 56  |<.:..F.*CHANNELV|
00000050  4f 49 43 45 20 31 20 39  0d 00 50 09 20 c8 97 20  |OICE 1 9..P. .. |
00000060  ee 0d 00 5a 12 20 72 65  64 5f 73 74 72 69 70 65  |...Z. red_stripe|
00000070  25 3d 31 0d 00 64 14 20  77 68 69 74 65 5f 73 74  |%=1..d. white_st|
00000080  72 69 70 65 25 3d 30 0d  00 6e 13 20 77 68 69 74  |ripe%=0..n. whit|
00000090  65 5f 63 6f 75 6e 74 25  3d 34 0d 00 78 0b 20 6f  |e_count%=4..x. o|
000000a0  66 66 25 3d 30 0d 00 82  15 20 73 70 65 65 64 5f  |ff%=0.... speed_|
000000b0  63 6f 75 6e 74 25 3d 35  30 30 0d 00 8c 16 20 64  |count%=500.... d|
000000c0  65 73 74 25 3d b3 28 31  32 38 30 29 2d 36 34 30  |est%=.(1280)-640|
000000d0  0d 00 96 0d 20 73 70 65  65 64 25 3d 34 0d 00 a0  |.... speed%=4...|
000000e0  0c 20 74 69 6d 65 25 3d  91 0d 00 aa 0f 20 63 72  |. time%=..... cr|
000000f0  61 73 68 65 73 25 3d 30  0d 00 b4 06 20 f5 0d 00  |ashes%=0.... ...|
00000100  be 0f 20 f2 70 6c 6f 74  5f 72 6f 61 64 0d 00 c8  |.. .plot_road...|
00000110  1e 20 72 65 64 5f 73 74  72 69 70 65 25 3d 31 2d  |. red_stripe%=1-|
00000120  72 65 64 5f 73 74 72 69  70 65 25 0d 00 d2 14 20  |red_stripe%.... |
00000130  77 68 69 74 65 5f 63 6f  75 6e 74 25 2d 3d 31 0d  |white_count%-=1.|
00000140  00 dc 44 20 e7 20 77 68  69 74 65 5f 63 6f 75 6e  |..D . white_coun|
00000150  74 25 3d 30 20 8c 20 77  68 69 74 65 5f 63 6f 75  |t%=0 . white_cou|
00000160  6e 74 25 3d 34 3a 77 68  69 74 65 5f 73 74 72 69  |nt%=4:white_stri|
00000170  70 65 25 3d 37 2d 77 68  69 74 65 5f 73 74 72 69  |pe%=7-white_stri|
00000180  70 65 25 0d 00 e6 20 20  e7 20 6f 66 66 25 3e 64  |pe%...  . off%>d|
00000190  65 73 74 25 20 8c 20 6f  66 66 25 2d 3d 73 70 65  |est% . off%-=spe|
000001a0  65 64 25 0d 00 f0 20 20  e7 20 6f 66 66 25 3c 64  |ed%...  . off%<d|
000001b0  65 73 74 25 20 8c 20 6f  66 66 25 2b 3d 73 70 65  |est% . off%+=spe|
000001c0  65 64 25 0d 00 fa 40 20  e7 20 6f 66 66 25 3e 64  |ed%...@ . off%>d|
000001d0  65 73 74 25 2d 73 70 65  65 64 25 20 80 20 6f 66  |est%-speed% . of|
000001e0  66 25 3c 64 65 73 74 25  2b 73 70 65 65 64 25 20  |f%<dest%+speed% |
000001f0  8c 20 64 65 73 74 25 3d  b3 28 31 32 38 30 29 2d  |. dest%=.(1280)-|
00000200  36 34 30 0d 01 04 14 20  73 70 65 65 64 5f 63 6f  |640.... speed_co|
00000210  75 6e 74 25 2d 3d 31 0d  01 0e 38 20 e7 20 73 70  |unt%-=1...8 . sp|
00000220  65 65 64 5f 63 6f 75 6e  74 25 3d 30 20 8c 20 73  |eed_count%=0 . s|
00000230  70 65 65 64 5f 63 6f 75  6e 74 25 3d 35 30 30 3a  |peed_count%=500:|
00000240  73 70 65 65 64 25 3d 73  70 65 65 64 25 2b 34 0d  |speed%=speed%+4.|
00000250  01 18 0d 20 c8 97 20 58  2c 59 2c 42 0d 01 22 1f  |... .. X,Y,B..".|
00000260  20 e7 20 b0 58 2c 59 29  3d 32 20 8c 20 63 72 61  | . .X,Y)=2 . cra|
00000270  73 68 65 73 25 2b 3d 31  3a ef 37 0d 01 36 1b 20  |shes%+=1:.7..6. |
00000280  e7 20 91 2d 74 69 6d 65  25 3e 35 30 2a 36 30 20  |. .-time%>50*60 |
00000290  8c 20 f2 65 6e 64 0d 01  40 20 20 e7 20 63 72 61  |. .end..@  . cra|
000002a0  73 68 65 73 25 3e 31 30  30 20 8c 20 f2 67 61 6d  |shes%>100 . .gam|
000002b0  65 5f 6f 76 65 72 0d 01  4a 07 20 c8 96 0d 01 54  |e_over..J. ....T|
000002c0  08 20 ef 31 31 0d 01 5e  08 20 fd 20 30 0d 01 68  |. .11..^. . 0..h|
000002d0  05 3a 0d 01 72 11 20 dd  20 f2 70 6c 6f 74 5f 72  |.:..r. . .plot_r|
000002e0  6f 61 64 0d 01 7c 0a 20  e6 20 30 2c 32 0d 01 86  |oad..|. . 0,2...|
000002f0  1b 20 c8 93 c8 90 20 30  2c 39 39 32 2c 6f 66 66  |. .... 0,992,off|
00000300  25 2b 34 39 30 2c 33 32  0d 01 90 1e 20 c8 93 c8  |%+490,32.... ...|
00000310  90 20 37 39 30 2b 6f 66  66 25 2c 39 39 32 2c 31  |. 790+off%,992,1|
00000320  32 38 30 2c 33 32 0d 01  9a 0d 20 e6 20 30 20 c8  |280,32.... . 0 .|
00000330  9c 20 30 0d 01 a4 1d 20  c8 93 c8 90 20 6f 66 66  |. 0.... .... off|
00000340  25 2b 34 39 30 2c 39 39  32 2c 33 30 30 2c 33 32  |%+490,992,300,32|
00000350  0d 01 ae 14 20 e6 20 30  2c 72 65 64 5f 73 74 72  |.... . 0,red_str|
00000360  69 70 65 25 0d 01 b8 1c  20 c8 93 c8 90 20 6f 66  |ipe%.... .... of|
00000370  66 25 2b 34 39 30 2c 39  39 32 2c 33 32 2c 33 32  |f%+490,992,32,32|
00000380  0d 01 c2 21 20 c8 93 c8  90 20 28 37 39 30 2b 6f  |...! .... (790+o|
00000390  66 66 25 29 2d 33 32 2c  39 39 32 2c 33 32 2c 33  |ff%)-32,992,32,3|
000003a0  32 0d 01 cc 16 20 e6 20  30 2c 77 68 69 74 65 5f  |2.... . 0,white_|
000003b0  73 74 72 69 70 65 25 0d  01 d6 25 20 c8 93 c8 90  |stripe%...% ....|
000003c0  20 28 6f 66 66 25 2b 34  39 30 2b 31 35 30 29 2d  | (off%+490+150)-|
000003d0  31 36 2c 39 39 32 2c 33  32 2c 33 32 0d 01 e0 0a  |16,992,32,32....|
000003e0  20 e6 20 30 2c 32 0d 01  ea 24 20 e7 20 b3 28 31  | . 0,2...$ . .(1|
000003f0  30 30 29 3e 39 30 20 c8  8f c8 90 20 b3 28 31 32  |00)>90 .... .(12|
00000400  38 30 29 2c 39 39 32 2c  32 35 0d 01 f4 06 20 e1  |80),992,25.... .|
00000410  0d 01 fe 05 3a 0d 02 08  0b 20 dd 20 f2 65 6e 64  |....:.... . .end|
00000420  0d 02 12 09 20 ef 20 33  30 0d 02 1c 3a 20 f1 20  |.... . 30...: . |
00000430  22 59 6f 75 20 63 6f 6d  70 6c 65 74 65 64 20 74  |"You completed t|
00000440  68 65 20 72 61 63 65 20  77 69 74 68 20 22 2b c3  |he race with "+.|
00000450  63 72 61 73 68 65 73 25  2b 22 20 63 72 61 73 68  |crashes%+" crash|
00000460  65 73 22 0d 02 26 15 2a  43 48 41 4e 4e 45 4c 56  |es"..&.*CHANNELV|
00000470  4f 49 43 45 20 31 20 31  0d 02 30 06 20 e0 0d 02  |OICE 1 1..0. ...|
00000480  3a 06 20 e1 0d 02 44 05  3a 0d 02 4e 11 20 dd 20  |:. ...D.:..N. . |
00000490  f2 67 61 6d 65 5f 6f 76  65 72 0d 02 58 09 20 ef  |.game_over..X. .|
000004a0  20 33 30 0d 02 62 3b 20  f1 20 22 59 6f 75 27 76  | 30..b; . "You'v|
000004b0  65 20 63 72 61 73 68 65  64 20 73 6f 20 6d 61 6e  |e crashed so man|
000004c0  79 20 74 69 6d 65 73 20  79 6f 75 27 72 65 20 6d  |y times you're m|
000004d0  6f 75 73 65 20 69 73 20  64 65 61 64 2e 22 0d 02  |ouse is dead."..|
000004e0  6c 15 2a 43 48 41 4e 4e  45 4c 56 4f 49 43 45 20  |l.*CHANNELVOICE |
000004f0  31 20 31 0d 02 76 06 20  e0 0d 02 80 06 20 e1 0d  |1 1..v. ..... ..|
00000500  ff                                                |.|
00000501