Pygame-ce the new fork of pygame

Pygame-ce, also known as Pygame Community Edition, is a collaborative project that aims to continue the development and maintenance of the Pygame library. Pygame itself is a popular open-source library for creating video games and multimedia applications in Python.

Pygame-ce was created to address the need for ongoing updates and improvements to Pygame after its original development stalled. The community edition brings together various contributors to enhance and extend the functionality of Pygame, fix bugs, and provide support for newer versions of Python and operating systems.

The pygame-ce project builds upon the original Pygame and aims to provide a stable and up-to-date version of the library. It includes additional features, bug fixes, and compatibility improvements. The goal is to ensure that developers can continue to use Pygame for their projects with confidence, knowing that it is actively maintained and supported by the community.

If you are interested in using Pygame, it is recommended to check out Pygame-ce as a more recent and actively developed version of the library. You can find more information, documentation, and resources on the official Pygame-ce website or its GitHub repository.

Main differences among pygame and pygame-ce

The main differences between Pygame and Pygame-ce (Pygame Community Edition) are as follows:

  1. Active Development: Pygame-ce is actively developed and maintained by the community, whereas Pygame’s development has been relatively slow in recent years. Pygame-ce incorporates bug fixes, feature enhancements, and compatibility improvements that may not be present in the original Pygame.
  2. Python 3 Support: Pygame-ce provides better support for Python 3 and newer versions of Python. It ensures compatibility and takes advantage of the latest features and improvements in the language.
  3. Bug Fixes: Pygame-ce addresses various bugs and issues that were present in Pygame. These fixes help to improve the stability and reliability of the library.
  4. Additional Features: Pygame-ce may include additional features and modules that are not present in the original Pygame. These enhancements aim to provide more functionality and options for game development.
  5. Compatibility: Pygame-ce strives to be compatible with a wider range of operating systems and platforms, ensuring that developers can use Pygame-ce on different setups without encountering compatibility issues.
  6. Documentation and Resources: Pygame-ce may have its own dedicated documentation and resources, separate from the official Pygame documentation. These materials can help developers get started with Pygame-ce and understand its unique features and improvements.

It’s worth noting that while Pygame-ce builds upon the original Pygame and aims to provide a better experience, both libraries are largely similar in terms of their core concepts, functionality, and usage. If you are already familiar with Pygame, transitioning to Pygame-ce should be relatively straightforward.

Where is the documentation of pygame and pygame-ce

As of my knowledge cutoff in September 2021, there is no dedicated official documentation specifically for Pygame-ce. The project’s main focus has been on code improvements and bug fixes rather than creating separate documentation.

However, you can refer to the original Pygame documentation, as many concepts and usage patterns apply to Pygame-ce as well. The official Pygame documentation can be found at the following link:

  • Pygame Documentation: https://www.pygame.org/docs/

Additionally, you can visit the Pygame-ce GitHub repository for information, updates, and community discussions related to Pygame-ce:

  • Pygame-ce GitHub Repository: https://github.com/pygame/pygame

Remember to check the repository’s README and issue tracker for any specific information or updates regarding Pygame-ce.

Discord community

https://discord.com/invite/pygame

How to have access to documentation

You can have access to documentation writing in the terminal:

python -m pygame.docs

An example of the code in the documentation to start

# Example file showing a circle moving on screen
import pygame

# pygame setup
pygame.init()
screen = pygame.display.set_mode((1280, 720))
clock = pygame.time.Clock()
running = True
dt = 0

player_pos = pygame.Vector2(screen.get_width() / 2, screen.get_height() / 2)

while running:
    # poll for events
    # pygame.QUIT event means the user clicked X to close your window
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    # fill the screen with a color to wipe away anything from last frame
    screen.fill("purple")

    pygame.draw.circle(screen, "red", player_pos, 40)

    keys = pygame.key.get_pressed()
    if keys[pygame.K_w]:
        player_pos.y -= 300 * dt
    if keys[pygame.K_s]:
        player_pos.y += 300 * dt
    if keys[pygame.K_a]:
        player_pos.x -= 300 * dt
    if keys[pygame.K_d]:
        player_pos.x += 300 * dt

    # flip() the display to put your work on screen
    pygame.display.flip()

    # limits FPS to 60
    # dt is delta time in seconds since last frame, used for framerate-
    # independent physics.
    dt = clock.tick(60) / 1000

pygame.quit()

Subscribe to the newsletter for updates
Tkinter templates
Avatar My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.