Amplitude and Frequencies of Shots


#1

Rubs Hands

I’m excited about this category… this is where the real fun is going to be. For like a small subset of people


Whats the Problem?

Recently I have been working on a boss which I plan to XML. We have some cool tools out there for making shot pattern, such as Pfiffle’s DPS Calculator, which also has tools for designing shot patterns.

If you are interested in XML or Ideas in general you will know that almost all waving projectiles use a Sine wave with varying amplitudes and frequencies. Anyone who has tried to make monster projectiles using Pfiffle’s calculator will also know that the area can be too small at times, which is a problem visualising our shots.

What do we do?

With some maths, an a graphing calculator, we can figure out how the path of shots is calculated.

So what I figured out is that the game calculates a wave from 0 to 2π and then stretches this wave out to the range that it supposed to be. I’ll save you the hair pulling that occurred when I couldn’t match things up to Pfiffle. But it turns out the equations for the lines will look like this:



f = frequency
a = amplitude
R = range

0 < x < R

Interactive Example

Here is a link to a graph I made with Desmos. Simply put in your values for f, a and R, and it will spit out a pfiffle-esc shot path. RotMG Shot Pattern Calculator. I think that this will be better than Pfiffle’s Calculator when calculating shot patterns for bosses as it can extend past the hard edges.


Good Luck with your XML endeavours!


#2

Wat?

y = { sin[x * f / ( R / 2 * pi ) ] } * a

I’m guessing that’s the equation?


#3

Oh right, it’s just black text so it isn’t going to work on dark mode… I’ll fix this when I get home


#4

Ahh ok