The Ultimate Site of Worms Armageddon

Worms: Armageddon => General discussion => Topic started by: Dr Abegod on May 29, 2017, 12:29 PM

Title: The BnG Calculator
Post by: Dr Abegod on May 29, 2017, 12:29 PM
So after posting in a thread on how to use maths to describe the trajectory of a zooka/nade from factors like wind strength, gravity, fire angle and so on, I tried to obtain some values for some of these factors so I could use the formulas to calculate in-game stuff.
After a few game experiments i had some values for the forces gravity and wind. These values are based on calling the maximum shooting power "100". So the power value ranges from 0 (a single tap) to 100 (holding space all the way until it fires).
Anyways, I implemented the formulas in javascript to make what i call The TI-BnG-82.
This is a calculator that calculates the distance a zook/nade travels. There are 4 parameters working here:

Power: already explained.
Angle: From 0 degrees to 180 degrees. 0 degrees is shooting flat to the right. 90 degrees is straight up. More than 90 degrees is aiming towards left.
Wind: Positive wind strength values mean to the right. Negative wind means to the left. (red or blue wind)
Δ Altitude: This is the difference in altitude. 0 means that the TI-BnG-82 will calculate how far the zook travels to reach back to the same altitude as your worm. Negative values means below your worm, positive values means above.
Low Gravity: Speaks for itself.

A positive distance output means that the zook will go to the right side of the worm, whereas a negative distance means to the left.
You can also swap left with right in respect to what i said to calculate in the opposite direction.
There is also an output of time that tells how long it takes for the projectile to travel the distance.
Here it is:
https://wormstuff.000webhostapp.com/
There's also a little drawing explaining the different parameters.

Edit: changed the description.
Title: Re: The BnG Calculator
Post by: h3oCharles on May 29, 2017, 04:06 PM
It would be nice see this visualized as well, not just raw numbers
Title: Re: The BnG Calculator
Post by: Dr Abegod on May 29, 2017, 04:25 PM
Youre right, but i dont know javascript well enough to make graphics like that. Maybe i could try if i find the time.
But anyways, I tested many of the shots on flat maps with points marking different distances, and I can assure you that this calculator is almost pixel perfect. At least with low winds.
Title: Re: The BnG Calculator
Post by: TheWalrus on May 29, 2017, 08:09 PM
another notcher is born
Title: Re: The BnG Calculator
Post by: Mablak on May 29, 2017, 08:57 PM
Cool beans. I'm not sure what the applications would be, but it could be useful for something.

One improvement you could make is inputting your angle in the form of 'position' or 'notch', since you have a discrete number of angles to aim at.

Might want to count yourself, but I think there are 132 angles, going from straight up to straight down. That is, doing 131 notches. So a user could enter notches, and you could convert to degrees to do the calculation, just multiplying by 180/131. Also just going frame by frame, I think there are 76 possible powers (including the first frame where space is detected), though judging 0-100 might make more sense in a person's head.
Title: Re: The BnG Calculator
Post by: Hurz on May 29, 2017, 11:51 PM
or, why not just let some ai do the job.
Title: Re: The BnG Calculator
Post by: Dr Abegod on May 30, 2017, 12:12 AM
*UPDATED
Okay so for some ridiculous reason I decided to spend all day trying to make a visualization of the trajectory. So it is there now. The blue ball is the worm shooting and the yellow one is where the zook/nade goes to.

@Mablak
This is more experimental fun for me rather than trying to make something really useful. Earlier I made another version that gives you the angle you should use to hit a target at a specified distance, wind, power, altitude. That version is a lot more useful i guess. Maybe I should share that too.
And thanks for the info, i wondered myself how many different angles there are. It would be pretty easy to replace notches with angle, maybe i should do that too.. :d
Title: Re: The BnG Calculator
Post by: nino on May 30, 2017, 01:59 AM
cool job, but i prefer to play bng like the criminals in rio, who hold a fuzil but dunno how to shot, it is nice to throw crazy nades and zook and see what happens xD
Title: Re: The BnG Calculator
Post by: knightz on May 30, 2017, 09:21 PM
cool job, but i prefer to play bng like the criminals in rio, who hold a fuzil but dunno how to shot, it is nice to throw crazy nades and zook and see what happens xD

uahuuha omg nino! xDDDD
Title: Re: The BnG Calculator
Post by: Gabriel on May 31, 2017, 12:15 AM
another notcher is born
cool job, but i prefer to play bng like the criminals in rio, who hold a fuzil but dunno how to shot, it is nice to throw crazy nades and zook and see what happens xD
^^^^ thissssssssssssssssssss
Title: Re: The BnG Calculator
Post by: Dr Abegod on May 31, 2017, 01:30 AM
Some of us likes to calculate
Title: Re: The BnG Calculator
Post by: Sensei on November 22, 2018, 02:55 AM
cool job, but i prefer to play bng like the criminals in rio, who hold a fuzil but dunno how to shot, it is nice to throw crazy nades and zook and see what happens xD

Preach on brother!
Title: Re: The BnG Calculator
Post by: Anubis on November 22, 2018, 11:21 AM
Didn't barman already made a spreadsheet with all the values? I remember seeing it in dt private forums. I think they were pixel perfect for all common angles.