A downloadable game


Guess the Number 


(c) 2024 by Victor Parada

Provide an upper limit and then guess the number the computer selected in that range.

Game written in terms of the NOMAM's BASIC 10-liners Contest.

Requires:

- Atari XL/XE (or emulator)

- Atari builtin BASIC ROM


Game instructions:

- Provide a number at the request.

- Try to guess the number that the computer selected within the range.

- The computer will reply with the hints "<" or ">" if it is not the same. Try again based on the hints.

- If you found the number, the computer will show "=" and the game ends.

The code

The abbreviated BASIC code is the following: 

 

The full and expanded BASIC listing is here:

https://www.vitoco.cl/atari/10liner/GUESSNUM/



Download

Download
GUESSNUM.ATR 90 kB
Download
GUESSNUM.LST 103 bytes
Download
GUESSNUM.LST.PNG 441 bytes
Download
GUESSNUM.PNG 2.4 kB
Download
GUESSNUM.TXT 862 bytes

Install instructions

Load instructions:

- Boot GUESSNUM.ATR disk with BASIC enabled (without [OPTION] key).

- Type ENTER "D:GUESSNUM.LST" and press RETURN key.

- Type RUN to run the game.

- Play the game using a joystick.

- Press the trigger to play again.

Comments

Log in with itch.io to leave a comment.

(3 edits)

I love this! Great use of the SGN function. The 10x10 grid of characters is clever - gives you a total of 93 characters. Thought I'd have a go at porting this to the ZX Spectrum:

1 INPUT m: LET n=1+INT (RND*m): FOR t=1 TO 99: INPUT (t);"?";g: LET d=SGN (n-g): PRINT CHR$ (61+d): LET t=t+99*NOT d: NEXT t

Managed to get it into 1 line of BASIC using just 68 characters (gotta love the Spectrum tokenisation storing keywords in 1 character!). Not as pretty as the 10x10 grid, but kept the same gameplay as the original (unless it takes the player more than 99 guesses!) 

Anyone fancy trying to make it even smaller on another platform? What about you Commodore lot?

Wow, a complete game in 10x10! Very clever using the atascii order of <=> for the responses.