Finding power for any shot with KS Calc, or OMFG CHEAT for short 
Finding power for any shot with KS Calc, or OMFG CHEAT for short 
H3LLBane 
Jan 18 2007, 06:24 AM
Post
#1

A Little Chick Group: Members Posts: 40 Joined: 12January 07 Member No.: 82 IGN: FusionBlaz3 Guild: Viper Main: Kal/Ice 
Credits to creedo, i'm merely reposting his previous post.
Link : http://hci.edu.sg/~y05hci264/ks_calc.zip QUOTE When you change numbers in the formula, it updates automatically with your answer in the little window on the right. What this formula does: If you give it any desired angle, and any desired distance, it will spit out the exact power you need to make the shot. For example, let's say you have no idea what ice's 1 screen shot with angle 45 is.... just plug in the number for 1 screen distance, and the desired angle of 45, and it will spit out an answer of 2.24. The formula that you copy and paste into KS Calc is: 4*Sqrt((98*800*1.00)/(4*Sqr(230)*Sin(Rad(2*70)))) See the number 800? That's the distance number, in pixels. One screen is 800, half screen is 400, 2 screens 1600, etc. At the end of the formula is the number 70... that's the angle. You can change that to anything you want. So after pasting the formula into KScalc, Just highlight the 800 and type in any distance you want, and highlight the 70 and type any angle that you want... and on the right will be the power level you need. Obviously if the power level shown is over 4 bars, you're trying an impossible shot (like try calculating power for 1 screen using angle 89 and it will tell you that you need 12 bars of power :P This info is for a bot with Turtle's shot weight... but you can adjust it for other bots also. To do that, change the bot's "gravity" and "shot speed" numbers. The gravity number is the "98" at the front of the formula. The shot speed is the "230" further on. Shot weights and gravities are below CODE MOBILE SPEED GRAVITY Armor 230 98 Mage 225 90 Nak Machine 205 98 Trico 215 98 Big Foot 210 98 Boomer 175 46 Raon Launcher 220 98 Lightning 235 90 J.D. 250 98 A. Sate 225 98 Ice 250 98 Turtle 230 98 Grub 250 98 Aduka 240 94 Knight 250 90 Dragon 240 98 J.Frog 280 98 Kalsiddon 240 98 Now you can start making formula sheets of your own and enjoy fruit of your labour  
geLid 
Jan 18 2007, 08:14 AM
Post
#2

And from the ashes we can build another day Group: Members Posts: 210 Joined: 11January 07 From: Dis Member No.: 38 IGN: geLid Guild: Chronos Main: Turtle/Kal/Raon 
yay. im glad someone finally reposted this. thanks.
i had a question about it, now i won't have to figure it out the hard way... What is "Rad" in the formula, and what exactly is it doing? I'm assuming it's radians but I was trying to manipulate the formula and didn't know how I should approach it...  
VanPike 
Jan 18 2007, 09:13 AM
Post
#3

Double Silver Axe Group: Members Posts: 428 Joined: 11January 07 Member No.: 56 Main: Turtle,Ice Clan: The Alcoholic Stoners 
someone show me where i can get KS calc?
 Polish and Proud. 
ANBU 
Jan 18 2007, 10:55 AM
Post
#4

What is love?Love is playing every game like it's your last Group: Members Posts: 3,013 Joined: 11January 07 From: Brampton, Ontario, Canada Member No.: 42 GBNA: Main: Turtle Clan: The ACES of ACES 

CreeDo 
Jan 18 2007, 03:52 PM
Post
#5

R U TEH GUY WHO HAS THAT SITE Group: Retired Staff Posts: 327 Joined: 11January 07 Member No.: 30 IGN: CreeDo Main: Turtle 
if that link dies it's also at:
http://creedo.gbglhq.com/ks_calc.zip and yeah, rad changes something to radians. Copped from wikipedia: "In calculus, angles must be represented in radians in trigonometric functions, to make identities and results as simple and natural as possible." If you wanted to manipulate it, you can invert things the old fashioned way, algebraically. 4*Sqrt((98*dist*1.00)/(4*Sqr(230)*Sin(Rad(2*angle)))) = power divide both sides by 4: Sqrt((98*dist*1.00)/(4*Sqr(230)*Sin(Rad(2*angle)))) = (power/4) square both sides to get rid of the sqrt: (98*dist*1.00)/(4*Sqr(230)*Sin(Rad(2*angle))) = (power/4)^2 multiply both sides by all the crap after 98*dist (remove the 1.00): 98*dist = (4*Sqr(230)*Sin(Rad(2*angle))) * ((power/4)^2) divide both sides by 98: dist = ((4*Sqr(230)*Sin(Rad(2*angle))) * ((power/4)^2))/98 Bam, you got the distance. Getting the angle is a little trickier. The function to algebraically invert the "sin" is arcsin, but kscalc doesn't take arcsin. MS Excel does though. They just write sqrt differently (with the t at the end). You can also write sin(big long formula)^1 to get rid of the sin I think. To get the angle from radians to degrees multiply by pi/180 ..about 0.01745  
geLid 
Jan 18 2007, 08:23 PM
Post
#6

And from the ashes we can build another day Group: Members Posts: 210 Joined: 11January 07 From: Dis Member No.: 38 IGN: geLid Guild: Chronos Main: Turtle/Kal/Raon 
thanks creedo <3
 
H3LLBane 
Jan 19 2007, 03:55 AM
Post
#7

A Little Chick Group: Members Posts: 40 Joined: 12January 07 Member No.: 82 IGN: FusionBlaz3 Guild: Viper Main: Kal/Ice 
LOL Creedo, i don't get a word of what you said, i learnt trigo and algerbra, but its the basic stuff lol.
 
CreeDo 
Jan 19 2007, 04:14 PM
Post
#8

R U TEH GUY WHO HAS THAT SITE Group: Retired Staff Posts: 327 Joined: 11January 07 Member No.: 30 IGN: CreeDo Main: Turtle 
I didn't know this stuff either until I got into gunbound, it's kinda funny... I knew it'd never be useful for me, but I didn't guess it'd be useful for something useless like a video game.
 
hellic 
Jan 19 2007, 04:16 PM
Post
#9

Mess with the head, and you'll get the shaft! Group: Members Posts: 2,974 Joined: 10January 07 From: Near Chicago, IL Member No.: 3 IGN: hellic (Steam) 
Now you have to use calculus to calculate tornado shots :O
 Nothing here to see.

H3LLBane 
Jan 19 2007, 06:35 PM
Post
#10

A Little Chick Group: Members Posts: 40 Joined: 12January 07 Member No.: 82 IGN: FusionBlaz3 Guild: Viper Main: Kal/Ice 
Tornado shots are more of feel to me lol. If it enters the nado early, lower power, entering it late would mean more power, and thats with a high angle.
 
mezz 
Feb 7 2007, 06:27 PM
Post
#11

Red Dragon Group: Administrators Posts: 1,911 Joined: 10January 07 From: Northern California Member No.: 5 IGN: mezz Guild: nS`T Main: Trico, Turtle Clan: Da Hobo Crew 
Is this correct? (where the underscore stands for "in ______ units"
Does anyone have mauve's original parametric shot formula? It's not in the wayback machine and all the old forum archive is inaccessible to me.  
hellic 
Feb 7 2007, 06:30 PM
Post
#12

Mess with the head, and you'll get the shaft! Group: Members Posts: 2,974 Joined: 10January 07 From: Near Chicago, IL Member No.: 3 IGN: hellic (Steam) 
I derived this formula myself...and it's perfect (factors in wind too!).
airtime = 20*sqr(15*(sin(angle)*xdistcos(angle)*ydist))/(sqr(16(cos(angle)*sin(wind_degree)sin(angle)*cos(wind_degree))*wind_strength15*cos(angle)*mobile_gravity)) power=(2*ydist*800+4*mobile_gravity*airtime^24*wind_strength*(2/1.875))*sin(wind_degree)*airtime^2)/(2*airtime*shot_speed*sin(angle))  Nothing here to see.

mezz 
Feb 7 2007, 06:35 PM
Post
#13

Red Dragon Group: Administrators Posts: 1,911 Joined: 10January 07 From: Northern California Member No.: 5 IGN: mezz Guild: nS`T Main: Trico, Turtle Clan: Da Hobo Crew 
Yeah hellic I got the same thing, actually. Not entirely sure how good it is to post it =/
Thanks for that though, mine is a bit too messy.  
hellic 
Feb 7 2007, 06:38 PM
Post
#14

Mess with the head, and you'll get the shaft! Group: Members Posts: 2,974 Joined: 10January 07 From: Near Chicago, IL Member No.: 3 IGN: hellic (Steam) 
Oh, trust me, it works fine ;D
I've had it for a while, but someone asked for a formula on the Softnyx Canada forum today, so I might as well paste it here too :X  Nothing here to see.

LOL RIXXY 
Feb 7 2007, 06:39 PM
Post
#15

A Little Chick Group: Banned Posts: 10 Joined: 6February 07 Member No.: 239 
good luck squarerooting a negative number to get workable figures, faggot

mezz 
Feb 7 2007, 06:40 PM
Post
#16

Red Dragon Group: Administrators Posts: 1,911 Joined: 10January 07 From: Northern California Member No.: 5 IGN: mezz Guild: nS`T Main: Trico, Turtle Clan: Da Hobo Crew 
good luck squarerooting a negative number to get workable figures, faggot lmfao. On closer look and as a clarification mine is similar, but not the same. XD Rixxy's right hellic. Unless the rest of your thing comes out negative somehow. If it does you can reverse the order and get rid of the negative  
hellic 
Feb 7 2007, 06:50 PM
Post
#17

Mess with the head, and you'll get the shaft! Group: Members Posts: 2,974 Joined: 10January 07 From: Near Chicago, IL Member No.: 3 IGN: hellic (Steam) 
Try the whole airtime formula with angle=70, both wind power and degree=0, y distance=0, and x distance=1/2 on Degree mode.
It works.  Nothing here to see.

mauverick 
Feb 7 2007, 07:08 PM
Post
#18

Internet hate machine Group: Members Posts: 544 Joined: 11January 07 From: Next to cows, Washington Member No.: 31 IGN: mauvecow Main: Buffalo++ 
Parametric:
CODE x = cos(angle)*power*mobile_power_multiplier*time + (1/2)*horizontal_wind*time*time y = sin(angle)*power*mobile_power_multiplier*time + (1/2)*(vertical_wind + mobile_gravity)*time*time This is easily integrated via calculus, where the shot's speed at a given time is: CODE x' = cos(angle)*power*mobile_power_multiplier + horizontal_wind*time y' = sin(angle)*power*mobile_power_multiplier + (vertical_wind + mobile_gravity)*time To change from a parametric equation, simply substitute the other equation for time and integrate. 
mezz 
Feb 7 2007, 07:09 PM
Post
#19

Red Dragon Group: Administrators Posts: 1,911 Joined: 10January 07 From: Northern California Member No.: 5 IGN: mezz Guild: nS`T Main: Trico, Turtle Clan: Da Hobo Crew 
It works, but you can replace
sqr(15*(sin(angle)*xdistcos(angle)*ydist)) with sqr(15*(cos(angle)*ydistsin(angle)*xdist)) I guess EDIT: Thanks mauve :D Makes a lot more sense now, years later, because I've actually learned some calculus xD EDIT: My parametric graphs are coming out looking like glorified y=x^2 that just goes up forever. Isn't it supposed to look like an upside down quadratic, going through the origin and comes back down to y=0 as T get larger? I think I may have the wrong idea of mobile_power_multiplier... but I tried a few (positive) values and haven't gotten what I'm looking for EDIT: CODE y = sin(angle)*power*mobile_power_multiplier*time  (1/2)*(vertical_wind + mobile_gravity)*time*time This seems to give me what I'm looking for, but I'm not sure it's accurate. I made the 2nd part subtracted, instead of added which makes sense to me given that it's gravity.  
mauverick 
Feb 7 2007, 08:19 PM
Post
#20

Internet hate machine Group: Members Posts: 544 Joined: 11January 07 From: Next to cows, Washington Member No.: 31 IGN: mauvecow Main: Buffalo++ 
As I'm trying to avoid debugging some particularly painful shit right now, I'll fix that algorithm for you.
Since the goal here is to solve for power given a certain constant angle, distance, and height, then we get rid of the parametric formula and solve. CODE T = time P = power M = mobile power multiplier G = gravity H = horizontal wind V = vertical wind 0 = (H/2)T^2 + cos(A)PM T  x 0 = ((V+G)/2)T^2 + sin(A)PM T  y Apply quadratic formula to the second formula. The first will have H as a divisor, and will have no quadratic solution unless horizontal wind exists. CODE T = sin(A)PM (+/) sqrt(sin^2(A)P^2M^2 + 2(V+G)y) / (V+G) Of the two solutions for time, we only want the one with the negative solution. The positive result comes back with T = 0 as the solution for y = 0, and we don't want that. CODE T = sin(A)PM  sqrt(sin^2(A)P^2M^2 + 2(V+G)y) / (V+G) T^2 = (sin^2(A)P^2M^2 + sin(A)PMsqrt(sin^2(A)P^2M^2 + 2(V+G)y) + sin^2(A)P^2M^2 + 2(V+G)y)/((V+G)^2) T^2 = (2sin^2(A)P^2M^2 + sin(A)PMsqrt(sin^2(A)P^2M^2 + 2(V+G)y) + 2(V+G)y)/((V+G)^2) If that isn't making your eyes bleed yet, now we substitute. CODE 0 = (H/2)(2sin^2(A)P^2M^2 + sin(A)PMsqrt(sin^2(A)P^2M^2 + 2(V+G)y) + 2(V+G)y)/((V+G)^2) + cos(A)PM(sin(A)PM  sqrt(sin^2(A)P^2M^2 + 2(V+G)y) / (V+G))  x If y = 0, then the solution is substantially simplified. CODE 0 = (3Hsin^2(A)P^2M^2/(2(V+G)^2)  (2cos(A)sin(A)P^2M^2 / (V+G))  x 2cos(A)sin(A) = sin(2A) 0 = (3Hsin^2(A)P^2M^2/(2(V+G)^2)  (sin(2A)P^2M^2 / (V+G))  x Solve for P. CODE P^2( (3Hsin^2(A)M^2/(2(V+G)^2)  (sin(2A)M^2 / (V+G)) ) = x P^2( (3Hsin^2(A)M^2/(2(V+G)^2)  (2(V+G)sin(2A)M^2 / 2(V+G)^2) ) = x P^2( (3Hsin^2(A)M^2  2(V+G)sin(2A)M^2) / 2(V+G)^2) = x P = sqrt( 2 x (V+G)^2 / (3Hsin^2(A)M^2  2(V+G)sin(2A)M^2)) [edit:typed this one wrong before] If V and H = 0, then: CODE P = sqrt( x (G^2) / Gsin(2A)M^2 ) P = sqrt( x G / sin(2A)M^2 ) Does this look familiar? Because it should. Why is sin(2A) negative, you might be wondering? Because angle, by default, goes downwards. Just negate your angle and you get the correct solution. CODE P = sqrt( x G / sin(2A)M^2 ) P = sqrt( x G / sin(2A)M^2 ) I might have made a mistake somewhere, it's rather hairy looking. Solving the remaining problems, including the state of y =/= 0 is left as a problem to the rest of you. 
LoFi Version  Time is now: 22nd February 2020  04:18 PM 