-
Member
Seeking Navigation Algorithms and Smooth Movement Techniques for Non-API Game Bots
Hey there! I’m a master’s degree holder in Computer Science specializing in Deep Learning models. I’m currently working on developing a bot that operates differently from typical pixel-reading or memory-leak-based bots (and I’m not relying on any API). At the moment, I’m focused on creating a navigation system, and I’ve made some progress. Specifically, I’ve had early successes in detecting my character’s location in games like Genshin Impact and World of Warcraft, even within instances.
Now, I’m facing a significant challenge: traveling from point X to point Y. To clarify, imagine there’s a straight line between these two points. Here’s what I’m working with:
+What I don’t have access to: The WoW API or instant rotation capabilities.
+What I do have access to: The current location (with a small margin of error), the current angle (with a small margin of error), and movement inputs like WASD, QE, and mouse controls.
The problem I’m encountering is that my bot struggles to rotate the character accurately. It often overshoots or undershoots the correct angle, making movement unreliable and unstable.
If you have experience in this field, I’d love your insights on two points:
1-How can I handle navigation and movement effectively without relying on APIs? Any algorithms, methods, or references would be highly appreciated.
2-Are there any techniques for making movement smoother, so the character doesn’t just travel in straight lines but mimics more natural player-like behavior?
Feel free to reach out to me—I’m new to this platform and would be excited to connect with experienced individuals. Have a great day!
-
Member
A* ?????????????????? filler
-
Active Member
1 - How can I handle navigation and movement effectively without relying on APIs? Any algorithms, methods, or references would be highly appreciated.
First, you need to define your current coordinates and your destination — let's say orig(x, y) and dest(x, y). Then, use a function like atan2(dest.y - orig.y, dest.x - orig.x) to calculate the angle between your position and the target.
Once you have the angle, determine the necessary rotation speed. For example, in WoW, the character takes about 2 seconds to complete a full 360-degree turn (2π radians). With this, you can simulate turning by pressing the rotation keys (e.g., A or D) for a calculated duration in milliseconds, depending on the desired angle.
After facing the target, you press the forward key (typically W) to move toward it. If real-time coordinates aren't available, you can use an "inertial" navigation system — similar to missile guidance — by tracking your rotation angles and movement duration to estimate your position and determine when you've arrived.
Distance between two points can be calculated using the Euclidean formula:
distance = sqrt((x2 - x1)^2 + (y2 - y1)^2)
The angle to the target (in radians) is obtained via:
angle = atan2(y2 - y1, x2 - x1)
Knowing your walking speed, you can estimate how long to press W to reach the target.
If your system doesn’t give you direct access to your current facing angle, you can estimate it through triangulation — using variations in distances over time — but this approach is significantly more complex.
2 - Are there any techniques for making movement smoother, so the character doesn’t just travel in straight lines but mimics more natural player-like behavior?
To make movement feel more natural, don’t rotate all at once and then move. Instead, recalculate the target angle every 1–2 seconds during movement, and apply gradual adjustments to the facing direction. This compensates for drift and small deviations in real-time.
A major improvement in realism is to stop thinking in "turn-then-move" steps. Instead, start rotating slightly before reaching a waypoint, gradually transitioning toward the next direction. This results in smooth, arc-like trajectories, mimicking the way real players move — rather than robotic, jagged patterns.
-
Post Thanks / Like - 1 Thanks
harmana (1 members gave Thanks to Humbleguy for this useful post)