do something like that
Print "Up/Down arrow keys = Change Speed of the...shot"
Print "Left/Right arrow keys = rotate tank"
print "SpaceBar=shot"
wait key
set display mode 640,480,32
sync on
randomize timer()
create bitmap 1,640,480
Gravite#=-10
dim y#(700)
dim tank#(2,5)
dim OldY#(2)
y#(1)=rnd(300)
for x=51 to 639 step 50
y#(x)=480-rnd(300)
while abs(y#(x)-y#(x-50))>100:y#(x)=480-rnd(350):endwhile
next x
last50=1
ink rgb(0,188,35),0
for x=1 to 640
if x-last50<>50:y#(x)=y#(last50)+((x-last50)*((y#(last50+50)-y#(last50))/50)):else:last50=x:endif
line x,y#(x),x,480
next x
for i=1 to 2
tank#(i,1)=rnd(618)+11
tank#(i,2)=y#(tank#(i,1))
tank#(i,3)=rgb(rnd(150)+100,rnd(150)+100,rnd(150)+100)
next i
ink rgb(9,17,173),0
for i=0 to 1
line 0,0+i+20,639,0+i+20
line 0,0+i,639,0+i
line 0+i,0,0+i,479
line 0,479-i,639,479-i
line 639-i,0,639-i,479
next i
for i=1 to 2
Player(tank#(i,1),tank#(i,2),tank#(i,3))
tank#(i,5)=10
next i
copy bitmap 1,0
set current bitmap 0
sync
do
for i=1 to 2
update=1
while spacekey()=0
if rightkey()=1 then OldAngle#=tank#(i,4):tank#(i,4)=wrap(tank#(i,4)-1):Update=1
if leftkey()=1 then OldAngle#=tank#(i,4):tank#(i,4)=wrap(tank#(i,4)+1):Update=1
if upkey()=1 then tank#(i,5)=tank#(i,5)+1:update=1
if downkey()=1 then tank#(i,5)=tank#(i,5)-1:update=1
if tank#(i,5)<0 then tank#(i,5)=200
if tank#(i,5)>200 then tank#(i,5)=0
if Update=1
ink 0,0
box 3,3,90,20
line tank#(i,1),tank#(i,2),tank#(i,1)+(20.0*cos(OldAngle#)),tank#(i,2)-(20.0*sin(OldAngle#))
Player(tank#(i,1),tank#(i,2),tank#(i,3))
line tank#(i,1),tank#(i,2),tank#(i,1)+(20.0*cos(tank#(i,4))),tank#(i,2)-(20.0*sin(tank#(i,4)))
ink tank#(i,3),0
text 5,5,"Vitesse="+str$(tank#(i,5))
update=0
endif
sync
endwhile
ink tank#(i,3),0
x#=tank#(i,1)+(20.0*cos(tank#(i,4)))
y#=tank#(i,2)-(20.0*sin(tank#(i,4)))
Vx#=(tank#(i,5)*cos(tank#(i,4)))
Vy#=(tank#(i,5)*sin(tank#(i,4)))
tire=1
old=1
while Tire=1
ink tank#(i,3),0
OldX#=x#
Oldy#(Old)=y#
Vy#=Vy#+Gravite#
x#=x#+vx#
y#=y#-vy#
if (x#>=637) or (x#<=2)
if (x#>=637):Murx#=637:else:MurX#=2:endif
Y#=Y#+Vy#
if (X#-Oldx#)<>0 then y#=y#-((Vy#*(MurX#-oldx#))/(X#-Oldx#))
x#=MurX#
vx#=-1*vx#
endif
if (y#<=22) or (y#>=477)
if (y#<=22):MurY#=22:else:MurY#=477:endif
X#=X#-Vx#
if (Y#-OldY#(old))<>0 then X#=X#+((Vx#*(MurY#-OldY#(old)))/(Y#-OldY#(old)))
Y#=MurY#
vy#=-1*vy#
endif
if (Y#=OldY#(1)) and (Y#=oldY#(2)) then tire=0
line OldX#,OldY#(old),x#,y#
sync
old=old+1
if old=3 then old=1
endwhile
while spacekey()<>0:endwhile
next i
loop
end
function Player(X#,Y#,Color#)
ink color#,0
For i=1 to 360
for j=1 to 10
dot x#+(j*cos(i/2.0)),y#-(j*sin(i/2.0))
next j
next i
endfunction
function Wrap(angle#)
if angle#>180:angle#=angle#-180.0:endif
if angle#<0:angle#=180+angle#:endif
endfunction angle#