diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a3e057d7..b8b162edd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ Arcade [PyPi Release History](https://pypi.org/project/arcade/#history) page. - Added `arcade.sweep_line(start, end, sprite_list)`, which returns a `SweepInfo` for the first sprite a line hits (its `fraction`, `distance`, and surface `normal`), or `None`. It's `sweep_sprite` for a point: for lasers, hitscan weapons, or seeing what's in the way. Added the `sprite_laser_mirrors` example, where a laser bounces off rotating mirrors using the normal. ### Misc Changes +- The card game tutorial no longer passes `hit_box_algorithm="None"` to `Sprite`, an Arcade 2 argument that `Sprite` silently ignores. Its text no longer says hit box calculation is slow: loading all 52 cards with their default hit boxes takes about 40 ms. - Removed the docs build's workaround for Sphinx not copying changed CSS files (`util/sphinx_static_file_temp_fix.py` and its `.ENABLE_DEVMACHINE_SPHINX_STATIC_FIX` switch). Sphinx fixed it upstream, and the pinned Sphinx 9.1.0 copies changed CSS on incremental builds and with `make.py serve` ([#2266](https://github.com/pythonarcade/arcade/issues/2266)). - Docs fixes: - The install guide, SBC guide and contributing guide said Arcade needs Python 3.9; it needs 3.10. The release checklist now lists everywhere the minimum version appears ([#1302](https://github.com/pythonarcade/arcade/issues/1302)). diff --git a/doc/tutorials/card_game/drag_drop_cards_full.py b/doc/tutorials/card_game/drag_drop_cards_full.py index c8b72a092..8d5c90247 100644 --- a/doc/tutorials/card_game/drag_drop_cards_full.py +++ b/doc/tutorials/card_game/drag_drop_cards_full.py @@ -81,7 +81,7 @@ def __init__(self, suit, value, scale=1): # Image to use for the sprite when face up self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" self.is_face_up = False - super().__init__(FACE_DOWN_IMAGE, scale, hit_box_algorithm="None") + super().__init__(FACE_DOWN_IMAGE, scale) def face_down(self): """ Turn card face-down """ diff --git a/doc/tutorials/card_game/index.rst b/doc/tutorials/card_game/index.rst index d4acd835b..afb68587a 100644 --- a/doc/tutorials/card_game/index.rst +++ b/doc/tutorials/card_game/index.rst @@ -54,9 +54,8 @@ Next up, we'll create a card class. The card class is a subclass of :py:class:`~arcade.Sprite`. It will have attributes for the suit and value of the card, and auto-load the image for the card based on that. -We'll use the entire image as the hit box, so 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. +Arcade works out each card's hit box from its image: the outline of the card. +We'll use the hit box later to see which card the mouse clicks on. .. literalinclude:: solitaire_02.py :caption: Create card sprites diff --git a/doc/tutorials/card_game/solitaire_02.py b/doc/tutorials/card_game/solitaire_02.py index 3f0441f45..dd3f1ddfd 100644 --- a/doc/tutorials/card_game/solitaire_02.py +++ b/doc/tutorials/card_game/solitaire_02.py @@ -50,7 +50,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_03.py b/doc/tutorials/card_game/solitaire_03.py index 1363ed9f8..d83b0bffd 100644 --- a/doc/tutorials/card_game/solitaire_03.py +++ b/doc/tutorials/card_game/solitaire_03.py @@ -50,7 +50,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_04.py b/doc/tutorials/card_game/solitaire_04.py index 0f915c2c2..b695faa01 100644 --- a/doc/tutorials/card_game/solitaire_04.py +++ b/doc/tutorials/card_game/solitaire_04.py @@ -59,7 +59,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_05.py b/doc/tutorials/card_game/solitaire_05.py index 6226e0d5b..846fa28ef 100644 --- a/doc/tutorials/card_game/solitaire_05.py +++ b/doc/tutorials/card_game/solitaire_05.py @@ -59,7 +59,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_06.py b/doc/tutorials/card_game/solitaire_06.py index 733406d0b..6521dc493 100644 --- a/doc/tutorials/card_game/solitaire_06.py +++ b/doc/tutorials/card_game/solitaire_06.py @@ -60,7 +60,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_07.py b/doc/tutorials/card_game/solitaire_07.py index 3b3b959ec..940c5a4ec 100644 --- a/doc/tutorials/card_game/solitaire_07.py +++ b/doc/tutorials/card_game/solitaire_07.py @@ -79,7 +79,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_08.py b/doc/tutorials/card_game/solitaire_08.py index 3f4892ef1..9ef6866fe 100644 --- a/doc/tutorials/card_game/solitaire_08.py +++ b/doc/tutorials/card_game/solitaire_08.py @@ -79,7 +79,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_09.py b/doc/tutorials/card_game/solitaire_09.py index 10773e931..0a64b10db 100644 --- a/doc/tutorials/card_game/solitaire_09.py +++ b/doc/tutorials/card_game/solitaire_09.py @@ -79,7 +79,7 @@ def __init__(self, suit, value, scale=1): self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" # Call the parent - super().__init__(self.image_file_name, scale, hit_box_algorithm="None") + super().__init__(self.image_file_name, scale) class MyGame(arcade.Window): diff --git a/doc/tutorials/card_game/solitaire_10.py b/doc/tutorials/card_game/solitaire_10.py index caa91247e..75e238e55 100644 --- a/doc/tutorials/card_game/solitaire_10.py +++ b/doc/tutorials/card_game/solitaire_10.py @@ -81,7 +81,7 @@ def __init__(self, suit, value, scale=1): # Image to use for the sprite when face up self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" self.is_face_up = False - super().__init__(FACE_DOWN_IMAGE, scale, hit_box_algorithm="None") + super().__init__(FACE_DOWN_IMAGE, scale) def face_down(self): """ Turn card face-down """ diff --git a/doc/tutorials/card_game/solitaire_11.py b/doc/tutorials/card_game/solitaire_11.py index 132298341..5f40e6876 100644 --- a/doc/tutorials/card_game/solitaire_11.py +++ b/doc/tutorials/card_game/solitaire_11.py @@ -83,7 +83,7 @@ def __init__(self, suit, value, scale=1): # Image to use for the sprite when face up self.image_file_name = f":resources:images/cards/card{self.suit}{self.value}.png" self.is_face_up = False - super().__init__(FACE_DOWN_IMAGE, scale, hit_box_algorithm="None") + super().__init__(FACE_DOWN_IMAGE, scale) def face_down(self): """Turn card face-down"""