PIXELGLIDER is a PUR80 10 liner for the ZX81.

Since the ZX81 can only handle 1 statement per line, the game is in 10 statements as well.

This program uses multiple variables stored in 1 string. With this trick it is possible to alter multiple variables in just 1 statement.

Line1: define string for all text and variables

Line2: Set start X, Y DX, DY and reset score

Line3: Plot the pixel

Line4: Add hiscore if score is more

Line5: Show score, name of game and current hiscore

Line6: Alter DX and DY, either by input from player or extra random move from computer,

Line7: Add 1 point to score

Line8: clear old pixel

Line9: Move pixel: X=X+DX, Y=Y+DY

Line10: Test pixel on screen, if so continu, if not, wait for N to restart

By splitting line 6 in line 6 and line 7 the length of each line remains under 80 tokens

when typing in, making the game fit the PUR80 compo.

THE GAME

Your pixel glides over the screen and your job is to keep the pixel on the screen.

The computer will add some speed in both directions and you need to reduce the speed to stay on the screen.

Controls

Q= up

A= down

O= left

P= right

N=start New game

LIST

``` 1 LET D\$=".........      PIXELGLIDER      ...."
2 LET D\$( TO 9)="PP2110000"
3 PLOT CODE D\$(1)-38,CODE D\$(2)-38
4 IF D\$(6 TO 9)>D\$(33 TO ) THEN LET D\$(33 TO )=D\$(6 TO 9)
5 PRINT AT 0,0;D\$(6 TO )
6 LET D\$(3 TO 4)=CHR \$(CODE D\$(3)+(INKEY\$="P")-(INKEY\$="O")+SGN (RND-.5))+
CHR \$(CODE D\$(4)+(INKEY\$="Q")-(INKEY\$="A")+SGN (RND-.5))
7 LET D\$(5 TO 9)=STR\$ (VAL D\$(5 TO 9)+1)
8 UNPLOT CODE D\$(1)-38,CODE D\$(2)-38
9 LET D\$( TO 2)=CHR \$(CODE D\$(1)+CODE D\$(3)-28)+CHR \$(CODE D\$(2)+CODE D\$(4)-28)
10 GOTO 10-7*(ABS(CODE D\$(1)-70)<32 AND ABS(CODE D\$(2)-58)<20)-8*(INKEY\$="N")```
 Status Released Rating Rated 5.0 out of 5 stars(2 total ratings) Author BASIC 10Liner Genre Action Tags 8-Bit, basic, basic10liner, sinclair, zx81