--- title: "Renegade Robot" type: "article" slug: "renegade-robot" url: "http://localhost/article/renegade-robot/" markdown_url: "http://localhost/article/renegade-robot.md" published_at: "2020-10-27T17:08:42+00:00" modified_at: "2026-06-21T23:36:37+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "The top-secret building where you work is guarded by a robot. One day you arrive at work and find the robot missing. Puzzled, you enter the building and immediately sense that something has gone wrong. Strange noises are coming from a distant corridor. You investigate and discover that it's the sound of the robot, twirling…" category: - name: "Family Computing" slug: "family-computing" taxonomy: "category" url: "http://localhost/category/periodicals/family-computing/" post_tag: - name: "1984" slug: "year-1984" taxonomy: "post_tag" url: "http://localhost/tag/year-1984/" - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Joey Latimer" slug: "joey-latimer" taxonomy: "indiv" url: "http://localhost/indiv/joey-latimer/" publication: "Family Computing" publication_r: id: 10131 title: "Family Computing" type: "periodical" url: "http://localhost/periodical/family-computing/" authors: "Joey Latimer" authors_r: - name: "Joey Latimer" slug: "joey-latimer" taxonomy: "indiv" url: "http://localhost/indiv/joey-latimer/" volume: "2" issue: "8" issues_articles: - id: 61426 title: "Family Computing (v2 n8)" type: "issue" url: "http://localhost/issue/family-computing-v2-n8/" pages: "74-83" pubdate: "August 1984" archive_link: false volumeissue: "v2n8" --- # Renegade Robot The top-secret building where you work is guarded by a robot. One day you arrive at work and find the robot missing. Puzzled, you enter the building and immediately sense that something has gone wrong. Strange noises are coming from a distant corridor. You investigate and discover that it’s the sound of the robot, twirling around in circles and crashing into walls. “Its wires must have snapped!” you think to yourself. “It’s gone completely berserk!” The instant the robot senses your presence it starts coming after you, red eyes flashing madly. Your only hope is to reach the center of the building and turn off the power switch that controls the robot before it catches you. It won’t be easy: The robot is smart and knows not only the floor plan by heart, but also why you’re heading toward the building’s center. You’d better get started; time is running out. You can thwart the Renegade Robot with either your joystick (plug it into port # 1 ) or your keyboard. Press the following keys to move: “U” (up left): “I” (up center): “O” (up right): “J” (left): “L” (right); “M” (down left); comma (down center); and period (down right). Elapsed time is recorded on the screen: the highest score will be displayed. ## Source Code ``` 10 SLOW 20 PRINT AT 4,2;"HERE ARE YOUR CONTROL KEYS:" 30 PRINT AT 6,13;"U I 0" 40 PRINT AT 7,13;"J L" 50 PRINT AT 8,13;"N M ." 60 PRINT AT 10,2;"PRESS TO CONTINUE." 70 LET K$=INKEYS 80 IF KSOCHRS 118 THEN GOTO 70 90 CLS 100 FAST 110 LET SC=PEEK 16396+256*PEEK 16397+1 120 LET S=1000 130 LET HR=13 140 LET HC=15 150 LET F=0 160 LET HS=0 170 LET P1=1 180 LET P2=1 190 LET J=0 200 LET D$="6,25,3,10,21 ,6,12,19,8,14,17,11,10,21 ,14,6,25,17,3,9,4,11,17,4,6,9,8,11,14,8,8,11,12,8,11,19,6,9,23,11,14,23,3,9,27,11,17,27," 210 PRINT AT 9,15;CHR$ 136 220 PRINT AT 9,16;CHR$ 136 230 FOR X=1 TO 16 240 GOSUB 1000 250 LET A=VAL N$ 260 GOSUB 1000 270 LET B=VAL N$ 280 GOSUB 1000 290 LET C=VAL N$ 300 FOR Y=A TO B 310 IF X<=6 THEN PRINT AT C,Y;CHR$ 128 320 IF X>6 THEN PRINT AT Y,C;CHR$ 128 330 NEXT Y 340 NEXT X 350 LET H1=INT(RND*20) 360 LET H2=INT(RND*3)+28*(RND>0.5) 370 SLOW 380 PRINT AT 21,14;S;" " 390 LET S=S-1 400 LET JS=INKEY$ 410 IF JSO"" THEN LET J=C0DE J$ 420 LET R0=H1+(J=27 OR J=50 OR J=51)-CJ=46 OR J=52 OR J=58) 430 LET C0=H2+(J=27 OR J=49 OR J=52)-(J=47 OR J=51 OR J=58) 440 LET RO=RO-(RO>20)+(RO<0) 450 LET CO=CO-(CO>31)+(CO<0) 460 IF PEEK(SC+R0*33+C0)O128 THEN GOTO 500 470 LET R0=H1 480 LET C0=H2 490 GOTO 550 500 PRINT AT H1,H2;CHR$ 0 510 PRINT AT R0,C0;CHR$ 23 520 LET H1=R0 530 LET H2=CO 540 IF R0=9 AND (C0=15 OR C0=16) THEN GOTO 740 550 LET RA=HR+(R0>HR)-(R0HC)-(CO20)+(RA<0) 580 LET CA=CA-(CA>31)+(CA<0) 590 LET CH=PEEK(SC+CA+33*RA) 600 IF CH0128 AND CH<>136 THEN GOTO 680 610 LET RA=HR 620 LET CA=HC 630 LET D=2*INT(RND*2)-1 640 IF F THEN LET RA=HR+D 650 IF NOT F THEN LET CA=HC+D 650 IF NOT F THEN LET CA=HC+D 660 LET F=NOT F 670 GOTO 580 680 PRINT AT HR,HC;CHR$ 0 690 PRINT AT RA,CA;CHR$ 134 700 LET HR=RA 710 LET HC=CA 720 IF C0=CA AND RO=RA THEN GOTO 820 730 GOTO 380 740 CLS 750 IF S>HS THEN LET HS=S 760 FOR T=1 TO 50 770 PRINT "YOU DID IT. "; 780 NEXT T 790 CLS 800 PRINT "YOUR SCORE IS ";S;"." 810 GOTO 840 820 CLS 830 PRINT "SORRY, YOU WERE CAUGHT." 840 PRINT "THE HIGH SCORE IS ";HS;"." 850 PRINT "PRESS TO PLAY AGAIN." 860 LET K$=INKEY$ 870 IF KSOCHRS 118 THEN GOTO 860 880 GOTO 90 1000 IF D$(P1)="," THEN GOTO 1030 1010 LET P1=P1+1 1020 GOTO 1000 1030 LET N$=DS(P2 TO P1-1) 1040 LET P1=P1+1 1050 LET P2=P1 1060 RETURN ```