A downloadable game

GUESS!80

Simple game, guessing characters, the higher the level,

the smaller and more blended characters.

Always guess the first, then the second character.

The game will tell you if you are doing it right.

Will you reach level 100?

Difficulty:

1 - characters from: ! (ascii code 33) - to: @ (ascii code 64)

2 - characters from: ! (ascii code 33) - to: Z (ascii code 90)

3 - characters from: ! (ascii code 33) - to: z (ascii code 122) + OVER 1

Except for the characters: [\]{|}~© (cannot be used with INKEY$)

Unfortunately, Sinclair BASIC is very slow. Drawing takes about 10 seconds. :-(

Can be run on any ZX Spectrum emulator. Tested on FUSE, Marvin, Speccy, Spectacol,

Unreal Speccy Portable. Just drag the TAP file to the emulator, the game will start

automatically. The game can be interrupted at any time by classically pressing

CAPS SHIFT + BREAK SPACE. You can restart the game with the RUN command.

Have fun!

Maachal


Program size (10 line, 80 chars per line):

         0         0         0         0         0         0         0         0
----5----1----5----2----5----3----5----4----5----5----5----6----5----7----5----8
1V:Lp=23620:Lu=11:H7:Lu=2:H7:Ld=(k$="1")+2*(k$="2")+3*(k$="3"):Op*(d=0),5:Ls=100
2T:V:P"Level:";l;" Lives:";f:P"wait":INK 7:Lu=3:H8:La$=x$:H8:La$=a$+x$:Lx=.4*l
3PAT 21,0;a$:Ly=132-.4*l:OVER (d=3):Lz=INT (.08*(s-l))+1:Ljx=INT (.04*(s-l))+1
4Lu=2:H9:INK 0:OVER 1:Lu=6:H7:OVER 0:Lu=2:Lc=0:Fk=1 TO 2:PAT k,0;k;". char? ";
5H6:Nk:Lf=f-(c=0):Ll=l-(c=1)+(c=2):Ms:Op*((l=0)+(l>s)+(f=0)),8:G2:P"END":STOP 
6Lb$=a$(k TO k):H7:Pk$;:Lo=(k$=b$):P" bad   good "(o*6+1 TO o*6+6);b$:Lc=c+o:Y
7Op,u:M1:M0:Lk$=INKEY$:Y:PAT 4,0:Fn=0 TO 25:P,:Nn:Y:P"Diffic 1 2 3?":Ll=1:Lf=5:Y
8Op,u:Y:La=INT (RND*(32*(d=1)+59*(d=2)+87*(d=3)))+33:La=a+(a>90)*3:Lx$=CHR$ a:Y
9Fk=0 TO 1:Fi=0 TO 7:Fj=0 TO 7:H8+2*POINT (k*8+j,7-i):Nj:Ni:Nk:Y:E 2021 maachal
10Lm=x+(k*jx*z)+j*z:Ln=y-(k*jx*z)-i*z:Qm,n:Fq=1 TO z-1:Wz-1,0:Qm,n-q:Nq:Wz-1,0:Y
----5----1----5----2----5----3----5----4----5----5----5----6----5----7----5----8
         0         0         0         0         0         0         0         0

Program details:

Line|Code|Keywords
----|----|----------------------------------------------------------------------
   1|   1|CLS - clear screen
    |   2|LET p=23620 - address to NSPPC - statement number in line to be jumped
    |   3|LET u=11 - the number in the line to be jumped to
    |   4|GO SUB 7 - jump to 7/11 proc, print select difficulty, set level&lives
    |   5|LET u=2 - the number in the line to be jumped to
    |   6|GO SUB 7 - jump to 7/2 proc, waiting for a keystroke, key to k$
    |   7|LET d=(k$="1")+2*(k$="2")+3*(k$="3") - select diffic key 1 or 2 or 3
    |   8|POKE p*(d=0),5 - other key goto 1/5
    |   9|LET s=100 - constant for 100
----|----|----------------------------------------------------------------------
   2|   1|RANDOMIZE - set random generator, main game loop start
    |   2|CLS - clear screen
    |   3|PRINT "Level:";l;" Lives:";f - print info level and lives
    |   4|PRINT "wait" - print wait
    |   5|INK 7 - INK set to white
    |   6|LET u=3 - the number in the line to be jumped to
    |   7|GO SUB 8 - jump to 8/3 proc, creates a random char according to diffic
    |   8|LET a$=x$ - store 1. char to a$
    |   9|GO SUB 8 - jump to 8/3 proc, creates a random char according to diffic
    |  10|LET a$=a$+x$ - store 2. char to a$
    |  11|LET x=.4*l - X setting for drawing by diffic
----|----|----------------------------------------------------------------------
   3|   1|PRINT AT 21,0;a$ - print hidden two char
    |   2|LET y=132-.4*l - X setting for drawing by diffic
    |   3|OVER (d=3) - OVER setting for drawing by diffic
    |   4|LET z=INT (.08*(s-l))+1 - zoom setting for drawing by diffic
    |   5|LET jx=INT (.04*(s-l))+1 - shift setting 1 & 2 char for draw by diffic
----|----|----------------------------------------------------------------------
   4|   1|LET u=2 - the number in the line to be jumped to
    |   2|GO SUB 9 - jump to 9/1 proc, hidden drawing chars
    |   3|INK 0 - INK set to black
    |   4|OVER 1 - OVER setting 1
    |   5|LET u=6 - the number in the line to be jumped to
    |   6|GO SUB 7 - jump to 7/6 proc, reveal the drawing
    |   7|OVER 0 - OVER setting 0
    |   8|LET u=2 - the number in the line to be jumped to
    |   9|LET c=0 - internal eval
    |  10|FOR k=1 TO 2 - loop for 2 chars
    |  11|PRINT AT k,0;k;". char? "; - print N. char?
----|----|----------------------------------------------------------------------
   5|   1|GO SUB 6 - jump to 6/2 proc, press and evaluation key
    |   2|NEXT k - end loop for 2 chars
    |   3|LET f=f-(c=0) - if internal eval (ie) 0 set lives -1
    |   4|LET l=l-(c=1)+(c=2) - if ie 1 set level -1, if 2 set level +1
    |   5|PAUSE s - pause 100
    |   6|POKE p*((l=0)+(l>s)+(f=0)),8 - if level 0 or 101, or lives 0, goto 5/8
    |   7|GO TO 2 - goto 2, main game loop start
    |   8|PRINT "END" - end game
    |   9|STOP - stop
----|----|----------------------------------------------------------------------
   6|   1|LET b$=a$(k TO k) - set b$ to actual char from a$
    |   2|GO SUB 7 - jump to 7/2 proc, waiting for a keystroke, key to k$
    |   3|PRINT k$; - print press key
    |   4|LET o=(k$=b$) - compare actual char and press key
    |   5|PRINT " bad   good "(o*6+1 TO o*6+6);b$ - print good or bad press key
    |   6|LET c=c+o - if compare OK, internal eval +1
    |   7|RETURN - end proc 6/1
----|----|----------------------------------------------------------------------
   7|   1|POKE p,u - jump to u immediately
    |   2|PAUSE 1 - start proc 7/2, wait for key press
    |   3|PAUSE 0
    |   4|LET k$=INKEY$ - key to k$
    |   5|RETURN - end proc 7/2 
    |   6|PRINT AT 4,0 - start proc 7/6, reveal the drawing
    |   7|FOR n=0 TO 25 - 25 lines loop
    |   8|PRINT , - print space half line screen 
    |   9|NEXT n - end loop
    |  10|RETURN - end proc 7/6
    |  11|PRINT "Diffic 1 2 3?" - start proc 7/11, print select difficulty
    |  12|LET l=1 - set level 1
    |  13|LET f=5 - set lives 5
    |  14|RETURN - end proc 7/11
----|----|----------------------------------------------------------------------
   8|   1|POKE p,u - jump to u immediately
    |   2|RETURN - end proc 8/2 (empty proc)
    |   3|LET a=INT (RND*(32*(d=1)+59*(d=2)+87*(d=3)))+33 - start proc 8/3
    |   4|LET a=a+(a>90)*3 - creates a random char according to diffic, adjust
    |   5|LET x$=CHR$ a - range, and store to x$
    |   6|RETURN - end proc 8/3
----|----|----------------------------------------------------------------------
   9|   1|FOR k=0 TO 1 - start proc 9/1, hidden drawing chars, loop of 2 chars
    |   2|FOR i=0 TO 7 - loop of Y pixel
    |   3|FOR j=0 TO 7 - loop of X pixel
    |   4|GO SUB 8+2*POINT (k*8+j,7-i) - test pixel, if 0 proc 8/2, if 1 proc 10/1
    |   5|NEXT j - end loop of X pixel
    |   6|NEXT i - end loop of Y pixel
    |   7|NEXT k - end loop of 2 chars
    |   8|RETURN - end proc 9/1
    |   9|REM 2021 maachal
----|----|----------------------------------------------------------------------
  10|   1|LET m=x+(k*jx*z)+j*z - start proc 10/1, drawing pixel, coordinate X
    |   2|LET n=y-(k*jx*z)-i*z - coordinate Y
    |   3|PLOT m,n - set start pixel
    |   4|FOR q=1 TO z-1 - loop for pixel zoom 1 to 8
    |   5|DRAW z-1,0 - drawing pixels
    |   6|PLOT m,n-q - drawing pixels
    |   7|NEXT q - end loop for pixel zoom
    |   8|DRAW z-1,0 - drawing pixels
    |   9|RETURN - end proc 10/1
----|----|----------------------------------------------------------------------

Download

Download
Guess!80.tap 1.2 kB
Download
info.txt 7.5 kB

Leave a comment

Log in with itch.io to leave a comment.