XIM Community

App: Ballistic Curve Generator and Viewer  (Read 11961 times)

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
App: Ballistic Curve Generator and Viewer
« on: 06:44 AM - 11/17/13 »
https://googledrive.com/host/0B8EFYcEZMa4deTNOUjM2OTlKTVU/ximballisticcurvetool.html


Hi everyone, I've made another new tool to help people make ballistic curves and browse other users' curves.  The most obvious use of this tool is you can plug in ballistic curves that other people post and it will show you the curve in your browser without having to start up the XIM software. (simply enter it in the XIM ballistic code box and press the button).  The images can also be downloaded by clicking the icon in the upper right, or hosted on imgur and pasted into a forum post by clicking the button on the bottom.

More in-depth, it helps authors quickly generate new curves, and compute points with mathematical precision based on various algorithms, instead of painstakingly moving them around by hand.  Authors will do this by picking a couple points that they want their curve to pass through (specified as a value from 0-1 on each of the X and Y axis).  They can then choose from various functions with parameters how to fill in the space between.  For now there are just a few functions supported.  If people like the tool, I will continue to add more functionality later.

So for example, you can enter the following:

Code: [Select]
20
0.2 0.3 lineardeceleration 0.4
0.7 0.8 linear
1 1 lineardeceleration 0.6

-

15
0.3 0.3 linearacceleration 3
1 1 linear

Try it out and see what happens.  Basically, for Hip aiming we have created a simple boost curve for pushing past auto-aim, using linear deceleration curves at the bottom and top to smooth it out.  For ADS aiming, we are using a linear acceleration curve to slow down the aim when making fine movements, with a linear top-end for snap aiming.

The first line sets the Hip sensitivity to 20.  This doesn't affect the curves, it's simply for the generated XIM ballistics code.  The next line starts with "0.2 0.3", saying we wish to move through the point 20% along the X axis and 30% up the Y-axis.  This is followed by "logarithmic", stating the type of curve we wish to use to get to that point, along with a parameter specific to logarithmic curves.  Different functions will take different types and numbers of parameters.  The next line connects us to the point "0.7 0.8" with a straight line.  And the third line finishes off by reaching the top right corner of the graph.

The two empty lines with the "-" in between them separate the ADS section, which works the same way.

You can also put "copy" by itself on a line right after the ADS sensitivity line to have it simply use the same curve as the Hip curve.

When specifying points, you can enter "?" as the Y coordinate.  When doing so, the tool will calculate the curve that would have led to the previous point, then extend it to the new X coordinate and use the Y coordinate that would have naturally resulted.  This should not be used on the first point.

Currently the following functions are supported:

linear - connect two points with a straight line, no parameters

linearacceleration - use a linear acceleration curve, 1 parameter (must be >0).  The sensitivity at the endpoint is fixed, and the parameter indicates what the factor of sensitivity rampup from start to end to reach it was.  For example a factor of 2 will add twice the starting sensitivity from beginning to end, so the sensitivity at the end of the range will be triple the start.

lineardeceleration - use a linear deceleration curve, 1 parameter (must be >0).  The sensitivity at the endpoint is fixed, and the parameter indicates what the factor of sensitivity lowering from start to end to reach it was.  For example a factor of 2 will start at an additional twice the ending sensitivity, so the sensitivity at the end of the range will be triple at the start.

logarithmic - a logarithmic curve, 1 parameter (must be >0) indicating the domain range that should be set to match the endpoint (higher values will make for a steeper start, lower values will make the curve straighter)

exponential - an exponential growth curve, 1 parameter (must be >0) indicating the domain range that should be set to match the endpoing (higher values will make for a steeper start, lower values will make the curve straighter)

The three parameters are designed so that if you operate on a region twice as wide, you should double the parameter to achieve a similar curve nature.  So looking at the example script, the parameter was raised by 50% for the second deceleration section, because that section covers an area 50% wider, resulting in similar curves.

Curve generation will also create a save link to come back to your work, and forum code to post the results, as will viewing of xim-pasted curves.  Following either method, if you want to add images of the graphs to the forum code, you can do so by clicking the button at the bottom of the page.  This takes some time, wait until it automatically selects the text to let you know it is complete.

I make no promises about what might happen if you enter weird things (incorrect parameters, points out of order or out of bounds or not reaching the end, etc).  Suggestions on what to work on next or bug reports are welcome.
« Last Edit: 08:36 PM - 12/04/13 by MuKen »

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
Re: A tool for authors and users of ballistic curves
« Reply #1 on: 06:45 AM - 11/17/13 »
CHANGELOG

11/25/2013
- Slightly shrunk image size so graphs remain side-by-side when quoted
- Fixed various typos
- Fixed so forum post is automatically generated when loading from generated links

11/28/2013
- Happy Thanksgiving! (I amuse myself during family get togethers by hacking at messy javascript code)
- Added point by point display and editting of raw curve values
- Added sensitivity to graph images

12/1/2013
- Added point editting by clicking on the graphs
- Sped up graph rendering

12/4/2013
- Added linear deceleration curve functionality
- Fixed problem with generated links not automatically opening graphs
- Rearranged layout
« Last Edit: 08:37 PM - 12/04/13 by MuKen »

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
Re: App: Ballistic Curve Generator and Viewer
« Reply #2 on: 06:31 PM - 11/24/13 »
To-Do list (suggestions welcome):

- Expand graph generation code language to include specific point manipulation
- Alternate graph that shows points as a ratio compared to default line and allows modifying them as such
- Function to automatically correct curves that don't end in the upper right corner
- Organize instructions better
« Last Edit: 09:29 PM - 12/14/13 by MuKen »

Offline Cg13

  • Member
  • *
  • Posts: 118
    • View Profile
Re: App: Ballistic Curve Generator and Viewer
« Reply #3 on: 04:21 PM - 12/07/13 »
This is pretty cool!  Looks like you put some time into it.  It easier than clicking each dot and dragging. 

I like higher sensitivity the more I move the mouse, but delicate aiming can always be turned down a bit.  Sort of like the ADS curve you had,  experimenting with a. Few I created, will let you know how it turns out!

Thanks for all your hard work.

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
Re: App: Ballistic Curve Generator and Viewer
« Reply #4 on: 10:14 PM - 12/07/13 »
Thanks! Let me know if you see anything that can be improved.

Offline abc123

  • MVP
  • *
  • Posts: 2944
  • It's as easy as ABC 123
    • View Profile
    • unofficial xim api cloud for configs
  • Gamertag: Dr Donkey Kong
Re: App: Ballistic Curve Generator and Viewer
« Reply #5 on: 03:10 AM - 12/28/13 »
Hey, I was looking over the app (nice by the way).  I see you have a ton of javascript because you are using jQuery to do all the heavy lifting of the UI/UX.  Can I recommend switching it to knockout?  it makes things a ton easier.  If you'd like I can switch it then link you to it.

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
Re: App: Ballistic Curve Generator and Viewer
« Reply #6 on: 12:32 AM - 12/29/13 »
Thanks!

I'm not that familiar with the differences between the two (I learned javascript while writing this), would using knockout change the appearance of the page, or is it mostly a code cleanliness difference?

Offline abc123

  • MVP
  • *
  • Posts: 2944
  • It's as easy as ABC 123
    • View Profile
    • unofficial xim api cloud for configs
  • Gamertag: Dr Donkey Kong
Re: App: Ballistic Curve Generator and Viewer
« Reply #7 on: 03:49 PM - 01/06/14 »
Thanks!

I'm not that familiar with the differences between the two (I learned javascript while writing this), would using knockout change the appearance of the page, or is it mostly a code cleanliness difference?

it allows the page to update immediately as values are being entered because everything is bound to real variables.  The appearance can be improved using bootstrap, knockout would make the page more responsive and less javascript

Offline abc123

  • MVP
  • *
  • Posts: 2944
  • It's as easy as ABC 123
    • View Profile
    • unofficial xim api cloud for configs
  • Gamertag: Dr Donkey Kong
Re: App: Ballistic Curve Generator and Viewer
« Reply #8 on: 01:35 PM - 02/22/14 »
@Muken I'd love to help you update this to work on the XIM4E/XIM4 as well as maintain the older XIM's.

Send me a PM if you want and i'll give you my direct contact information.

I love this tool and how awesome it is.

Offline abc123

  • MVP
  • *
  • Posts: 2944
  • It's as easy as ABC 123
    • View Profile
    • unofficial xim api cloud for configs
  • Gamertag: Dr Donkey Kong
Re: App: Ballistic Curve Generator and Viewer
« Reply #9 on: 12:30 AM - 02/25/14 »
https://drive.google.com/file/d/0B6C-9JYX8twBdFpUUWlFWnI0cTA/edit?usp=sharing

I hope you don't mind but i've been working on updating your current code and moving to XIM4E i've included a link to the index.htm file i've been writing this is all your code currently, soon i'll be updating it for XIM4

Offline ak-xs

  • MVP
  • *
  • Posts: 6442
  • I'm what you call a player of non sens xD
    • View Profile
    • don't click here!
Re: App: Ballistic Curve Generator and Viewer
« Reply #10 on: 10:04 AM - 02/25/14 »
thanks you 2 (Muken and abc) ! great stuff, very handy and i say this as a person who rarely uses Ballistics.
soon..

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
Re: App: Ballistic Curve Generator and Viewer
« Reply #11 on: 08:56 PM - 02/25/14 »
Hey abc, sorry I totally didn't notice your post before, I've been a little busy with schoolwork lately.  I have a bunch of new features planned for the tool for the near future (most importantly, a limited form of wysiwyg editting for the curves), but unfortunately haven't started the XIM 4 beta yet so I don't fully know the new code format.  I'm planning on moving forward with a new tool to put in the Xim4 forum when its ready, leaving this one in its current state here as an older version.

If you'd be willing to help make a new tool for Xim4, I'd certainly appreciate it and will attribute you accordingly ;)

Offline abc123

  • MVP
  • *
  • Posts: 2944
  • It's as easy as ABC 123
    • View Profile
    • unofficial xim api cloud for configs
  • Gamertag: Dr Donkey Kong
Re: App: Ballistic Curve Generator and Viewer
« Reply #12 on: 11:38 PM - 02/25/14 »
Hey abc, sorry I totally didn't notice your post before, I've been a little busy with schoolwork lately.  I have a bunch of new features planned for the tool for the near future (most importantly, a limited form of wysiwyg editting for the curves), but unfortunately haven't started the XIM 4 beta yet so I don't fully know the new code format.  I'm planning on moving forward with a new tool to put in the Xim4 forum when its ready, leaving this one in its current state here as an older version.

If you'd be willing to help make a new tool for Xim4, I'd certainly appreciate it and will attribute you accordingly ;)

my newest code which is still available at that above link works for both edge and xim4.  i'm still bug fixing but it's two separate tabs.  Let me know if you like it or not, i've been coding on it in boredom.

the new code is simple:

Code: [Select]
>>> XIM Edge Ballistics START Paste >>>
XEBH:010000070D141B21282F353C43495058626D7B8EA4C8DC05
XEBA:010000070D141B21282F353C43495058626D7B8EA4C8DC05
<<< XIM Edge Ballistics END Paste   <<<

Code: [Select]
>>> XIM4 START Paste >>>
X4MB:0000070D141B21282F353C43495058626D7B8EA4C8
<<< XIM4 END   Paste <<<

Each ballistic curve is separate now, and they removed the first two characters '01' and the last 4 hex characters because they don't do sensitivity anymore.  it is also only to 100 now so you have to divide by 2, it's pretty easy stuff taking from where you left off.

Let me know, once again if you want to get into direct contact i'd be happy to work with you.  I think moving from the ground up would be the best idea, especially since I can just host it on one of my domains.

Offline MuKen

  • Member
  • *
  • Posts: 173
    • View Profile
Re: App: Ballistic Curve Generator and Viewer
« Reply #13 on: 03:02 PM - 02/27/14 »
Update:  Thanks for the explanation abc123.  There's a new version of the tool up for the Xim4 now

http://www.xim3.com/community/index.php?topic=31309.0

It also includes a new visual editting mode.


Admin