Travel()
AngleDir()
spawn(0.25)
if(src)
Translate(cos(angle)*Speed,sin(angle)*Speed)
Layer()
if(round(Duration)<=0)
del src
else
Duration*=0.99
Travel()
Problem description:
When projectiles call the procedure listed above, they take up A LOT of cpu. I'm not sure of a more efficient way to handle their movement, but I know recursive calls of the proc isn't the answer.
The procedure was called 3720 times and I only fired one beam.
note: I'm also using Kaiochao's absolute positions library to translate the angles.
Proc call overhead is going to be a big deal here. Consider inlining AngleDir() and Layer().
Also, you might consider simplifying how you track duration. I'd recommend storing it in world ticks, not multiplying by a float. Simply subtracting a world tick every frame will be a lot faster. You could also store the current angle in x/y component using sin/cos when the angle is actually changed, thus meaning if the angle doesn't change, sin()/cos() don't need to be called every frame.