_________________________________________________________________________ Title: Fire at will Version: 1.1 Author: Henrik Stenberg Size: 635+15 = 650 bytes Description: The ultimate two player tank game with wind, craters and correct projectile motion. _________________________________________________________________________ Command translation: --> Assign value, above (DEL) key =3D=3D> Then, (SHIFT) (7) (F1) (F1) @ Display, (SHIFT) (7) (F5) ^2 Square, Above (8) =A4 Theta, (Alpha) (Range) _________________________________________________________________________ Program : 'FIRE AT WILL Mcl 9.8 --> S ;Gravitation 7.92 --> O 1+8Int (5Ran# --> r 89-8Int (5Ran# --> =A4 Lbl 0 32Ran#+1 --> A[Z] ;Playground Isz Z Z<12 =3D=3D> Goto 0 "DRAWMODE"? --> R ;Choose drawmode, 1 for Solid or 2 for Outline Lbl 1 Range 1,95,0,1,63,0 Graph Y Graph Y>f3 7Ran#-7Ran# --> W ;Wind Plot 48,62 Plot 48+5W,62 Line -Abs W/W --> Z Plot 48+5W+Z,63 Plot 48+5W+Z,61 Plot r+1,1+f1 Plot X+3,Y Line Plot X+1,Y+1 Plot X-5,Y Line Plot X+4,Y+2 Line Plot =A4+1,1+f2 Plot X+3,Y Line Plot X-4,Y+1 Plot X+5,Y Line Plot X-4,Y+2 Line@ " " Isz P P=3D3 =3D=3D> 1 --> P P=3D1 =3D=3D> " - PLAYER 1 -" P=3D2 =3D=3D> " - PLAYER 2 -" " " "ANGLE"? --> U ;Enter Angle between 0 and 90 "VELOCITY"? --> V ;Enter Velocity between 0 and 40 V>40 =3D=3D> 40 --> V "Range " ;How far the projectile can travel Int (V^2/S*sin (2U@ r+4 --> M f1 --> N P=3D1 =3D=3D> Goto 5 180-U --> U =A4+1 --> M f2 --> N Lbl 5 3/V --> T Lbl 6 M+TVcos U+TW --> X N+4+TVsin U-ST^2/2 --> Y Plot X,Y T+3/V --> T X>=3Dr =3D=3D> X<=3Dr+5 =3D=3D> Y>f1 =3D=3D> Y<=3D4+f1 =3D=3D> 2 --> Q X<=3D=A4+5 =3D=3D> X>=3D=A4 =3D=3D> Y>f2 =3D=3D> Y<=3D4+f2 =3D=3D> 1 --> = Q Q>0 =3D=3D> Goto 9 Y>f3 =3D=3D> X>=3D1 =3D=3D> X<=3D95 =3D=3D> Goto 6 X<1 =3D=3D> Goto 1 X>95 =3D=3D> Goto 1 X/O --> Z A[Z]-5 --> A[Z] Goto 1 Lbl 9 " " Q=3D1 =3D=3D> " PLAYER 1" Q=3D2 =3D=3D> " PLAYER 2" " WON!" -------------------------------------------------------------------------= Function memory: f1: A[r/O f2: A[=A4/O f3: A[X/O _________________________________________________________________________