Try this. I wrote it a couple of weeks ago.
`prijectile simulation by Ric.
Rem Created: 31/07/2004 04:10:01
sync on
hide mouse
`make ball
make object sphere 1,3
`make launcher
make object box 2,24,4,4
position camera 0,200,140,-300
`restart point
restart:
undim xs(0)
undim ys(0)
n=0
`define variables
`number of bounces
bounce=0 `leave this alone
`position of ball x,y,z
x#=0
y#=0
z#=0
`resultant velocity of ball
v#=1.2 `set this to whatever you like, and
`adjust camera position accordingly.
`velocity x,y,z - leave these alone
vx#=0
vy#=0
vz#=0
`acceleration x,y,z
ax#=0 `(deceleration due to air resistance - leave at zero)
ay#=0.004 `(deceleration due to gravity)
az#=0 `(acceleration due to cross wind/hook/slice.
` Set - for right, + for left, between 0 and about 0.01)
`lift amount
lift#=0.04 `set bigger for more backspin,
`lower for less backspin.
`air resistance
ar#=0.003 `(set between 0 and about 0.003 - bigger if there
`is more headwind, but < 0.001 for trailing wind.)
`intitial trajectory
traj#=25 `leave this alone
`set initial positions
position object 1,0,0,0
position object 2,0,0,0
`main loop
do
`set trajectory of ball using arrow keys
if upkey()=1 then traj#=traj#+1
if downkey()=1 then traj#=traj#-1
zrotate object 2, traj#+10
`apply trajectory to initial velocity
vx#=v#*cos(traj#) `(horizontal velocity)
vy#=v#*sin(traj#) `(vertical velocity)
`check for ball being launched
if spacekey()=1 then gosub hitball
sync
loop
hitball:
do
x#=x#+vx# `increase x position by velocity amount
ax#=vx#*ar# `deceleration is proportional to air resistance
vx#=vx#-ax# `decrease velocity by deceleration amount
y#=y#+vy# `increase y position by velocity amount
vy#=vy#-ay# `decrease velocity by deceleration due to gravity
vy#=vy#+lift# `increase vertical velocity by lift amount
lift#=lift#*0.95 `decrease lift exponentially
z#=z#+vz# `change z position by velocity amount
vz#=vz#+az# `increase velocity by acceleration due to crosswind/slice/hook
`move ball
position object 1,x#,y#,z#
`leave trail
dim xs(n)
dim ys(n)
xs(n)=(object screen X(1))
ys(n)=(object screen Y(1))
for d=0 to n
dx=(xs(d))
dy=(ys(d))
dot dx,dy
next d
n=n+1
`bounce when ball hits the ground
if y#<0
y#=1
vy#=vy#*-0.4 `increase for harder surface, decrease for soft surface
bounce=bounce+1
if bounce>5 then goto restart
endif
sync
loop
You can alter pretty much any factor I could think of which would affect projectile motion - but for a bullet you'll probably want to get rid of lift (usually due to backspin of a ball). Obviously you can change the camera angle to make it first person if you want.