Repository navigation
Drop the ignored hit_box_algorithm="None" from the card game tutorial - #2953
Merged
Merged
Conversation
The card game tutorial passed hit_box_algorithm="None" to Sprite in 11 files. That was Arcade 2's way to use a rectangle instead of computing a hit box, but Sprite now takes the hit box from its texture and silently ignores the argument. The text explaining it said hit box calculation was slow; all 52 cards load with their default hit boxes in about 40 ms. Removed in place, so the tutorial's line numbers don't move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pvcraven
force-pushed
the
docs/card-game-hit-box
branch
from
October 8, 2026 18:22
8827353 to
b004c90
Compare
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
The card game tutorial passed
hit_box_algorithm="None"toSpritein 11 files:That was Arcade 2's way to use the whole image as the hit box instead of calculating one (it was added in 2021 for #814).
Spritenow takes its hit box from the texture and accepts**kwargswithout checking them, so the argument has silently done nothing. Found while triaging issues; there was no issue for it.Changes
The 11 files: the argument is removed from each line. Every edit is on the same line, so the tutorial's line-numbered includes still match.
The tutorial text: it said "we don't need to go through the time consuming hit box calculation. Therefore we turn that off. Otherwise loading the sprites would take a long time." That's no longer true:
The paragraph now says Arcade works out each card's hit box from its image, and that the tutorial uses it later to find the card the mouse clicks on (
get_sprites_at_point).Not changed
Spritestill silently ignores keyword arguments it doesn't know, which is how this went unnoticed. Making it warn or raise would change behavior for subclasses and user code, so that's a separate decision.Checks
solitaire_02,solitaire_07,solitaire_11anddrag_drop_cards_fullrun.index.rst.The changelog has an entry under Unreleased → Misc Changes.
🤖 Generated with Claude Code