-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GH-1054] Bots movement improvement #1055
Conversation
apps/bot_manager/lib/utils.ex
Outdated
def get_distance_and_direction_to_positions(base_position, end_position) do | ||
%{x: x, y: y} = Vector.sub(end_position, base_position) | ||
|
||
distance = :math.sqrt(:math.pow(x, 2) + :math.pow(y, 2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the distance function that you just created in apps/bot_manager/lib/math/vector.ex
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
position_to_move_to: nil, | ||
time_amount_to_change_position: 2000, | ||
last_time_position_changed: 0, | ||
max_vision_range_to_follow_player: 1500, | ||
vision_range_to_attack_player: 1200, | ||
stuck_in_position: nil, | ||
start_time_stuck_in_position: nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create an issue to remove these magic numbers to make them parametrizable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #1067
Motivation
The randomness of the movements led our bots walking near the externall walls, now they will move through positions around the map and also they will be able to track players
Closes #1054
Summary of changes
How to test it?
Play with the bots and leave a feedback about their behavior!
Checklist