block by joyrexus 11220109

Bullet trajectories

Full Screen

Click or tap to fire an artillery shell. Hold to fire multiple shots.

The trajectory is calculated and plotted based on the firing angle, gravity, and initial bullet velocity.

Notes

All code here is taken straight from the Game Mechanic Explorer, a collection of concrete examples for various game mechanics, algorithms, and effects. The examples are all implemented in JavaScript using the Phaser game framework, but the concepts and methods are general and can be adapted to any engine.

index.html