Pygame
Encyclopedia
Pygame is a cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

 set of Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 modules designed for writing video games.
It includes computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 and sound libraries designed to be used with the Python programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

. It is built over the Simple DirectMedia Layer
Simple DirectMedia Layer
Simple DirectMedia Layer is a cross-platform, free and open source multimedia library written in C that presents a simple interface to various platforms' graphics, sound, and input devices....

 (SDL) library, with the intention of allowing real-time
Real-time computer graphics
Real-time computer graphics is the subfield of computer graphics focused on producing and analyzing images in real time. The term is most often used in reference to interactive 3D computer graphics, typically using a GPU, with video games the most noticeable users...

 computer game development without the low-level
Low-level programming language
In computer science, a low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture. Generally this refers to either machine code or assembly language...

 mechanics of the C programming language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and its derivatives. This is based on the assumption that the most expensive functions inside games (mainly the graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 part) can be completely abstracted from the game logic
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

 in itself, making it possible to use a high-level programming language
High-level programming language
A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be from the specification of the program, making the process of...

 like Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 to structure the game.

Pygame was built to replace pySDL after its sudden death. Pygame was originally written by Pete Shinners and is released under the open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 GNU Lesser General Public License
GNU Lesser General Public License
The GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...

. It is a community
Free software community
The free-software community is an informal term that refers to the users and developers of free software as well as supporters of the free-software movement. The movement is sometimes referred to as the open-source software community or a subset thereof...

 project since around 2004/2005. There are many tutorials and there was an ongoing competition to write little games.

Games using Pygame

  • Slingshot
  • Frets on Fire
    Frets on Fire
    Frets on Fire is a free, open-source Finnish music video game created by Unreal Voodoo. Players use the keyboard to play along with markers which appear on screen, with the aim to score points, achieve a high point multiplier, and complete a song...

  • Dangerous High School Girls in Trouble
  • Space Max (shoot them up)

Literature


See also

2D Engines and Libraries:
  • Pygame Utilities (PGU) is a collection of tools and libraries that enhance Pygame. Tools include a tile editor and a level editor
    Level editor
    A level editor is a software tool used to design levels, maps, campaigns, etc and virtual worlds for a video game. In some cases the creator of a video game releases an official level editor for a game, but other times the community of fans step in to fill the void...

     (tile, isometric, hexagonal). GUI enhancements include full featured gui, html rendering, document layout, and text rendering. The libraries include a sprite and tile engine
    Tile engine
    A tile engine is a computer graphics technique which generates a larger graphic from re-using a number of smaller graphics to save RAM and increase real-time rendering performance.-Basic tile map history:...

     (tile, isometric, hexagonal), a state engine, a timer, and a high score system.
  • Pyglet
    Pyglet
    Pyglet is an OpenGL-based software library used in developing games and other visually rich applications using the object-oriented language Python....

     is an OpenGL-based software library used in developing games and other visually rich applications using the object-oriented language Python.
  • MirthKit is a simple toolkit for making and distributing open source, cross-platform 2D games.

External links

  • Pygame homepage — Pygame documentation, wiki, news, download and more.
  • [news://gmane.comp.python.pygame Pygame newsgroup] (web access) — the "official" Pygame newsgroup
    Newsgroup
    A usenet newsgroup is a repository usually within the Usenet system, for messages posted from many users in different locations. The term may be confusing to some, because it is usually a discussion group. Newsgroups are technically distinct from, but functionally similar to, discussion forums on...

    , requires registration
  • pyOpenGL - Python OpenGL Bindings
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK