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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ Arcade [PyPi Release History](https://pypi.org/project/arcade/#history) page.

## Unreleased

### Breaking Changes
- Updated pyglet to 3.0.dev11 (from 3.0.dev8). Arcade's library code needed no changes (only its docs build configuration did); these mostly affect code that uses pyglet directly.
- `pyglet.graphics.ShaderProgram` now requires a `vertex_layout` keyword argument (a `pyglet.graphics.VertexLayout`, or `None` to infer it from the shader). `create_vertex_layout()` and `set_instance_attributes()` are replaced by `VertexLayout` and `get_vertex_view()`. Arcade's own shaders use `arcade.gl` and are unaffected.
- pyglet graphics resources (textures, buffers, shaders, framebuffers, ...) now have a backend `handle` and a stable `key`. The `.id` attribute is deprecated; use `.handle` for backend calls and `.key` for equality and caching. `MouseCursor.gl_drawable` was renamed to `MouseCursor.api_drawable`.
- `pyglet.gui` was rewritten around a new `UIManager`. This doesn't affect `arcade.gui`.
- Pressing Ctrl+C now stops `arcade.run()` cleanly through `pyglet.app.exit` instead of raising `KeyboardInterrupt` (except in headless mode, which uses its own loop).
- On macOS 14 and later, pyglet can now drive window redraws from the display (`pyglet.options.osx_displaylink`). Arcade schedules its own frames, so its update and draw rates are unaffected.

### Fixes
- Fixed `check_for_collision` (and the list-based collision functions) missing collisions when a sprite was flipped with a negative scale. The negative width/height cancelled out in the broad-phase distance check, so flipped sprites could pass through each other.
- Fixed `SpatialHash` queries (`get_sprites_near_sprite`, `get_sprites_near_point`, `get_sprites_near_rect`, and the collision functions that use them) adding an empty bucket for every grid cell they looked at. Memory use grew as sprites moved around large maps. Queries and adding sprites to a spatial hash are also faster, since the hit box points are now scanned once instead of four times.
Expand Down
20 changes: 7 additions & 13 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,13 @@
from util.doc_helpers.real_filesystem import copy_media


# As of pyglet==2.1.dev7, this is no longer set in pyglet/__init__.py
# because Jupyter / IPython always load Sphinx into sys.modules. See
# the following for more info:
# 1. The ticket: https://github.com/pyglet/pyglet/issues/1215
# 2. The commit: https://github.com/pyglet/pyglet/commit/97076c3a33a7d368cc9c9e44ca67769b6a16a905
sys.is_pyglet_doc_run = True

# pyglet 3.0.dev3 LibraryMock lacks __iter__/__bool__, causing crashes
# when ffmpeg codec init calls get_input_extensions() during doc builds.
# Patch before any pyglet imports trigger media codec loading.
import pyglet.lib # noqa: E402
pyglet.lib.LibraryMock.__bool__ = lambda self: False
pyglet.lib.LibraryMock.__iter__ = lambda self: iter([])
# Tell pyglet this is a documentation build, so it mocks out native
# libraries instead of loading them. As of pyglet 3.0.dev11 this is the
# PYGLET_DOC_BUILD environment variable, read when pyglet is first
# imported, so it must be set before anything imports pyglet. It replaces
# the old sys.is_pyglet_doc_run flag, and pyglet's LibraryMock now has the
# __bool__ and __iter__ methods this file used to patch in.
os.environ["PYGLET_DOC_BUILD"] = "1"

# --- Pre-processing Tasks

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
dependencies = [
"pillow>=11.3.0",
"pytiled-parser~=2.2.9",
"pyglet==3.0.dev8",
"pyglet==3.0.dev11",
]
dynamic = ["version"]

Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading