|
Post by Abel on Jun 7, 2006 7:56:38 GMT -5
OK, A, I presume is angle but what is F and ß?
|
|
|
Post by v23gamer on Jun 7, 2006 16:50:26 GMT -5
nononono... the theta sign is angle, and... the other stuff is unknown.
p.s. search b4 u post, this formula has been questioned a lot of times
|
|
|
Post by RhinoJockey on Jun 8, 2006 14:29:49 GMT -5
v23 gamer, it's not unknown. F is the launch velocity, ß (beta) is the angle and A is the downward acceleration (caused by gravity).
The explanation is as follows. I'm writing this in the hope that someone is actually interested in this information. If you have no interest just skip to the bottom for a few examples.
TERMINOLOGY: Mine is a bit different from omniscience's: V = launch velocity (in Gunbound your shooting power) Vx = vertical component of V Vy = horizontal component of V ß = shooting angle g = vertical acceleration caused by gravity (9.8m/s^2 on our planet. Not in Gunbound tho.) t = time R = range I think everyone saw a basic coordinate system in school. y is horizontal (height) and x is vertical (range). I chose upward as positive direction for y.
Okay, let's state our problem precisely: We want to know how far the shot goes in its flight time. We can seperate the horizontal (x) from vertical movement (y) so the calculation isn't that difficult.
To calculate how far the shot can travel in a given time, the obvious first step is to determine how much time it's in the air (duh). If you throw something in the air it will need as much time to reach the peak height as it needs to fall down again. So we basically take the time the gravity needs to overcome the vertical velocity and double it:
t = 2 * Vy / g (The airtime only changes with gravity and a different vertical launch velocity (Vy). This is why there's no Vx in the equation. It doesn't matter for the airtime.)
Now that we have the airtime, calculating the range is a piece of cake. We just multiply the horizontal velocity at launch with the airtime:
R = Vx * t
Guess what? That's all and it's exactly the same formula as the omniscience one. Don't see it? Let's put it together. One thing is still missing: because we usually only have the launch angle given, we need to calculate Vx and Vy first. Vx = V*cos(ß) and Vy = V*sin(ß).
Put our two equations together and we get this: R = 2 * Vx * Vy / g Let's put in V*cos(ß) and V*sin(ß) for Vx and Vy: R = 2 * V^2 * cos(ß) * sin(ß) / g
There is just one last step we can take to simplify the formula. 2*cos(ß)*sin(ß) is identical to sin(2ß). So we get: R = V^2 * sin(2ß) / g.
There you go. We just arrived at omniscience's formula. This might seem difficult to understand. But actually it's simple... just stick with it if you're interested.
EXAMPLES: So, how do we use it? Let's say we're playing Mage and use angle 80 to fire a half power (2 bar) shot:
Remember the formula: R = V^2 * sin(2*ß) / g
V = 200 (I use pixels on the powerbar to express power. 400 = full power) ß = 80 (our angle) g = 70.1 (approximate acceleration due to gravity for Mage)
We just substitute the variables and enter it into a calculator to get the result:
200^2*sin(2*80)/70.1 = 195
So we will hit 195 pixels away from our target. That's about 1/4 screen (screen width in gunbound is 800).
Two more examples:
angle 70, power 2.95 = 295^2*sin(2*70)/70.1 = 798 (full screen) angle 60, power 1.75 = 175^2*sin(2*60)/70.1 = 378 (almost half screen)
|
|
|
Post by v23gamer on Jun 8, 2006 16:37:03 GMT -5
ohh thanks rhino,
but what is the gravity for all mobiles?
|
|
|
Post by RhinoJockey on Jun 8, 2006 18:10:45 GMT -5
I'm not going to give them out because I also got them from someone else and only adjusted some.
Btw, remember that the formula omniscience posted doesn't take wind into account. With wind it's slightly more complicated. I'd have posted more about that but... the post was already long enough...
|
|
|
Post by CreeDo on Mar 17, 2007 21:46:49 GMT -5
I won't give out gravity for all bots either, I'm a little less 'sharing' when it comes to formulas like this cuz they are perfect and cannot be used by humans, only calculators/aimbots. But a good gravity to start with is 98.
|
|
|
Post by wolfeattehkitty on Jun 17, 2007 9:38:04 GMT -5
Thanks this helped me to a point all i have to do is find the gravitys then i can use my c++ program i made from this formula to make formulas. That is aimed at RhinoJockey.
|
|