Cannon on a hill, lobbing the shot:
distance=vx*(vy/gravity+(sqrt((vy*vy)/(gravity*gravity)-2*height/gravity)))
Steep angle shot:
<snip> vx=velocity*cos(angle)
vy=velocity*sin(angle)
time=tgt_distance/vx
height=vy*time-.5*gravity*(time*time)
Steep angle downhill shot...
Hi,
I recently wrote a text version of the old DOS Artillery Duel or Atari's Cannon Duel game. In this version, you play against the computer and can control the projectile's angle and velocity.
I'd now like to add one more dimension whereby the height of the cannons randomly changes for...
Hi,
I recently wrote a text version of the old DOS Artillery Duel (or Atari's Cannon Duel) game. In this version, you play against the computer and can control the (projectile) angle and velocity. I'd now like to add one more dimension whereby the height of the cannons randomly changes for each...