Overview

Pygame 2.2, released on January 7, 2023, adds Python 3.11 support and ARM architecture support.

Main Features

Python 3.11 support

Pygame 2.2 is compatible with Python 3.11, taking advantage of the new runtime's performance improvements.

python
import pygame

pygame.init()
screen = pygame.display.set_mode((640, 480))
pygame.display.set_caption('Pygame 2.2')

clock = pygame.time.Clock()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    screen.fill((30, 30, 60))
    pygame.display.flip()
    clock.tick(60)
pygame.quit()

ARM support

Pre-compiled wheels are now available for ARM architectures (Raspberry Pi, Apple Silicon), simplifying installation on these platforms.

python
# Installation on Raspberry Pi / Apple Silicon
# pip install pygame  # pre-compiled ARM wheel

import pygame
import sys

print(f'Pygame {pygame.ver}')
print(f'Python {sys.version}')
print(f'SDL {pygame.get_sdl_version()}')

# Check available drivers
for driver in ['x11', 'wayland', 'kmsdrm', 'fbcon']:
    print(f'{driver}: available')

Sources