Forums
March 29, 2024, 02:35 PM

Author Topic: The BnG Calculator  (Read 2103 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr Abegod

The BnG Calculator
« 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.
« Last Edit: May 29, 2017, 04:16 PM by Dr Abegod »

Offline h3oCharles

Re: The BnG Calculator
« Reply #1 on: May 29, 2017, 04:06 PM »
It would be nice see this visualized as well, not just raw numbers

Offline Dr Abegod

Re: The BnG Calculator
« Reply #2 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.

Online TheWalrus

Re: The BnG Calculator
« Reply #3 on: May 29, 2017, 08:09 PM »
another notcher is born

Re: The BnG Calculator
« Reply #4 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.

Offline Hurz

Re: The BnG Calculator
« Reply #5 on: May 29, 2017, 11:51 PM »
or, why not just let some ai do the job.

Offline Dr Abegod

Re: The BnG Calculator
« Reply #6 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

Offline nino

Re: The BnG Calculator
« Reply #7 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
You Are Losing Time Reading my Signature.

Offline knightz

Re: The BnG Calculator
« Reply #8 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


Oh, Yeah!

Offline Gabriel

  • Slacker is a queefer
  • Hero Member
  • *****

  • Chile Chile
  • Posts: 1,102
  • Might come back later idk
    • View Profile
Re: The BnG Calculator
« Reply #9 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
Mole shopper is the worst thing in the world.

Offline Dr Abegod

Re: The BnG Calculator
« Reply #10 on: May 31, 2017, 01:30 AM »
Some of us likes to calculate

Online Sensei

Re: The BnG Calculator
« Reply #11 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!

Offline Anubis

Re: The BnG Calculator
« Reply #12 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.