Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/drag_drop_cards_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down
5 changes: 2 additions & 3 deletions doc/tutorials/card_game/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_03.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_04.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_06.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_07.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_08.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_09.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_10.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/card_game/solitaire_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
Loading