You can grab pre-release versions from PyPi. See the available versions from the Arcade PyPi Release History page.
Version 3.0.0 is a major update to Arcade. It breaks compatibility with the 2.6 API.
These are the breaking API changes. Use this as a quick reference for updating 2.6 code. You can find more details in later sections. Lots of behavior has changed even if the interface hasn't. If you are porting old code, read through these logs thoroughly.
-
Dropped Python 3.8 support completely.
-
Texture management has completely changed in 3.0. In the past, we cached everything, which caused issues for larger projects that needed memory management. Functions like
Arcade.load_texture
no longer cache textures. -
Removed the poorly named
Window.set_viewport
andset_viewport
methods.Camera2D
has completely superseded their functionality. -
Fixed
ArcadeContext
assuming that the projection and view matrices were aligned to the xy-plane and Orthographic. It is now safe to use full 3D matrices with Arcade. -
The
Sprite
initializer has been simplified. It's no longer possible to slice or transform textures through parameters in the sprite initializer. Use theTexture
class to manipulate the sprite's texture. It supports transforms like rotating, scaling, flipping, and slicing. -
Sprite.angle
has changed to clockwise. -
Sprite.on_update
has been removed. UseSprite.update
instead. It has adelta_time
parameter and accepts both*args
and**kwargs
to support custom parameters. The same applies toSpriteList
. -
Sprite.draw
has been removed. Use eitherarcade.draw.draw_sprite
or anarcade.SpriteList
. -
Removed
Sprite.face_point
andSprite.collision_radius
. -
The deprecated
update()
function has been removed from thearcade.Window
,arcade.View
,arcade.Section
, andarcade.SectionManager
classes. Instead, please use thearcade.Window.on_update()
function. It works the same as theupdate
function but has a "delta_time" parameter, which holds the time in seconds since the last update. -
The
update_rate
parameter ofarcade.Window
can no longer be set toNone
. It previously defaulted to1 / 60
but could be set toNone
. The default is still the same, but setting it to None will not do anything. -
Sprites created from the
~arcade.tilemap.TileMap
class would previously set a key in theSprite.properties
dictionary namedtype
. This key has been renamed to "class " in keeping with Tiled renaming the key. -
The
arcade.text_pillow
andarcade.text_pyglet
modules have been completely removed. The Pillow implementation is gone, and the Pyglet version has been renamedarcade.text
. -
Due to the above change.
arcade.create_text_sprite
has been reworked to use the Pyglet-based text system. It has no API-breaking changes, but the underlying functionality has changed drastically. It may be worth rechecking the docs if you use this function. The main concern is if you are using a customarcade.TextureAtlas
. -
Buffered shapes (shape list items) have been moved to their sub-module.
-
The
use_spatial_hash
parameter forSpriteList
andTileMap
is now abool
instead ofOptional[bool]
-
arcade.draw_text()
andarcade.text.Text
arguments have changed.x
andy
have replacedstart_x
andstart_y
.align
no longer interferes withmultiline
. -
Moved or removed items from
arcade.util
:- Removed:
arcade.util.generate_uuid_from_kwargs
arcade.util._Vec2
:- This was an internal class as indicated by the
_
prefix - It was an old version of pyglet's
pyglet.math.Vec2
- Arcade code now uses
pyglet.math.Vec2
directly
- This was an internal class as indicated by the
- Moved to
arcade.math
:arcade.util.rand_in_circle
is now:- located at
arcade.math.rand_in_circle
- better at returning an even distribution of points PR2426 (remove any
math.sqrt
wrapping it)
- located at
arcade.util.rand_on_circle
is nowarcade.math.rand_on_circle
arcade.util.lerp
is now:- located at
arcade.math.lerp
- compatible with any type which implements numerical
+
,-
, and*
operators- NOTE: lerping vectors may be more efficient when using dedicated functions and methods:
- When lerping
pylget.math.Vec2
, use one of:pyglet.math.Vec2
's built inlerp
methodarcade.math.lerp_2d
for generaltuple
compatibility
- When lerping
pylget.math.Vec3
, use one of:pyglet.math.Vec3
's built inlerp
methodarcade.math.lerp_2d
for generaltuple
compatibility
- When lerping
- NOTE: lerping vectors may be more efficient when using dedicated functions and methods:
- located at
arcade.util.lerp_vec
is nowarcade.math.lerp_2d
arcade.util.rand_in_rect
is nowarcade.math.rand_in_rect
arcade.util.rand_on_line
is nowarcade.math.rand_on_line
arcade.util.rand_angle_360_deg
is nowarcade.math.rand_angle_360_deg
arcade.util.rand_angle_spread_deg
is nowarcade.math.rand_angle_spread_deg
arcade.util.rand_spread_deg
is nowarcade.math.rand_spread_deg
arcade.util.rand_magnitude
is nowarcade.math.rand_magnitude
- Removed:
-
GUI
- Removed
arcade.gui.widgets.UIWrapper
. It is now a part ofarcade.gui.widgets.UILayout
. - Removed
arcade.gui.widgets.UIBorder
. It is now a part ofarcade.gui.widgets.UIWidget
. - Removed
arcade.gui.widgets.UIPadding
. It is now a part ofarcade.gui.widgets.UIWidget
. - Removed
arcade.gui.widgets.UITexturePane
. It is now a part ofarcade.gui.widgets.UIWidget
. - Removed
arcade.gui.widgets.UIAnchorWidget
has been replaced byarcade.gui.widgets.UIAnchorLayout
.
- Removed
-
Resources
- Removed unused resources from
resources/gui_basic_assets
.items/shield_gold.png
items/sword_gold.png
slider_thumb.png
slider_track.png
toggle/switch_green.png
toggle/switch_red.png
- Removed unused resources from
-
The texture atlas has been heavily reworked to be more efficient.
-
Alpha blending (handling of transparency) is no longer globally enabled but instead enabled when needed. draw functions and objects like
SpriteList
andShapeElementList
have new arguments to toggle blending states. Blending states are now reset after drawing. -
Arcade now supports OpenGL ES 3.1/3.2 and has been tested on the Raspberry Pi 4 and 5. Any model using the Cortex-A72 or Cortex-A76 CPU should work. Use images from 2024 or later for best results.
-
Arcade now supports freely mixing Pyglet and Arcade code. You can now freely use Pyglet batches and Labels when preferred over Arcade's types. Note that texture/image handling is still a separate system.
-
A fully functioning 2D camera allows for moving, rotating, and zooming and works with Arcade and Pyglet.
-
Added a new
GLOBAL_CLOCK
andGLOBAL_FIXED_CLOCK
accessable fromarcade.clock
. which provides global access to elapsed time, number of frames, and the last delta_time.
- Removed the
update
function in favor ofarcade.Window.on_update()
. - The
update_rate
parameter in the constructor can no longer be set toNone
and must be a float. - A new
draw_rate
parameter inarcade.Window.__init__
, controls the call interval ofarcade.Window.on_draw(). It is now possible to separate the draw and update speeds of Arcade windows. Keeping
draw_rateclose to the refresh rate of the user's monitor while setting
update_rate` to a much shorter interval can greatly improve the perceived smoothness of your application. open_window()
now accepts**kwargs
to pass additional parameters to thearcade.Window
constructor.arcade.View
- Removal of the
update
function in favor ofarcade.View.on_update()
.
- Removal of the
arcade.Section
andarcade.SectionManager
- Removal of the
update
function in favor ofarcade.Section.on_update()
.
- Removal of the
- Added a whole new
on_fixed_update
method, which is called with a regular delta time- Is also available for
arcade. View
. - Control the rate of fixed updates with the
fixed_rate
. parameter inWindow.__init__
. - Control the max number of fixed updates per regular update with the
fixed_rate_cap
parameter inWindow.__init__
.
- Is also available for
- See the updated event loop docs for an in-depth explanation of
on_fixed_update
vs.on_update
.
- Created
arcade.camera.Camera2D
, which allows for easy manipulation of Arcade and Pyglet's rendering matrices. - Created
arcade.camera.PerspectiveProjector
andarcade.camera.OrthographicProjector
. Which can manipulate the matrices in 3D space. - Created methods to rotate and move cameras.
- Created methods to generate view and projection matrices needed by projector objects.
- Created static projector classes to set the matrices with constant values.
- Added a default camera that automatically adjusts to the active render target.
- Added a camera shake object that makes adding a camera shake to a game easy.
- All
Projector
classes provide methods to project to and from the screen and world coordinates.
arcade.load_texture
has been simplified to load the entire image. Usearcade.load_spritesheet
to use better versions of the old arguments.arcade.get_default_texture
andarcade.get_default_image
are new methods to givearcade.Sprite
their default texture.- Added
sync_texture_image
to theDefaultTextureAtlas
method to sync the texture in the atlas back into the internal pillow image in thearcade.Texture
. - DefaultTextureAtlas: Added
get_texture_image
method to get pixel data of a texture in the atlas as a pillow image.
-
arcade.gui.widgets.UIWidget
- Supports padding, border, and background (color or texture).
- Visibility: visible=False will prevent widget rendering. It will also not receive any UI events.
- Dropped
arcade.gui.widget.UIWidget.with_space_around
. UIWidget.with_
methods no longer wrap the widget. They only change the attributes.- Fixed a blending issue when rendering the GUI surface to the screen.
- Now supports nine-patch background textures.
- General performance improvements.
- Some attributes were removed from the public interface; use
UIWidget.with_
methods instead.UIWidget.border_width
UIWidget.border_color
UIWidget.bg_color
UIWidget.bg_texture
UIWidget.padding_top
UIWidget.padding_right
UIWidget.padding_bottom
UIWidget.padding_left
- Update and add example code.
- Iterable (providing direct children)
-
Updated widgets
arcade.gui.widgets.text.UIInputText
emits anon_change
event.arcade.gui.widgets.slider.UITextureSlider
texture names changed to fit the naming pattern.
-
New widgets:
arcade.gui.widgets.dropdown.UIDropdown
arcade.gui.widgets.image.UIImage
arcade.gui.widgets.slider.UISlider
arcade.gui.widgets.constructs.UIButtonRow
(PR1580)
-
arcade.gui.UIInteractiveWidget
only reacts to left mouse button events. -
Arcade
arcade.gui.property.Property
:- Properties are observable attributes (supports primitive, list, and dict). A Listener can be bound with
arcade.gui.property.bind
.
- Properties are observable attributes (supports primitive, list, and dict). A Listener can be bound with
-
All
arcade.gui.UILayout
s now supportsize_hint
,size_hint_min
, andsize_hint_max
.arcade.gui.UIBoxLayout
arcade.gui.UIAnchorLayout
Arcade.gui.UIGridLayout
PR1478
-
Added color-consistent assets to
arcade.resources.gui_basic_assets
. -
Provide GUI-friendly color constants in
arcade.uicolor
. -
Replace deprecated usage of
arcade.draw_text
.
- Added a
Rect
type, making working with axis-aligned rectangles easy.- Provides functions to create a full
Rect
object from four values. - Provides methods to move and scale the
Rect
. - Provides methods to compare against the
Rect
with 2D points and otherRects
.
- Provides functions to create a full
- Added
AnchorPoint
helpers and aliases forVec2
s in the range (0 - 1). - Added several helper methods for creating
Rect
objects.LRBT(left, right, bottom, top)
LBWH(left, bottom, width, height)
XYWH(x, y, width, height, anchor = AnchorPoint.CENTER)
XYRR(center_x, center_y, half_width, half_height)
(this is mostly used for GL.)Viewport(left, bottom, width, height)
(where all inputs areint
s.)
- Several properties in the library now return a
Rect
:Window.rect
BasicSprite.rect
OrthographicProjectionData.rect
UIWidget.rect
Section.rect
- The drawing functions
draw_rect_filled()
anddraw_rect_outline()
can be used to draw aRect
directly.
arcade.experimental
has been split into two submodules,experimental
andfuture
.future
includes all incomplete features we intend to include in Arcade eventuallyexperimental
is any interesting code that may not end up as Arcade features.
arcade.color_from_hex_string
changed to follow the CSS hex string standard.- Made Pyglet's math classes accessible within Arcade.
- Arcade's utility math functions have more robust typing.
- Added
Point
,Point2
,Point3
type aliases for tuples and vectors. - Added
Sequence
types for all threePoint
aliases. - Added a
Color
object with a plethora of useful methods. - Windows Text glyphs are now created with DirectWrite instead of GDI.
- Removal of various deprecated functions and parameters.
- OpenGL examples moved to
examples/gl <https://github.com/pythonarcade/arcade/tree/development/arcade/examples/gl>
from "experiments/examples"
- Created
BasicSprite
, the absolute minimum required for an Arcade sprite most users will do well sticking withSprite
. Sprite.draw
has been completely removed. It was a wasteful and slow way to render a sprite. Use anarcade.SpriteList
orarcade.draw.draw_sprite
.Sprite.visible
no longer overrides the sprite's alpha, allowing for toggling transparent sprites.Sprite.face_towards
has been removed as it did not behave as expected and is not strictly for sprites.Sprite.collision_radius
has been removed as it is no longer used in collision checking. Sprites now only rely on their hitbox.- The
arcade.Sprite.__init__
has been changed to remove all references to texture loading. Usearcade.load_texture
andarcade.load_spritesheet
for more complex behavior. arcade.Sprite.angle
now rotates clockwise following standard game behavior. It may break common linear algebra methods, but reversing the resulting angles is easy.
Previously, controllers were usable via the Arcade.joysticks
module. This module is still available in 3.0.
However, most people can treat it as depreciated. It is an alias to Pyglet's joysticks sub-module. There is now an arcade.controller
module that is an alias to Pyglet's new Controller API. This change should make a more comprehensive choice of controllers usable with Arcade. The joystick module may still be helpful if you need specialty controllers such as racing wheels or flight sticks. The example code now uses the new controller AP.
- Complete removal of the old PIL-based text system. In 2.6, we switched to the newer Pyglet-based system, but there were still remnants of the PIL implementation—namely, the
arcade.create_text_sprite
function. There's no API breaking change, but if you are using the function, it would be worth reading the new docs, as there are some different considerations when using a customarcade.TextureAtlas
. This function is faster than the old PIL implementation. Texture generation happens almost entirely on the GPU now. - The
arcade.text_pillow
module no longer exists. arcade.text_pyglet
has been renamedarcade.text
.arcade.draw_text
andarcade.Text
now accept az
parameter that defaults to 0. Previous text versions had the same default.
arcade.draw_commands
has been renamedarcade.draw
.- Added
arcade.draw.draw_lbwh_rectangle_textured
which replaces the now-deprecatedarcade.draw_commands.draw_lrwh_rectangle_textured
. Usage has stayed the same as it was misnamed.
- Support for OpenGL ES 3.1 and 3.2. 3.2 is fully supported, and 3.1 is only supported if the driver provides the
EXT_geometry_shader
extension. It is part of the minimum spec in 3.2, so it is guaranteed to be there. Arcade only needs this extension to function with 3.1. - For example, the Raspberry Pi 4/5 only supports OpenGL ES 3.1 but provides the extension, making it fully compatible with Arcade.
- Textures now support immutable storage for OpenGL ES compatibility.
- Arcade is now using Pyglet's projection and view matrix.
All functions setting matrices will update the Pyglet window's
view
andprojection
attributes. Arcade shaders are also using Pyglet'sWindowBlock
UBO. - Uniforms are now set using
glProgramUniform
instead ofglUniform
when the extension is available, improving performance. - Fixed many implicit type conversions in the shader code for broader support.
- Added
front_face
property on the context for configuring the winding order of triangles. - Added
cull_face
property to the context to configure what triangle faces to cull. - Added support for bindless textures.
- Added support for 64-bit integer uniforms.
- Added support for 64-bit float uniforms.
- Now supports tiles defined as a sub-rectangle of an image. See Tiled 1.9 Release Notes for more information on this feature.
- Changed the
Sprite.properties
key "type" to "class" to stay in line with Tiled's API. - You can now define a custom texture atlas for SpriteLists created in a TileMap. You can provide a default with the
texture_atlas
parameter of thearcade.tilemap.Tilemap
andarcade.tilemap.load_tilemap
. The newtexture_atlas
key of thelayer_options
dict lets you control it per layer. The globalTextureAtlas
will be used by default (This is how it works pre-Arcade 3.0). - Fixed animated tiles from sprite sheets.
- Collision detection is now even faster.
- Remove Shapely for collision detection, as Python 3.11+ is faster without it.
- New buffered
Arcade.create_triangles_strip_filled_with_colors
. arcade.shape_list
now contains all items that can rendered using anarcade.ShapeElementList
.
- Example code page has been reorganized.
- CONTRIBUTING.md has been updated.
- Improved
background_parallax
example. - More detailed information on how Arcade's event loop works.
- The platformer tutorial has been overhauled.
- These features are all in active development, and their API can change anytime. Feedback is always appreciated.
- Started on a system for drawing large background textures with parallax scrolling. These don't use an
arcade.TextureAtlas
so they aren't batched, preventing your Atlas' from being filled with massive images. - Started on an event-based input system, which includes improved Enums for key, mouse, and controller inputs. Using the InputManager, you can define custom actions that can rebound at run time and have multiple valid keys.
- Added a method to bootstrap
arcade.clock.Clock
, adding functionality to add sub-clocks that their parent will tick. This makes it much safer to manipulate the time of particular game objects. - A new subclass of
arcade.BasicSprite
that usedpyglet.math.Vec2
for most of its properties. It has a heavy performance hit but is much nicer to work with. - The experimental lighting features have been promoted to the future, but their implementation is very volatile. If you have ideas for what you'd like from a lighting module, please share them on Discord.
Contributing to a release comes in many forms. It can be code, documentation, testing, or providing feedback. It's hard to keep track of all the people involved in a release, but we want to thank everyone who has helped in any shape or form. We appreciate all of you!
- Andrew Bradley
- Alejandro Casanovas
- Cleptomania
- DigiDuncan
- DragonMoffon
- Einar Forselv
- Maic Siemering
- pushfoo
- pvcraven
We would also like to thank the contributors who spent their valuable time solving issues, squashing bugs, and writing documentation. We appreciate your help; you helped get 3.0 out the door!
- DarkLight1337 helped the team untangle type annotation issues for cameras
- Mohammad Ibrahim was a massive help with the GUI and various other parts of the library.
- ryyst completely revitalized the Arcade Docs.
- Aizen
- Aurelio Lopez
- BrettskiPy
- Brian Stormont
- cacheguy
- Code Apprentice
- Dominik
- Ethan Chan
- FriendlyGecko
- Grant Hur
- Ian Currie
- Jack Ashwell
- kosvitko
- L Cai
- Miles Curry
- MrWardKKHS
- Natalie Fearnley
- Omar Mohammed
- Raccoon
- Raxeli1
- Rémi Vanicat
- Rich Saupe
- Shadow
- Shivani Arbat
- Snipy7374
- Tiffany Xiao
- Wilson (Fengchi) Wang
Finally, thank you to the Pyglet team! Pyglet is the backbone of Arcade, and this library wouldn't be possible without them.
3.0.0 changes span from Mar 12, 2022 –