CODINGLISTINGS ★ Tunnel|Amstrad Action) ★

TunnelCoding Listings
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

The second program from J. Chan is a graphics demo. The program asks for two numbers, which are used to draw a tunnel shape. Then the program animates, giving the impression of diving into the tunnel.

1 'Tunnel
2 'By Johnnie Chan
3 'Amstrad Action July 88
10 MODE 1:INK 0,0:BORDER 0:INK 1,16
20 FOR t=2 TO 14:INK t,24:NEXT:INK 15,26
30 INPUT"No.of sides ",s
40 INPUT"How far apart ",re
50 MODE 0:DEG:ORIGIN 320,200
60 FOR r=5 TO 405 STEP re
70 c=c+1:IF c>14 THEN c=1
80 MOVE 0,r:FOR t=0 TO 360 STEP 360ç s:DRAW r*SIN(t),r*COS(t),c:NEXT
90 NEXT
100 GOSUB 140
110 i=i+1:IF i>14 THEN i=1
120 INK i,26:FOR t=1 TO 30:NEXT:FRAME:INK i,0
130 GOTO 110
140 REM display
150 ORIGIN 0,0
160 MOVE 1,1:DRAW 639,1,15:DRAW 639,70:DRAW 1,70:DRAW 1,1:FOR t=4 TO 635:MOVE t,2:DRAW t,69,0:NEXT
170 po=50:GOSUB 190
180 po=490:GOSUB 190:RETURN
190 FOR n=po TO po+100 STEP 100:ORIGIN n,35:MOVE 0,30:FOR t=0 TO 360 STEP 10:DRAW 30*SIN(t),30*COS(t),15:NEXT:FOR t=0 TO 360 STEP 25:MOVE 0,0:DRAW 27*SIN(t),27*COS(t),c:c=c+1:IF c>14 THEN c=1
200 NEXT:NEXT:RETURN
210 END

AA#34

★ PUBLISHER: Amstrad Action
★ YEAR: 1988
★ AUTHOR: Johnnie Chan

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding Src's » Self-Destruct (Amstrad Action)
» Coding Src's » Graffitis (Amstrad Magazine 14)
» Coding Src's » Music Galore (Amstrad Computer User)
» Coding Src's » Follow the Sun to the S. Pole (Computing with the Amstrad)
» Coding Src's » Boggle (Amstrad Action)
» Coding Src's » La marche Turque (CPC Revue)
Je participe au site:

» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 432 millisecondes et consultée 958 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.