A downloadable game

The game TENG is inspired to PONG, written in ATARI BASIC (10 lines, less than 120  characters each) for ATARI 8bit computers and tested on a PAL 800XL emulated in Altirra.

With the joystick, moving left and right, the 2 paddles at the top and bottom of the screen are moved.

Every time the ball touches one of the paddles, 1 point is scored and one block is added in a random position on the playfield.

Each block can deflect the ball, making the game more difficult.

When the ball goes out of bounds, press FIRE to start a new game.


0        0         0         0         0         0         0         0         0         0         1         1         1 
0        1         2         3         4         5         6         7         8         9         0         1         2
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1 GRAPHICS 3:DIM F$(1),G$((INT(ADR(F$)/1024)+1)*1024-ADR(F$)-1),B$(384),M$(128),P$(128),Q$(128),N$(4):POKE 705,90
2 B$=CHR$(0):B$(384)=CHR$(0):B$(2)=B$:P$=B$:POKE 54279,ADR(B$)/256:POKE 559,46:POKE 53277,3:POKE 704,60:Z=53248
3 COLOR 1:FOR I= 0 TO 19:PLOT 0,I:DRAWTO 39,I:NEXT I:COLOR 2:PLOT 0,0:DRAWTO 0,19:PLOT 39,0:DRAWTO 39,19:Q$=B$
4 POKE 53256,1:N$(1,1)=CHR$(0):N$(4,4)=CHR$(0):N$(2,2)=CHR$(24):N$(3,3)=CHR$(24):P$(17)=CHR$(255):P$(96)=CHR$(255)
5 P$(18)=CHR$(126):P$(95)=CHR$(126):R=1:S=1:T=120:U=160:V=30:POKE 710,0:POKE 752,1:X=0:J=656:POKE J,2:GOTO 10
6 POKE 53278,1:SOUND 0,0,0,0:POKE J,2:Y=STICK(0):IF Y=11 OR Y=7 THEN T=T-(Y-9)
7 POKE 77,0:TRAP 3:IF PEEK(53253)=0 THEN GOTO 7-(1-STRIG(0))*4
8 IF PEEK(53260)<>0 AND W=0 THEN X=X+1:S=-S:SOUND 0,121,10,8:PLOT 2+PEEK(53770)/8,PEEK(53770)/15
9 IF PEEK(53253)=2 OR PEEK(53253)=3 THEN R=-R:SOUND 0,150,10,8
10 W=PEEK(53260):U=U+R:V=V+S:POKE Z,T:POKE Z+1,U:Q$(V)=N$:?"TENG BY ALEK73-SCORE:";X;"    ":GOTO 6
0        0         0         0         0         0         0         0         0         0         1         1         1 
0        1         2         3         4         5         6         7         8         9         0         1         2
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890


Code description:

lines 1 and 2: initialization of graphics mode and Player Missile Graphics (PMG)

line 3: drawing of the playfield

lines 4,5: definition of paddles and ball

line 6: begin of the main loop and adjustment of paddles position variable based on joystick input

line 7: detection of ball out of bounds

line 8, 9: handling of collisions between players and playfield

line 10: update the position on screen of all moving objects and print score 


Published 28 days ago
StatusReleased
AuthorBASIC 10Liner
GenreAction
Tags10liner, 8-Bit, atari, basic

Download

Download
listing_120columns.txt 2.1 kB
Download
Program starting.txt 313 bytes
Download
program_description.txt 540 bytes
Download
TENG.atr 130 kB

Install instructions

I've tested the program on Atirra, selecting an ATARI 800XL PAL (of course ATARI basic cartdrige must be active).

To run the program: load TENG.ATR as a disk in Altirra and do a cold reset.

The system will boot DOS and then lauch ATARI BASIC.

At the READY prompt, write

LOAD "D:TENG.BAS"

and then

RUN 

Comments

Log in with itch.io to leave a comment.

very good