Search results
Results from the WOW.Com Content Network
For more in depth reference, check out the Tutorials section below, check out a video tutorial (I'm a fan of this one), or reference the API documentation by module. Documents¶ Readme. Basic information about pygame: what it is, who is involved, and where to find it. Install. Steps needed to compile pygame on several platforms.
The pygame package represents the top-level package for others to use. Pygame itself is broken into many submodules, but this does not affect programs that use pygame. As a convenience, most of the top-level variables in pygame have been placed inside a module named pygame.locals pygame constants.
See the pygame.image.frombuffer() create a new Surface that shares data inside a bytes buffer method for a potentially faster way to transfer images into pygame.
The pygame website has full reference documentation for every pygame function and tutorials for all ranges of users. The pygame source comes with many examples of things like monkey punching and UFO shooting.
The event queue contains pygame.event.Event pygame object for representing events event objects. There are a variety of ways to access the queued events, from simply checking for the existence of events, to grabbing them directly off the stack.
David Clark is an avid pygame user and the editor of the Pygame Code Repository, a showcase for community-submitted python game code. He is also the author of Twitch, an entirely average pygame arcade game. This guide was substantially updated in 2022.
A pygame Surface is used to represent any image. The Surface has a fixed resolution and pixel format. Surfaces with 8-bit pixels use a color palette to map to 24-bit color. Call pygame.Surface() pygame object for representing images to create a new image object. The Surface will be cleared to all black.
This module offers control over the pygame display. Pygame has a single display Surface that is either contained in a window or runs full screen. Once you create the display you treat it as a regular Surface. Changes are not immediately visible onscreen; you must choose one of the two flipping functions to update the actual display.
pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games. pygame.org (the website) welcomes all python game, art, music, sound, video and multimedia projects.
r (pygame.Color attribute) raw (pygame.BufferProxy attribute) read() (pygame.midi.Input method) Rect (class in pygame) rect() (in module pygame.draw)