Space Splat (Amstrad CPC) by Wiremu Te Kani
A downloadable game
Game Title: Space Splat
Author: Wiremu Te Kani
Language: Locomotive BASIC 1.1 (Amstrad)
Category: EXTREM-256
.WAV file (tape) attached.
A new game for the 10-Liner Compo for 2022.
"You're doomed. Earth is overthrown by Duploids: A space-race that colonizes planets with pre-fabricated bug ships. All you can do now is avoid getting stomped (left/right keys). Good Luck." This one only uses 9 lines. Here it is in its compact entirety below. The unravelled version of the BASIC program follows with handy REM statements showing what each command does.
The 10-LINER (In 9 lines):
10 r$=CHR$(10)+CHR$(13):r2$=r$+r$:b$=CHR$(143):b2$=b$+b$:b4$=b2$+b2$:s2$=" ":s4$=s2$+s2$:x1$=b$+" ":x2$=" "+b$:m1$=CHR$(4)+CHR$(1):u$=CHR$(11)+CHR$(11)
20 PRINT m1$"YOU'RE DOOMED."r2$"Earth is overthrown by Duploids:"r$"A space-race that colonizes"r$"planets with pre-fabricated"r$"bug-ships."r2$"All you can do now is avoid"r$"getting stomped (left/right keys)."r2$"GOOD LUCK."
30 PRINT r$"Press any key to start... the end":CALL &BB03:WHILE INKEY$="":WEND
40 x=4:w2=12:h2=8:c=1:m$="352f2c282328231b23282c2823282c2f":PRINT m1$:WINDOW #0,1,15,1,24:WINDOW #1,1,40,25,25:EVERY 17 GOSUB 90
50 PEN #0,2:PRINT #0,s4$x2$x2$r$s4$b4$b$r$s4$x1$x1$b$r$b4$b4$b4$b$r$b2$s2$b4$b$s2$b2$r$b2$s2$x2$x2$s2$x2$b$r$s4$b2$x2$b$
60 FOR b=1 TO 25:x=x+((INKEY(8) XOR INKEY(71)) AND x>1)-((INKEY(1) XOR INKEY(63)) AND x<37):PEN #1,1:LOCATE #1,x,1:PRINT #1," ";CHR$(250+RND);" ":LOCATE #0,1,1:PRINT #0,u$;:IF x>=x2 THEN IF x<=x2+w2 THEN IF b>23-5 THEN 80
70 SOUND 1,500+((b+x2)*10),13,4,12:NEXT:x2=RND*25:WINDOW #0,1+x2,15+x2,1,24:INK 2,2+(RND*26):GOTO 50
80 CALL &BCA7:LOCATE #1,x,1:PRINT #1," _ ":WINDOW #1,1,40,1,25:LOCATE #1,15,12:PEN #1,3:PRINT #1,"GAME OVER":FOR a=2000 TO 1 STEP -50:SOUND 1,a,4,9,RND*15:NEXT:FOR a=1 TO 2000:NEXT:PEN 1:RUN
90 DI:n=VAL("&"+MID$(m$,c,2)):c=(c+2) MOD 32:SOUND 2,n+n+n+n+n,26,6,1:EI:RETURN
The Unravelled version, with comments:
100 ' Initialise
101 r$=CHR$(10)+CHR$(13):' Control codes for a Carriage return (enter)
102 r2$=r$+r$:' 2 Carriage returns
103 b$=CHR$(143): ' Square block 8x8 pixels
104 b2$=b$+b$: ' 2 blocks
105 b4$=b2$+b2$: ' 4 blocks
106 s2$=" ": ' 2 spaces
107 s4$=s2$+s2$: ' 4 spaces
108 x1$=b$+" ": ' 1 block, 1 space
109 x2$=" "+b$: ' 1 space, 1 block
110 m1$=CHR$(4)+CHR$(1):' Control codes for MODE 1
111 u$=CHR$(11)+CHR$(11):' Control codes to move cursor up 2 space (scroll screen down)
200 ' Premise and instructions
201 PRINT m1$"YOU'RE DOOMED."r2$"Earth is overthrown by Duploids:"r$"A space-race that colonizes"r$"planets with pre-fabricated"r$"bug-ships."r2$"All you can do now is avoid"r$"getting stomped (left/right keys)."r2$"GOOD LUCK."
202 ' Set the screen to MODE 1, and seperate lines of text with carriage returns.
300 ' Any key to start
301 PRINT r$"Press any key to start... the end": ' Print text
302 CALL &BB03: ' Clear the key input buffer
303 WHILE INKEY$="": ' Loop until key press
304 WEND
400 ' Set up play area for game
401 x=4: ' Position player and enemy
402 w2=12:
403 h2=8:
404 c=1:
405 m$="352f2c282328231b23282c2823282c2f": ' Store musical notes data
406 PRINT m1$: ' Mode 1
407 WINDOW #0,1,15,1,24: ' Set up enemy area to move in
408 WINDOW #1,1,40,25,25: ' Set up player area to move in
409 EVERY 17 GOSUB 900: ' Play musical note every 17/300s sec
500 ' Print enemy
501 PEN #0,2:' Set the colour of the enemy
502 PRINT #0,s4$x2$x2$r$s4$b4$b$r$s4$x1$x1$b$r$b4$b4$b4$b$r$b2$s2$b4$b$s2$b2$r$b2$s2$x2$x2$s2$x2$b$r$s4$b2$x2$b$:' Print enemy creature
600 ' Player input and movement
601 FOR b=1 TO 25: ' Begin a movement loop for the enemy (moves down the whole screen)
602 x=x+((INKEY(8) XOR INKEY(71)) AND x>1)-((INKEY(1) XOR INKEY(63)) AND x<37): ' read keyboard to move player left/right
603 PEN #1,1: ' Change colour for player
604 LOCATE #1,x,1: ' Position player
605 PRINT #1," ";CHR$(250+RND);" ": ' Print stickman (player)
606 LOCATE #0,1,1: ' Move cursor to the top of the screen
607 PRINT #0,u$;: ' Push up, to scroll enemy down
608 IF x>=x2 THEN IF x<=x2+w2 THEN IF b>23-5 THEN 800: ' If the enemy touches player go to line 800
700 ' Play dropping down sound, loop until enemy disappears, then set up new enemy
701 SOUND 1,500+((b+x2)*10),13,4,12: ' Play dropping sound
702 NEXT: ' Loop back to line 60 - enemy moves down. When it reaches the bottom
703 x2=RND*25: ' Location of next enemy
704 WINDOW #0,1+x2,15+x2,1,24 ' Position new enemy
705 INK 2,2+(RND*26): ' Pick enemie's new colour
705 GOTO 500: ' Start another enemy run
800 ' Player dies, game over routine
801 CALL &BCA7: ' stop keypresses
802 LOCATE #1,x,1: ' change player from being a person
803 PRINT #1," _ ": ' to a splatted pancake
804 WINDOW #1,1,40,1,25: ' Position GAME OVER text
805 LOCATE #1,15,12:
806 PEN #1,3: ' Set up its colour
807 PRINT #1,"GAME OVER":
808 FOR a=2000 TO 1 STEP -50: ' Plays death sound
809 SOUND 1,a,4,9,RND*15:
810 NEXT:
811 FOR a=1 TO 2000: ' Game pauses for about 4 seconds
812 NEXT:
813 PEN 1: ' Resets colours
814 RUN: ' Restart game
900 ' Music plays on interrupts
901 DI: ' Disable interrupts
902 n=VAL("&"+MID$(m$,c,2)): ' Extract note from music data
903 c=(c+2) MOD 32: ' move the playhead forward
904 SOUND 2,n+n+n+n+n,26,6,1: ' Play the note (frequency is data multiplied by 5)
905 EI: ' Enable interrupts
906 RETURN
| Status | Released |
| Rating | Rated 5.0 out of 5 stars (1 total ratings) |
| Author | BASIC 10Liner |
| Genre | Action |
| Tags | 8-Bit, amstradcpc, basic, basic10liner, schneider |
Download
Install instructions
To load the program on an Amstrad:
Load the tape into its tape deck,
or in this case load the .WAV file into the emulator.
Type RUN"
Press PLAY then any key



Leave a comment
Log in with itch.io to leave a comment.