Skip to content

🎨 Palette: [UX improvement]#21

Open
aidasofialily-cmd wants to merge 3 commits intomainfrom
palette-ux-improvement-9347732607293225067
Open

🎨 Palette: [UX improvement]#21
aidasofialily-cmd wants to merge 3 commits intomainfrom
palette-ux-improvement-9347732607293225067

Conversation

@aidasofialily-cmd
Copy link
Owner

💡 What: This PR enhances the SPEED CLICKER game with several micro-UX improvements focused on visual feedback and responsiveness.

  • Added ANSI colors: Bold Green for score, Bold Red/Blue for game modes, and Bold Yellow for instructions.
  • Refactored the game loop to use poll() with dynamic timeouts, ensuring instantaneous response to user input.
  • Centralized UI rendering using \r and std::flush for clean, in-place score updates.

🎯 Why: The previous version lacked immediate visual feedback upon clicking and used a busy-wait loop that was less responsive. The monochrome output also made it harder to distinguish between game states at a glance.

📸 Before/After:

  • Before: Plain text output, UI only updated every 100ms/1000ms, mode toggles printed new lines.
  • After: Vibrant, colored UI that updates instantly when the user clicks or toggles modes, with all score updates happening on a single line.

Accessibility: Uses high-contrast bold ANSI colors to highlight critical game information like the current score and active speed mode.


PR created automatically by Jules for task 9347732607293225067 started by @aidasofialily-cmd

- Added ANSI color coding for score, modes, and instructions.
- Centralized UI rendering into a dedicated function for consistency.
- Implemented immediate UI updates on user keypress for better tactile feedback.
- Replaced sleep-based loop with reactive poll() and dynamic timeouts for efficiency and responsiveness.

Co-authored-by: aidasofialily-cmd <247843425+aidasofialily-cmd@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Added ANSI color coding for score, modes, and instructions.
- Centralized UI rendering for consistency.
- Implemented immediate UI updates on keypress for better tactile feedback.
- Replaced sleep-based loop with reactive poll() for efficiency.
- Fixed misconfigured GitHub Actions workflow (switched from Rust to C++).
- Added `test` target to Makefile and removed unused `Cargo.toml`.

Co-authored-by: aidasofialily-cmd <247843425+aidasofialily-cmd@users.noreply.github.com>
Copy link
Owner Author

@aidasofialily-cmd aidasofialily-cmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fix the Github actions Errors.

- Added ANSI color coding for score, modes, and instructions.
- Centralized UI rendering for consistency.
- Implemented immediate UI updates on keypress for better tactile feedback.
- Replaced sleep-based loop with reactive poll() for efficiency.
- Fixed misconfigured GitHub Actions workflow (switched from Rust to C++).
- Added `test` target to Makefile and removed unused `Cargo.toml`.

Co-authored-by: aidasofialily-cmd <247843425+aidasofialily-cmd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant