Comments
A projectile motion simulator in a 3D environment.
Controls:
Adjust launch angle: UP/DOWN arrow keys
Adjust range marker: LEFT/RIGHT arrow keys
Fire cannon: SPACEBAR
Pan/Tilt camera: mouse right click and drag
Reset game: Keyboard "r"
Notes:
A new initial velocity (in m/s) will be randomly selected before each new cannon ball is fired. You must use this given velocity to calculate your trajectories.
You are limited to 10 cannon balls per game, and each shot will "cost" 50 points against your score. The best scores will be achieved when there are no misses.
The red blocks are "bombs" and can do extra damage to the nearby structures if you can manage to set them off by hitting them with a projectile.
The "range marker" is intended to be used like a tape measure to determine the range to a target. The reading given on the panel indicating the range measurement is the distance between the "0" post and the movable post. The "0" post is aligned with the cannon, and indicates the initial launch point.
Note that the cannon does not swivel to its left and right, and so this simulation is effectively a 2D projectile motion simulator; thus, the math for the trajectories can make that assumption (as long as the projectiles are in flight from the muzzle).
Note that this simulation is a modification of code and resources originally created by Bastiaan Olij:
YouTube: https://www.youtube.com/BastiaanOlij
Twitter: https://twitter.com/mux213