Bouncing ball

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Shaun_B
Posts: 471
Joined: Wed Apr 22, 2009 10:22 am

Re: Bouncing ball

Post by Shaun_B »

Thanks for the tip. I'll have another listing today (unfinished version posted on my Twitter).

Regards,

Shaun.
Crayon21
Posts: 172
Joined: Sun Nov 04, 2018 2:33 am

Re: Bouncing ball

Post by Crayon21 »

reducing your code is a fun challenge.

currently working on that

no such luck :lol:
zx81: great yet flawed
Zx spectrum: masterpiece that keeps on giving

(wish it weren't so expensive) :o
dr beep
Posts: 1445
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Bouncing ball

Post by dr beep »

IF NOT LEN INKEY$ THEN NEXT I
User avatar
XavSnap
Posts: 1289
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Bouncing ball

Post by XavSnap »

Dr Beep :

12 IF NOT LEN INKEY$ THEN NEXT I

:lol:

Or

Just one line to wait:
11 RAND SIN SIN SIN SIN SIN SIN PI

Code: Select all

1 LET X=42 
2 LET Y=X 
3 LET X1=PI/PI 
4 LET Y1=X1 
5 FOR I=X1 TO PI STEP 0 
6 LET X=X+X1
7 LET Y=Y+Y1
8 IF X<1 OR X>42 THEN LET X1=-X1
9 IF Y<1 OR Y>62 THEN LET Y1=-Y1
10 PLOT Y,X 
11 RAND SIN SIN PI
12 UNPLOT Y,X 
13 IF INKEY$="" THEN NEXT I
14 REM DONKEYSOFT
Xavier
Post Reply