--- title: "Laser Cannon" type: "article" slug: "laser-cannon" url: "http://localhost/article/laser-cannon/" markdown_url: "http://localhost/article/laser-cannon.md" published_at: "2020-10-27T17:09:15+00:00" modified_at: "2026-06-21T23:36:52+00:00" featured_image: url: "http://localhost/wp-content/uploads/2020/10/laser-cannon-1024x654-1.jpeg" excerpt: "A fleet of 20 \"X” ships is attacking you. You must destroy at least 15 of them or be destroyed." category: - name: "Timex Sinclair User" slug: "timex-sinclair-user" taxonomy: "category" url: "http://localhost/category/periodicals/timex-sinclair-user/" post_tag: - name: "1983" slug: "year-1983" taxonomy: "post_tag" url: "http://localhost/tag/year-1983/" - 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/" publication: "Timex Sinclair User" publication_r: id: 10278 title: "Timex Sinclair User" type: "periodical" url: "http://localhost/periodical/timex-sinclair-user/" volume: "1" issue: "2" issues_articles: - id: 26867 title: "Timex Sinclair User n2" type: "issue" url: "http://localhost/issue/timex-sinclair-user-n2/" pages: "33" pubdate: "July 1983" archive_link: false volumeissue: "v1n2" --- # Laser Cannon [![Image](http://localhost/wp-content/uploads/2020/10/laser-cannon-1024x654.jpeg "Screenshot")](http://localhost/wp-content/uploads/2020/10/laser-cannon.jpeg) There is an over-abundance of Space Invaders games, but this one is worth a try because it fits into 1K of memory. A fleet of 20 “X” ships is attacking you. You must destroy at least 15 of them or be destroyed. The cursor arrows move you up and down (the shift 5 and shift 7 keys) and the 8 fires your laser cannon. You begin with 200 fuel units and use one every time you move or fire. If you manage to destroy all the “X” ships, the amount of fuel remaining is displayed. ``` 10 LET A=0 20 LET J=200 30 LET K=10 40 LET G=10 50 LET X=INT (RND*18) + 2 60 LET A=A+1 70 IF A=21 THEN GOTO 260 80 LET Y=30 90 PRINT AT K,0;CHR$ 130;CHR$ 128;AT X,Y;"X" 100 IF J<0 THEN GOTO 150 110 IF INKEY$="7" THEN LET K=K-1 120 IF INKEY$="6" THEN LET K=K+1 130 IF INKEY$="8" THEN PRINT AT K,2;"********************" 140 IF INKEY$>"5" THEN LET J=J-1 150 LET Y=Y-1.5 160 IF Y=3 THEN LET G=G+1 170 IF G=5 THEN GOTO 240 180 IF Y=3 THEN GOTO 50 190 IF INKEY$="8" AND K=X AND Y<21 THEN GOTO 220 200 CLS 210 GOTO 90 220 PRINT AT X,Y+1;CHR$189 230 GOTO 50 240 PRINT "DESTROYED" 250 STOP 260 PRINT "YOU WIN" 270 PRINT "FUEL LEFT=";J ```