Since this is a open problems topic, here are some problems that are in need to be solved to get my bot working.
1. Calculating the best (X;Y) positions on the analoag stick for a given angle and a given minimum radius.
The analog stick only having one byte range in each direction makes this a problem, we can only get a rough aproximation to the needed input angle. The method in my current script is:
Language: lua
InputAngle = ((FollowAngle - CamAngle - 90) % 360)
X = math.floor(math.cos(InputAngle)*Radius+0.5)
Y = math.floor(math.sin(InputAngle)*Radius+0.5)
It calculates the input angle depending on the angle the character should follow and the current camera angle, then it calculates the closest (X;Y) positions for the anaolg stick by rounding it. But it isn't the best solution as I will show in an example.
Let's say the angle the follow angle is 100°, the camera angle is 12.78° and the radius is 127 (That is the radius for calculating, not the minimum radius that is possible to get max speed, the game Chameleon Kid, which I used for testing has a minimum radius of ~70, which is good).
The optimal input angle will be 357.22, which is not possible to get, because the calculated analog stick position will be (127; -6) and this is an input angle of 357.295124 (close but it goes better). After trying several combinations it's possible to get something better, in my script there's a routine which does that, but it's bruteforcing by rotating around the found position.
(X;Y): input angle
(-6;126): 357.2737
(-6; 125): 357.2516
(-6; 124): 357.2298
(-6; 123): 357.2073
...
(-5; 103): 357.2208
Now (-5; 103) is the closest that occured, but it has a really low radius, but again it depends on the game and it's minimum radius, if it was Chameleon Kid it was fine.
So the question is can the best analog stick position actually calcualted without brute-forcing?
2. At a given analog stick position and a given minimum radius, what is the next analog stick position that gives the next greater/smaller input angle and how can it be calculated.
This is something for games or sections that don't have a rotating camera. It isn't just one right, left, up or down. Look at the example above. The next possible angle from 357.2298 would be 357.2208, which is 1 up and 20 to the left.
Again calculating the analog stick position, not bruteforcing it.
3. Preventing walking in the wrong direction.
Let's say the player want to walk at 145°, but the script only gives an analog stick position that is slightly bigger than 145°, so the player essentially end up walking in a the wrong direction. So it's needed to keep track of the distance between the perfect movement vector and the actual position of the player, basically "zig-zaging" around this perfect movement vector is needed to accomplish this.
How can this be done?
4. Rotate the coordinate system, so that there's an axis that is the player position on that axis depending on the angle the player wants to follow( and another axis that is not interesting).
This is something to give the TASer a better visualisation of what's happening and better comparing of their work.
Here's a picture of what I mean:
I already tried to solve all these on my own, but didn't accomplished much.