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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ 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
- 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)).
- `ShapeElementList`'s docstring links to `pyglet.shapes`, and says "batch" where it said "back" ([#2608](https://github.com/pythonarcade/arcade/issues/2608)).
- The `gui/1_layouts` example uses the bundled Liberation Sans instead of fonts most systems don't have ([#2743](https://github.com/pythonarcade/arcade/issues/2743)).
- `create_text_sprite()` no longer warns that its sprite draws as a black box in a sprite list with a different texture atlas. That stopped being true in 4.0, when text sprites started keeping their image ([#1883](https://github.com/pythonarcade/arcade/issues/1883)).
- Sped up `arcade.draw_text()`. It no longer flushes OpenGL after every call (an unchanged call went from 76 to 15 µs), and several lines drawn in the same style each keep their own cached label instead of re-laying out one label every call (5 static lines went from 1.24 ms to 0.08 ms per frame). Any number of lines can share a style. A line whose text changes reuses its own label from the previous frame, found by the clock's tick count, instead of making a new one.
- Sped up `arcade.Text` updates. Setting a property to the value it already has no longer lays out the text again (for example `font_size`, `bold`, or `width` went from about 165 µs to under 1 µs), and a `with text:` block only lays out the text if something in it needs a new layout. An unchanged `arcade.TextPool` frame with 5 lines went from 760 µs to 6 µs.
- Added a "Drawing Text" page to the programming guide: choosing between `draw_text`, `Text`, `TextPool`, and `create_text_sprite`, what's slow and fast to change, batches, fonts (names, font files, and the bundled Kenney and Liberation fonts), and styles. Updated the text section of the performance tips, and the `draw_text` warning and docstring, which overstated how slow it is.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Check that you are using a supported version of Python. Inspect the `pyproject.t

The rest of this guide assumes you've already done the following:

1. [Installed Python 3.9+ with pip](https://wiki.python.org/moin/BeginnersGuide/Download)
1. [Installed Python 3.10+ with pip](https://wiki.python.org/moin/BeginnersGuide/Download)
2. [Installed git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
3. [Forked the repo on GitHub](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository)
4. [Cloned your fork locally](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository)
Expand Down
3 changes: 3 additions & 0 deletions RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Release Checklist

1. Check for updated libraries, and if we need to pin a more recent version.
* If the minimum Python version changed, update it everywhere: `requires-python` in `pyproject.toml`,
the version check in `arcade/__init__.py`, `doc/get_started/install.rst`,
`doc/programming_guide/gles_raspi_and_sbc.rst` and `CONTRIBUTING.md`.
2. Run `ruff arcade`
3. Run `mypy arcade`
4. In docs folder, type `make clean` then `make html` and confirm no warnings/errors.
Expand Down
3 changes: 2 additions & 1 deletion arcade/examples/gui/1_layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from arcade.gui import UIAnchorLayout, UIImage, UITextArea

arcade.resources.load_kenney_fonts()
arcade.resources.load_liberation_fonts()

DESCRIPTION = """How to place widgets on the screen?

Expand Down Expand Up @@ -105,7 +106,7 @@ def __init__(self):
text_area = ScrollableTextArea(
text=DESCRIPTION,
text_color=arcade.uicolor.WHITE_CLOUDS,
font_name=("Lato", "proxima-nova", "Helvetica Neue", "Arial", "sans-serif"),
font_name=("Liberation Sans", "Arial"),
font_size=12,
size_hint=(0.5, 0.8),
)
Expand Down
5 changes: 3 additions & 2 deletions arcade/shape_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,10 @@ def create_ellipse_filled_with_colors(
class ShapeElementList(Generic[TShape]):
"""
A ShapeElementList is a list of shapes that can be drawn together
in a back for better performance. ShapeElementLists are suited for
in a batch for better performance. ShapeElementLists are suited for
drawing a large number of shapes that are static. If you need to
move a lot of shapes it's better to use pyglet's shape system.
move a lot of shapes it's better to use pyglet's shapes
(:py:mod:`pyglet.shapes`).

Adding new shapes is fast, but removing them is slow.

Expand Down
6 changes: 2 additions & 4 deletions arcade/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,10 +1077,8 @@ def create_text_sprite(
It then creates a sprite referencing the newly created texture, and positions it
accordingly, and that is final result that is returned from the function.

If you are providing a custom texture atlas, something important to keep in mind is
that the resulting Sprite can only be added to SpriteLists which use that atlas. If
it is added to a SpriteList which uses a different atlas, you will likely just see
a black box drawn in its place.
The sprite can be added to SpriteLists that use any texture atlas, not just the one
it was drawn in.

Args:
text: Initial text to display. Can be an empty string
Expand Down
4 changes: 2 additions & 2 deletions doc/get_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Requirements
------------
Arcade requires a desktop, laptop, or compatible Single-Board Computer (SBC) with:

#. Python 3.9 or higher
#. Python 3.10 or higher
#. Graphics drivers with support for either:
* OpenGL 3.3+
* GLES 3.1+ with extensions on SBCs
Expand All @@ -30,7 +30,7 @@ unsupported.
Windows, Linux, and Intel Mac
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Your computer can likely run Arcade if it supports Python 3.9 or higher.
Your computer can likely run Arcade if it supports Python 3.10 or higher.

In general, even older convertible Windows tablets will work as long as they:

Expand Down
2 changes: 1 addition & 1 deletion doc/programming_guide/gles_raspi_and_sbc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ requirements may work.

Standard Python
^^^^^^^^^^^^^^^
Arcade 3.0.0 requires Python 3.9 or higher.
Arcade requires Python 3.10 or higher.

In practice, this means running Linux. In theory, it may be possible to run Arcade
on an ARM-specific version of Windows, but nobody has tried this before.
Expand Down
4 changes: 2 additions & 2 deletions doc/programming_guide/performance_tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ However, there are a few exceptions. These are described below, especially
with streaming audio.

.. [#]
This can be dangerous for loading graphics and sprite data due to
since OpenGL only allows one thread to touch the OpenGL context.
This can be dangerous for loading graphics and sprite data, because
OpenGL only allows one thread to touch the OpenGL context.


.. _loading_performance_sound:
Expand Down
Loading