You can grab pre-release versions from PyPi. See the available versions from the Arcade PyPi Release History page.
UIWidget.with_backgroundnow accepts a tuple for color- Many docstring and documentation fixes
- Major fix for smooth frame rates. Due to a weakness with how certain
events are handled in the pyglet clock we now trigger
on_update,on_draw, andon_fixed_updatefrom a single event in pyglet and dispatch the events manually in Arcade. This should greatly improve the smoothness of scrolling and animations. A new limitation is that the draw rate cannot be faster than the update rate. - Fixed division error in box layout algorithm
- Fix example added buttons to multiple layouts
- Fixed blurriness in
UIWidgettext during interaction - Resolved issue with
UIDropdown.hide()when no parent exists - Corrected event order bug in
UIWidget - Clarify error message when the texture atlas is full. The default texture atlas has a limit of 8192 textures. This can be increased by the user if needed or the user can create multiple texture atlases.
- Many docstring and documentation fixes
- Added style support for
UIDropboxbuttons
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_textureno longer cache textures. -
Removed the poorly named
Window.set_viewportandset_viewportmethods.Camera2Dhas completely superseded their functionality. -
Fixed
ArcadeContextassuming 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
Spriteinitializer has been simplified. It's no longer possible to slice or transform textures through parameters in the sprite initializer. Use theTextureclass to manipulate the sprite's texture. It supports transforms like rotating, scaling, flipping, and slicing. -
Sprite.anglehas changed to clockwise. -
Sprite.on_updatehas been removed. UseSprite.updateinstead. It has adelta_timeparameter and accepts both*argsand**kwargsto support custom parameters. The same applies toSpriteList. -
Sprite.drawhas been removed. Use eitherarcade.draw.draw_spriteor anarcade.SpriteList. -
Removed
Sprite.face_pointandSprite.collision_radius. -
The deprecated
update()function has been removed from thearcade.Window,arcade.View,arcade.Section, andarcade.SectionManagerclasses. Instead, please use thearcade.Window.on_update()function. It works the same as theupdatefunction but has a "delta_time" parameter, which holds the time in seconds since the last update. -
The
update_rateparameter ofarcade.Windowcan no longer be set toNone. It previously defaulted to1 / 60but 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.TileMapclass would previously set a key in theSprite.propertiesdictionary namedtype. This key has been renamed to "class " in keeping with Tiled renaming the key. -
The
arcade.text_pillowandarcade.text_pygletmodules 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_spritehas 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_hashparameter forSpriteListandTileMapis now aboolinstead ofOptional[bool] -
arcade.draw_text()andarcade.text.Textarguments have changed.xandyhave replacedstart_xandstart_y.alignno longer interferes withmultiline. -
Moved or removed items from
arcade.util:- Removed:
arcade.util.generate_uuid_from_kwargsarcade.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.Vec2directly
- This was an internal class as indicated by the
- Moved to
arcade.math:arcade.util.rand_in_circleis now:- located at
arcade.math.rand_in_circle - better at returning an even distribution of points PR2426 (remove any
math.sqrtwrapping it)
- located at
arcade.util.rand_on_circleis nowarcade.math.rand_on_circlearcade.util.lerpis 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 inlerpmethodarcade.math.lerp_2dfor generaltuplecompatibility
- When lerping
pylget.math.Vec3, use one of:pyglet.math.Vec3's built inlerpmethodarcade.math.lerp_2dfor generaltuplecompatibility
- When lerping
- NOTE: lerping vectors may be more efficient when using dedicated functions and methods:
- located at
arcade.util.lerp_vecis nowarcade.math.lerp_2darcade.util.rand_in_rectis nowarcade.math.rand_in_rectarcade.util.rand_on_lineis nowarcade.math.rand_on_linearcade.util.rand_angle_360_degis nowarcade.math.rand_angle_360_degarcade.util.rand_angle_spread_degis nowarcade.math.rand_angle_spread_degarcade.util.rand_spread_degis nowarcade.math.rand_spread_degarcade.util.rand_magnitudeis 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.UIAnchorWidgethas been replaced byarcade.gui.widgets.UIAnchorLayout.
- Removed
-
Resources
- Removed unused resources from
resources/gui_basic_assets.items/shield_gold.pngitems/sword_gold.pngslider_thumb.pngslider_track.pngtoggle/switch_green.pngtoggle/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
SpriteListandShapeElementListhave 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_CLOCKandGLOBAL_FIXED_CLOCKaccessable fromarcade.clock. which provides global access to elapsed time, number of frames, and the last delta_time.
- Removed the
updatefunction in favor ofarcade.Window.on_update(). - The
update_rateparameter in the constructor can no longer be set toNoneand must be a float. - A new
draw_rateparameter 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. Keepingdraw_rateclose to the refresh rate of the user's monitor while settingupdate_rate` to a much shorter interval can greatly improve the perceived smoothness of your application. open_window()now accepts**kwargsto pass additional parameters to thearcade.Windowconstructor.arcade.View- Removal of the
updatefunction in favor ofarcade.View.on_update().
- Removal of the
arcade.Sectionandarcade.SectionManager- Removal of the
updatefunction in favor ofarcade.Section.on_update().
- Removal of the
- Added a whole new
on_fixed_updatemethod, 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_capparameter inWindow.__init__.
- Is also available for
- See the updated event loop docs for an in-depth explanation of
on_fixed_updatevs.on_update.
- Created
arcade.camera.Camera2D, which allows for easy manipulation of Arcade and Pyglet's rendering matrices. - Created
arcade.camera.PerspectiveProjectorandarcade.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
Projectorclasses provide methods to project to and from the screen and world coordinates.
arcade.load_texturehas been simplified to load the entire image. Usearcade.load_spritesheetto use better versions of the old arguments.arcade.get_default_textureandarcade.get_default_imageare new methods to givearcade.Spritetheir default texture.- Added
sync_texture_imageto theDefaultTextureAtlasmethod to sync the texture in the atlas back into the internal pillow image in thearcade.Texture. - DefaultTextureAtlas: Added
get_texture_imagemethod 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_widthUIWidget.border_colorUIWidget.bg_colorUIWidget.bg_textureUIWidget.padding_topUIWidget.padding_rightUIWidget.padding_bottomUIWidget.padding_left
- Update and add example code.
- Iterable (providing direct children)
-
Updated widgets
arcade.gui.widgets.text.UIInputTextemits anon_changeevent.arcade.gui.widgets.slider.UITextureSlidertexture names changed to fit the naming pattern.
-
New widgets:
arcade.gui.widgets.dropdown.UIDropdownarcade.gui.widgets.image.UIImagearcade.gui.widgets.slider.UISliderarcade.gui.widgets.constructs.UIButtonRow(PR1580)
-
arcade.gui.UIInteractiveWidgetonly 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.UILayouts now supportsize_hint,size_hint_min, andsize_hint_max.arcade.gui.UIBoxLayoutarcade.gui.UIAnchorLayoutArcade.gui.UIGridLayoutPR1478
-
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
Recttype, making working with axis-aligned rectangles easy.- Provides functions to create a full
Rectobject from four values. - Provides methods to move and scale the
Rect. - Provides methods to compare against the
Rectwith 2D points and otherRects.
- Provides functions to create a full
- Added
AnchorPointhelpers and aliases forVec2s in the range (0 - 1). - Added several helper methods for creating
Rectobjects.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 areints.)
- Several properties in the library now return a
Rect:Window.rectBasicSprite.rectOrthographicProjectionData.rectUIWidget.rectSection.rect
- The drawing functions
draw_rect_filled()anddraw_rect_outline()can be used to draw aRectdirectly.
arcade.experimentalhas been split into two submodules,experimentalandfuture.futureincludes all incomplete features we intend to include in Arcade eventuallyexperimentalis any interesting code that may not end up as Arcade features.
arcade.color_from_hex_stringchanged 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,Point3type aliases for tuples and vectors. - Added
Sequencetypes for all threePointaliases. - Added a
Colorobject 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 matrix uniforms are now supported properly
- OpenGL uniforms now accept buffer protocol objects
- Sprite's visible flag is now handled correctly
Window.run()now supports a view argument.- 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.drawhas been completely removed. It was a wasteful and slow way to render a sprite. Use anarcade.SpriteListorarcade.draw.draw_sprite.Sprite.visibleno longer overrides the sprite's alpha, allowing for toggling transparent sprites.Sprite.face_towardshas been removed as it did not behave as expected and is not strictly for sprites.Sprite.collision_radiushas 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_textureandarcade.load_spritesheetfor more complex behavior. arcade.Sprite.anglenow 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_spritefunction. 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_pillowmodule no longer exists. arcade.text_pyglethas been renamedarcade.text.arcade.draw_textandarcade.Textnow accept azparameter that defaults to 0. Previous text versions had the same default.
arcade.draw_commandshas been renamedarcade.draw.- Added
arcade.draw.draw_lbwh_rectangle_texturedwhich 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_shaderextension. 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
viewandprojectionattributes. Arcade shaders are also using Pyglet'sWindowBlockUBO. - Uniforms are now set using
glProgramUniforminstead ofglUniformwhen the extension is available, improving performance. - Fixed many implicit type conversions in the shader code for broader support.
- Added
front_faceproperty on the context for configuring the winding order of triangles. - Added
cull_faceproperty 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.propertieskey "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_atlasparameter of thearcade.tilemap.Tilemapandarcade.tilemap.load_tilemap. The newtexture_atlaskey of thelayer_optionsdict lets you control it per layer. The globalTextureAtlaswill 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_listnow contains all items that can rendered using anarcade.ShapeElementList.
- Example code page has been reorganized.
- CONTRIBUTING.md has been updated.
- Improved
background_parallaxexample. - 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.TextureAtlasso 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.BasicSpritethat usedpyglet.math.Vec2for 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 Dec 31, 2022 – Jan 25, 2025 (756 days!!)