Request name: Parabolic Aiming Routine
Type: etc. (probably shared routine patch)
Short description: It will give projectile proper velocity that will soon hit the target.
Resources: subroutine that may benefit further sprites, or bosses. (such as hammer badass that will always get you)
Links: -
Long description:
There are three parabolic aim methods.
parameter descriptions:
x,y are relative coordinates. the origin(0,0) is position of the shooter.
G is the gravitational acceleration.
p,θ is initial speed, and angle for projectile.
1. Parabolic aim with given specific time
- This subroutine wil receive x,y,t (t stands for time) and set x speed and y speed to the projectile. (can be optimized)
The projectile will hit the target after t frames.
2. Parabolic aim with given specific power (initial speed)
- This subroutine will receive x,y,and p. and return x, y speed.
The projectile will shoot the target with given initial speed.
However, You must check the square root part not to be negative, because
the target can be out of range and when it is negative is the case.
3. Parabolic aim with minimum power (my favorite)
- This subroutine will simply receive x, and y. and return x, y speed.
The projectile will be the slowest when launched.
4. Forget about this one.
It is about horizontal gravitation (possibly wind) and I don't think that will be used a lot.
I have already solved for the formula. What I request is just convert this into SMW compatible ASM code.
Receiving?