Skip to content

arcraiderstats: add 2x resolution support#408

Merged
tavdog merged 4 commits intotronbyt:mainfrom
ChrisNourse:arcraiderstats/2x-support
Mar 16, 2026
Merged

arcraiderstats: add 2x resolution support#408
tavdog merged 4 commits intotronbyt:mainfrom
ChrisNourse:arcraiderstats/2x-support

Conversation

@ChrisNourse
Copy link
Contributor

@ChrisNourse ChrisNourse commented Mar 16, 2026

Summary

  • Add 2x resolution support with canvas-aware rendering (SCALE factor, dynamic screen dimensions)
  • Use resolution-appropriate fonts: 6x10 (header) and terminus-12 (events) at 2x
  • Unify all event row fonts (map, event name, timer) to use the same FONT_EVENT at both resolutions for visual consistency — this intentionally changes the 1x map name font from tom-thumb to CG-pixel-3x5-mono to match the other event rows
  • Add ArcRaidersTitle@2x.webp logo and 2x preview image
  • Add runtime exception for cold-cache HTTP fetch timing
  • Fix README refresh rate to match manifest (10 minutes, not 10 seconds)
  • Change timer text to camel case ("Ends In")

Test plan

  • pixlet lint passes
  • pixlet check passes (with 3s runtime exception)
  • pixlet format passes
  • Verified 1x rendering (64x32) — event rows now use unified font
  • Verified 2x rendering (128x64) with correct font sizing and layout
  • Test on 2x device

🤖 Generated with Claude Code

Chris Nourse and others added 2 commits March 15, 2026 18:54
- Add canvas-aware rendering with SCALE factor for all dimensions
- Use 6x10 (header) and terminus-12 (events) fonts at 2x resolution
- Add ArcRaidersTitle@2x.webp logo asset (128x16, nearest-neighbor upscale)
- Add 2x preview image
- Add supports2x: true to manifest
- Add runtime exception for cold-cache HTTP fetch timing
- Change timer text to camel case ("Ends In")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update recommended interval from 10 seconds to 10 minutes to match
the manifest's recommendedInterval of 600 seconds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ChrisNourse ChrisNourse requested a review from tavdog as a code owner March 16, 2026 01:55
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the arcraiderstats application by introducing comprehensive 2x resolution support. The changes ensure that the application dynamically adapts its rendering, including screen dimensions, scaling factors, and font choices, to provide an optimized visual experience on higher-resolution displays. Additionally, it includes minor fixes for documentation accuracy and text formatting, alongside a necessary adjustment for runtime checks.

Highlights

  • 2x Resolution Support: Implemented full 2x resolution support with canvas-aware rendering, dynamically adjusting screen dimensions and scaling.
  • Font and Asset Updates: Introduced resolution-appropriate fonts (6x10 for header, terminus-12 for events at 2x) and added a dedicated ArcRaidersTitle@2x.webp logo.
  • Runtime Exception Handling: Added a runtime exception for arcraiderstats to accommodate cold-cache HTTP fetch timing during checks.
  • README and Text Refinements: Corrected the README's refresh rate to 10 minutes and updated timer text to "Ends In" (camel case).
  • Manifest Configuration: Updated manifest.yaml to declare supports2x: true and added a relevant tag.
Changelog
  • .github/scripts/check-apps.sh
    • Added a 3-second runtime exception for arcraiderstats to prevent timeouts during cold-cache HTTP fetches.
  • apps/arcraiderstats/README.md
    • Corrected the recommended refresh rate from 10 seconds to 10 minutes to align with the application's manifest.
  • apps/arcraiderstats/arc_raiders_stats.star
    • Implemented resolution-aware loading for the application logo, supporting both 1x and 2x assets.
    • Integrated canvas module for dynamic screen dimension and resolution detection.
    • Introduced a SCALE factor and updated various display constants (SCREEN_WIDTH, SCREEN_HEIGHT, PLAYER_COUNT_HEIGHT, EVENT_CONTENT_HEIGHT, CHAR_WIDTH) to be resolution-dependent.
    • Defined resolution-specific fonts (FONT_HEADER, FONT_EVENT) for improved readability at different scales.
    • Modified the format_time_adaptive function to use "Ends In" and "Ended" for timer text, improving consistency.
    • Adjusted padding and animation calculations to correctly scale with the display resolution.
    • Updated render_event_content to use resolution-aware row heights, padding, and the new FONT_EVENT.
    • Applied resolution scaling to header padding and font in build_header.
    • Scaled the header height calculation in render_display.
    • Halved the animation frame delay for 2x resolution to maintain perceived speed.
    • Adjusted padding and font for message display in render_display to be resolution-aware.
  • apps/arcraiderstats/manifest.yaml
    • Added supports2x: true to indicate compatibility with 2x resolution displays.
    • Included a new tag "wide 2x support" for better categorization.
Activity
  • pixlet lint passed successfully.
  • pixlet check passed, with a 3-second runtime exception configured for this app.
  • pixlet format passed successfully.
  • Verified that 1x rendering (64x32) remained unchanged.
  • Verified 2x rendering (128x64) displayed with correct font sizing and layout.
  • The pull request was generated using Claude Code.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively adds 2x resolution support to the arcraiderstats app by introducing resolution-aware constants, fonts, and assets. The changes are well-structured and correctly apply scaling to maintain visual consistency between resolutions. I've identified a minor issue where the font for the map name in 1x resolution is unintentionally changed, which contradicts the PR's goal of leaving 1x rendering unaffected. A suggestion to fix this has been provided.

Comment on lines +537 to +540
# Row 0: Map name (white, tom-thumb)
map_text = get_event_row_text(event, 0, frame, animation_start_time, timeline_entry["scroll_in_start"], horizontal_scroll_speed)
row_y = vertical_y + 0
content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_TOM_THUMB, COLOR_WHITE))
content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_EVENT, COLOR_WHITE))
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using FONT_EVENT for the map name changes its font for 1x rendering from tom-thumb to CG-pixel-3x5-mono. This contradicts the PR description which states that 1x rendering is unchanged. Additionally, the comment on line 537 is now inaccurate as it still refers to tom-thumb.

To maintain the original 1x appearance, consider using FONT_HEADER, which is defined as "6x10" if canvas.is2x() else "tom-thumb". This would be appropriate for the map name text.

Suggested change
# Row 0: Map name (white, tom-thumb)
map_text = get_event_row_text(event, 0, frame, animation_start_time, timeline_entry["scroll_in_start"], horizontal_scroll_speed)
row_y = vertical_y + 0
content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_TOM_THUMB, COLOR_WHITE))
content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_EVENT, COLOR_WHITE))
# Row 0: Map name (white)
map_text = get_event_row_text(event, 0, frame, animation_start_time, timeline_entry["scroll_in_start"], horizontal_scroll_speed)
row_y = vertical_y + 0
content_children.append(render_positioned_text(map_text, row_x, row_y, FONT_HEADER, COLOR_WHITE))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch on the stale comment — fixed in 9d9b882.

However, the font change itself is intentional. All three event rows (map, event name, timer) were unified to use the same FONT_EVENT for visual consistency. Using FONT_HEADER for the map name would make it noticeably larger than the other event rows, which we specifically wanted to avoid. The PR description has been updated to clarify this intent.

Chris Nourse and others added 2 commits March 15, 2026 19:04
Font names are now resolution-dependent via FONT_EVENT constant,
so inline font references in comments were stale and misleading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tavdog tavdog merged commit 3ee9d99 into tronbyt:main Mar 16, 2026
1 check passed
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.

2 participants