## CPC Scene, "what have you been doing"

Started by steve, 19:07, 08 May 11

0 Members and 1 Guest are viewing this topic.

#### McKlain

#50
Yes, exactly

Are there any other recreations of the amiga boing ball on the cpc?

#### Devilmarkus

Interesting is, that the whole demo is written in BASIC!
`10 a=0.220 x=12030 DEG40 c%=350 c1%=960 MODE 070 FOR x%=&C000 TO &F7FF STEP 2:POKE x%,128:NEXT80 FOR x%=&F800 TO &FFFF:POKE x%,192:NEXT90 GOSUB 310:ORIGIN 0,0,0,640,0,400100 col=1110 FOR kkk=1 TO 100120 FOR kk=1 TO col130 x=x-4140 IF x=0 THEN a=-0.2150 IF x=-120 THEN GOTO 290160 d=0170 PLOT 320,300,1180 FOR t%= 90 TO 270 STEP 4190 chk=INT(200+100*SIN(t%))200 IF chk=293 OR chk=243 OR chk=156 OR chk=106 THEN d=1210 IF chk=276 OR chk=203 OR chk=128 THEN d=0220 IF d=1 THEN DRAW 320+x*COS(t%),200+100*SIN(t%),c% ELSE DRAW 320+x*COS(t%),200+100*SIN(t%),c1%230 NEXT t%240 NEXT kk250 col=col+a:c%=c%+1:c1%=c1%+1260 IF c%=15 THEN c%=3270 IF c1%=15 THEN c1%=3280 NEXT kkk290 GOTO 420300 END310 c=15320 x%=0:y%=100:ORIGIN 380,200:PLOT -2,-2,c330 d%=3-2*r340 WHILE x%<y%+2350 PLOT x%,y%:DRAW -x%,y%:PLOT y%,x%:DRAW -y%,x%:PLOT -x%,-y%:DRAW x%,-y%:PLOT -y%,-x%:DRAW y%,-x%360 IF d%<0 THEN d%=d%+4*x%+6: GOTO 390370 d%=d%+4*(x%-y%)+10380 y%=y%-2390 x%=x%+2400 WEND410 RETURN420 d=2:'Change variable D for speed430 KEY 1,"call&bc02:mode 2:list"+CHR\$(13)440 ENV 1,14,-1,2:'Set up envelopes and variables450 ENT 1,100,5,1460 dr=1:cl=3:cl2=9:fr=1: xd%=-1:yd=-0.5:x%=30:y=15470 FOR x=2 TO 14 STEP 2:INK x,6:INK x+1,26:NEXT:'Set inks to correct colours480 INK 15,1:INK 1,2:INK 0,11:BORDER 11490 WHILE mainloop=0500 INK cl,6:INK cl2,26510 OUT &BC00,12:OUT &BD00,48+INT(t%/256):OUT &BC00,13:OUT &BD00,t% MOD 256:'Uses CRTC register 12 & 13 to set OFFSET for hardware scroll520 IF x%>35 OR x%<15 THEN IF xd%=-1 THEN SOUND 1,1500,0,1,1,1 ELSE SOUND 4,1500,0,1,1,1 ELSE a=a530 yd=yd-0.5:x%=x%+xd%540 IF x%>35 OR x%<15 THEN xd%=-xd%:dr=-dr550 t%=x%+(80*y):FOR a=1 TO d:CALL &BD19:NEXT:'Use FRAME instead of CALL&BD19 on 664 & 6128560 y=y+yd:IF y<11 THEN yd=2.5570 IF yd=2 THEN SOUND 2,1000,0,1,1,1580 cl=cl+dr:IF cl=15 THEN cl=3 ELSE IF cl=2 THEN cl=14:'Keeps control of INK values to give illusion of rotation590 cl2=cl2+dr:IF cl2=15 THEN cl2=3 ELSE IF cl2=2 THEN cl2=14600 WEND`

Really a cool effect! Who can beat this? (In pure BASIC of course!)
When you put your ear on a hot stove, you can smell how stupid you are ...

JavaCPC Desktop Full Release

#### McKlain

I've just noticed that the "boing" sound is in stereo!

#### Devilmarkus

The most interesting point for me is that they use CRTC registers 12 and 13! (base for screen ram)
When you put your ear on a hot stove, you can smell how stupid you are ...

JavaCPC Desktop Full Release

#### McKlain

I guess that the background grid helps to give the ilussion of just the ball bouncing and not the entire screen moving.

#### Gryzor

You forgot the Epilepsy Warning for the rendering part

Very nice and impressive, wish the ball rotated, too...

#### McKlain

Quote from: Gryzor on 17:40, 13 May 11
You forgot the Epilepsy Warning for the rendering part

Very nice and impressive, wish the ball rotated, too...

It does...

#### AMSDOS

I always thought this ACU 10-Liner was pretty cool!

`1 MODE 0:DEG:CALL &BC02:FOR x=0 TO 639 STEP 640/3:PLOT x,0,15:DRAWR 0,399:NEXT:PLOT 639,0:DRAWR 0,399:FOR y=0 TO 399 STEP UNT(400/3):PLOT 0,y:DRAWR 639,0:NEXT:c=1:FOR x=8 TO 200 STEP 4:PLOT 8,270,c:DRAW x,394:PLOT 200,270:DRAW 212-x,394:PLOT 8,3942 DRAW x,270:PLOT 200,394:DRAW 212-x,270:GOSUB 9:NEXT:ORIGIN 220,270,220,416,394,270:x=98:y=62:FOR r=2 TO 120 STEP 4:i=c:h=r:v=r:GOSUB 10:NEXT:ORIGIN 436,270,436,630,394,270:m=1:FOR r=60 TO 10 STEP-5:FOR n=0 TO 359 STEP 5:PLOT 98,62,c3 DRAW 94+(r*m)*COS(n),62+r*SIN(n):GOSUB 9:NEXT:m=m+0.3:NEXT:ORIGIN 0,0,0,639,0,399:FOR r=359 TO 0 STEP-5:x=108+48*COS(r):y=200+40*SIN(r):i=c:h=20:v=20:GOSUB 10:NEXT:FOR x=436 TO 630:PLOT x,200+64*SIN(n),c:PLOT x,200+64*COS(n\2),c:n=n+5:GOSUB 9:NEXT4 FOR n=0 TO 360 STEP 4:PLOT 110+80*COS(n),65+60*SIN(n),c:DRAW 110+80*COS(n+200),65+60*SIN(n+200):GOSUB 9:NEXT:c=0:FOR n=-80 TO 80 STEP 8:PLOT 312,128,c:DRAW 312+n,68:DRAW 312,4:GOSUB 9:NEXT:FOR n=80 TO -72 STEP -8:PLOT 316,128,c:DRAW 316+n,685 DRAW 316,4:GOSUB 9:NEXT:FOR n=20 TO 60 STEP 4:FOR n2=0 TO 360 STEP 4:PLOT 536+n*COS(n2),66+n*SIN(n2),c:GOSUB 9:NEXT:NEXT:c=10:FOR n=359 TO 0 STEP-8:PLOT 536,66,c:DRAW 536+60*COS(n),66+60*SIN(n),c:GOSUB 9:GOSUB 96 NEXT:RAD:FOR m=0 TO 54 STEP 0.2:PLOT 536,66,14:DRAW 536+30*COS(m),66+30*SIN(m):NEXT:PLOT 518,72:DEG:PLOT 526,76,0:DRAWR 0,-2:PLOT 546,76:DRAWR 0,-2:PLOT 516,66:FOR n=-180 TO 0 STEP 5:DRAW 536+20*COS(n),66+20*SIN(n):NEXT:ORIGIN 220,136,220,416,262,1367 x=96:y=20:FOR h=0 TO 140 STEP 5:i=c:v=h/5:GOSUB 10:NEXT:yi=20:yic=5:y=55:FOR ri=-30 TO 30 STEP 5:c=INT(RND*9)+1:FOR z=0 TO 240 STEP 2+(RND*4):PLOT (96-ri)+ri*COS(z),y+(40+yi)*SIN(z),c:GOSUB 9:NEXT:yi=yi-yic:IF yi<-5 THEN yic=-yic8 NEXT:y=20:FOR x=92 TO 100:PLOT x,y,13:DRAW x,50:NEXT:x=96:y=50:i=13:a=6:FOR r=1 TO 3:v=r:h=v*5:GOSUB 10:NEXT:INK 15,6:INK 14,15:INK 13,20:BORDER 0:INK 0,0:WHILE-1:FOR i=1 TO 10:INK i,26:INK i-1,0:CALL &BD19:CALL &BD19:NEXT:INK i-1,0:WEND9 c=c MOD 10+1:RETURN10 PLOT x+h*COS(0),y+v*SIN(0),i:FOR zz=0 TO 360 STEP 20:DRAW x+h*COS(zz),y+v*SIN(zz),i:NEXT zz:DRAW x+h*COS(0),y+v*SIN(0),i:GOSUB 9:RETURN`

* Using the old Amstrad Languages    * with the Firmware
* I also like to problem solve code in BASIC    * And type-in Type-Ins!

Home Computing Weekly Programs
Popular Computing Weekly Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Holy crap

#### Ynot.zer0

Quote from: CP/M User on 01:49, 14 May 11
I always thought this ACU 10-Liner was pretty cool!

I wasn't sure about this whilst it was filling in the 9 sections... and then "Bam"... WOW!    that is awesome and unexpected!!!