Last active
August 22, 2023 13:53
-
-
Save davidpendergast/77e49f8028ce611ac478c38f77f9f72f to your computer and use it in GitHub Desktop.
Pygame vs. Pygame-CE API Differences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pygame vs. Pygame-CE API Differences | |
------------------------------------ | |
This document is meant to serve as a reference for pygame developers that use | |
both pygame and pygame-ce. It is not an endorsement of one over the other. | |
Last updated: April 26, 2023 | |
Info was compiled from the repos' release pages and their respective docs: | |
https://github.com/pygame/pygame/releases | |
https://github.com/pygame-community/pygame-ce/releases | |
https://www.pygame.org/docs/index.html | |
https://pyga.me/docs/ | |
Pygame-CE's first version was 2.1.3, which is equivalent to Pygame's 2.1.3 API-wise. | |
Both released on Feb 14, 2023. | |
Since then, they've mostly diverged in terms of API changes. | |
Changes that appear in both packages eventually are marked with a (*). | |
*------------------------------* | |
| Pygame's changes since 2.1.3 | | |
*------------------------------* | |
pygame 2.2.0: (Feb 27, 2023) | |
* added Color.premul_alpha() and Surface.premul_alpha() | |
* added Color.grayscale() and transform.grayscale() | |
* added Vector(2|3).__round__() | |
* added "window" attribute to DROPFILE / DROPTEXT events | |
pygame 2.3.0: (March 14, 2023) | |
added special_flags= arg to sprite.Group.draw() | |
added Rect.scale_by() and scale_by_ip() | |
changed behavior when you assign floats to Rect's attributes (it now rounds instead of truncating) | |
added _sdl2.video.Window.from_window() class method | |
added Vector2.from_polar() class method | |
added math.lerp() function | |
*---------------------------------* | |
| Pygame-CE's Changes since 2.1.3 | | |
*---------------------------------* | |
pygame-ce 2.1.4: (March 5, 2023) | |
* added Color.premul_alpha() and Surface.premul_alpha() | |
* added Color.grayscale() and transform.grayscale() | |
* added Vector(2/3).__round__() | |
* added "window" attribute to DROPFILE / DROPTEXT events | |
Font enhancements: | |
change no-arg Font constructor to give default font with size 20 | |
added pygame.Font alias | |
added wraplength arg to Font.render | |
added Font.align | |
added Font.set_script() | |
added Font.set_direction() | |
added pygame.mixer.music.get_metadata() | |
added Surface.fblits() | |
added pitch arg to image.frombuffer / image.from(string|bytes) | |
added pygame.IS_CE flag | |
added pygame.Joystick, pygame.Font, pygame.Clock, pygame.Event, pygame.Channel aliases | |
added _sdl2.draw_triangle() | |
added _sdl2.draw_quad() | |
pygame-ce 2.2.0: (March 25, 2023) | |
added FRect | |
improved display.set_mode()'s vsync=True behavior | |
added display.is_vsync(), get_current_refresh_rate(), and get_desktop_refresh_rates() | |
added transform.invert(), box_blur(), and gaussian_blur() | |
added system module | |
added scrap.put_text(), get_text(), and has_text() (and deprecated rest of scap module) | |
added Font.name | |
added swizzling for Color (i.e. ability to call .rgb or .rgba) | |
changed image.save() and image.load() to support file= keyword args | |
changed mixer to raise FileNotFoundExceptions where appropriate | |
improved line and circle drawing | |
removed fastevent module | |
pygame-ce 2.2.1: (April 2, 2023) | |
No API changes | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, it's kind of tricky to visualize the chronology correctly while also trying to show the differences side-by-side, as text/markdown is a rather one-dimensional linear medium.
Edited.