Simply check for lag then it works. Here's a small demonstration of what it now looks like. It works for a variety of games.
TODOs:
- Fix rotation direction on start.
- Fix problems when going for angles near 0.
- Compare by position gain towards the direction of the angle, not by the angle itself.
- Better algorithm, also check inputs around the input that is the best that had been found.
- Add quick rotate.
- Add savestating support.
- Add non-linear support, for TAStudio.
For BizHawk, N64. (Only works with games that use floating point positions and unsigned 2 byte angles).
I can't think of a good way to bruteforce the best angle. :(
I have some ideas but they don't really work.
Improved the beginning a bit (about 30 position units). Needed to delay a frame to avoid enemy attack. Lost two frames due to unavoidable lag.
Can't efficiently jump over the last enemy after boosting of the other enemy (Branch 8). Branch 7 finishes the level, but 1 frame is lost. Branch 4 has the best position gain, but it it's to far away to hit the last enemy and to close to the enemy before the boxes.