Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: increase speed for small, and decrease speed for big bots (#121)
## How does this PR impact the user? https://github.com/user-attachments/assets/81bbe3a7-d674-49f4-b877-1c3518309d5e https://github.com/user-attachments/assets/2619b75c-ebc0-4a05-88bf-50a87c83fa05 ## Description This PR introduces a method to dynamically calculate a bot's maximum movement distance (`maxBotMoveDistance`) based on its radius. Instead of relying on a fixed movement distance, the calculation now considers the bot's size using the new `getMaxBotMoveDistance` method. Key changes: 1. **New parameters**: - `moveDistanceChangePow`: Introduced to define the scaling power for movement distance (set to 0.45). - Increased `maxMoveDistance` from 2 to 9 for greater flexibility. 2. **New method**: - `getMaxBotMoveDistance(radius: number)`: Calculates the maximum movement distance for a bot using its radius, ensuring proportional scaling. 3. **Movement logic update**: - Movement checks now use the dynamically calculated `maxBotMoveDistance` instead of a static value. - Updated calls to `computeClosestXYWithinDistance` to use the calculated value for more precise movement. These updates provide more realistic and size-dependent movement for bots. ## Limitations - The PR does not include passing the calculated speed to the "step" ## Checklist - [x] My PR is focused and contains one holistic change. - [x] I have added screenshots or screen recordings to show the changes. --------- Co-authored-by: landerix <[email protected]> Co-authored-by: Yurij Mikhalevich <[email protected]>
- Loading branch information