Inspiration

I am currently learning physics and wanted to make a program built around a physics concept, in this case, Kinematics. This program is aimed to help students grasp 2D constant acceleration kinematics.

What it does

The code simulates the projectile trail with user inputted parameters like muzzle velocity and shooting angle of projectile. This is the basics for cannon targeting operation.

How we built it

Used functions, GUI, and Graphics/Canvas to build the code. Calculations are done mainly in loops using physics formula. Graphics for game are made in Java Canvas.

Challenges we ran into

There were many challenges regarding Canvas/Graphics and how to use them. There was also a lot of logic involved because the default origin of the graph is in the top left, instead of the conventional bottom left, and scaling the JFrame and Canvas brought up even more challenges. Introducing delays so the projectile looks like its flying through the air created serious problems in that it always plotted the trail multiple times. Thankfully, all the bugs were resolved at last.

Accomplishments that we're proud of

The program was able to scale the graph according to how big the projectile trail was and distance of the tank. The plotting of the points mimics the real time flight trail of a projectile. The handling of frames when the program needs to close all frames and bring up a new GUI (Play Again function). Judging weather the user hit the target of not.

What we learned

I learned how to use Graphic methods, Canvas, delay, how to organize my code so its more modular., and important tricks to debug code like using well places print statements.

What's next for Tank Shooter Simulation

I could try to upload this onto the web or potentially make an app out of it.

Built With

Share this project:

Updates