Improve latency tracking and chapter detection#13
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR improves the Rush Royale bot's responsiveness and chapter detection reliability. The changes reduce action latency by decreasing the default delay between actions and add OCR-based fallback for detecting chapter headers when template matching fails.
- Reduced default action delay from 100ms to 50ms for better responsiveness
- Added OCR-based fallback to locate chapter headers, specifically addressing Chapter 5 detection issues
- Enhanced latency tracking by exposing the last screenshot-to-action timing for real-time UI monitoring
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
Src/ocr_utils.py |
Adds new find_chapter_headers() function for OCR-based chapter detection |
Src/latency.py |
Adds tracking and getter for last screenshot-to-action latency measurement |
Src/gui.py |
Updates latency display to include the most recent timing measurement |
Src/bot_core.py |
Reduces default sleep delay and integrates OCR fallback for chapter detection |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
python -m py_compile $(git ls-files '*.py')https://chatgpt.com/codex/tasks/task_e_6897f5b70f48832fa0b30fff1bcc7695