### Navigation

- index
- next |
- previous |
- The Pygame SGE 0.5.0 documentation »

# Information Specific to the Pygame SGE

## License

The Pygame SGE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Pygame SGE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Pygame SGE. If not, see <http://www.gnu.org/licenses/>.

## Dependencies

- Python 2.6 or later, but not Python 3 <http://www.python.org>
- Pygame 1.9 or later <http://pygame.org>

## Formats Support

`Sprite` supports the following image formats:

- PNG
- JPEG
- Non-animated GIF
- BMP
- PCX
- Uncompressed Truevision TGA
- TIFF
- ILBM
- Netpbm
- X Pixmap

`Sound` supports the following audio formats:

- Uncompressed WAV
- Ogg Vorbis

`Music` supports the following audio formats:

- Ogg Vorbis
- MP3 (support limited; use not recommended)
- MOD
- XM
- MIDI

For starting position in MOD files, the pattern order number is used instead of the number of milliseconds.

If Pygame is built without full image support, `sge.Sprite` will only support uncompressed BMP images. In addition, the pygame.mixer module, which is used for audio playback, is optional and depends on SDL_mixer; if pygame.mixer is unavailable, sounds and music will not play. If you encounter problems with loading images or playing sounds, check your build of Pygame.

On some systems, the game will crash if `sge.Music` attempts to load an unsupported format. Since MP3’s support is limited, it is best to avoid using it; consider using Ogg instead.

## Missing Features

`sge.Sprite.draw_line()` and `sge.Room.project_line()` support anti-aliasing for lines with a thickness of 1 only. `sge.Sprite.draw_text()` and `sge.Room.project_text()` support anti-aliasing in all cases. No other drawing or projecting methods support anti-aliasing.

## Speed Improvements

The Pygame SGE supports hardware rendering, which can improve performance in some cases. It is not enabled by default. To enable it, set `sge.hardware_rendering` to `True`. The benefit of hardware acceleration is usually negligible, which is why it is disabled by default.

Projection methods are highly inefficient, so they should be avoided if speed is important; use the `sge.Sprite` draw methods instead.

## Other Notes

Changing the `sge.Sprite.width` and `sge.Sprite.height` attributes of `sge.Sprite` objects is a destructive transformation in the Pygame SGE, so each time one of these variables changes, pixel information can be lost. For example, scaling a 128x128 pixel image down to 16x16 and then back up to 128x128 will not yield the same image, but rather either a pixelated version or a blurry version, depending on the value of `sge.game.scale_smooth`. This is because of the way the drawing methods of `sge.Sprite` are implemented. Because of this, you should avoid changing this value as much as possible. For best results, set it only when the sprite is created and then leave it alone; do any other routine transformations with the `sge.StellarClass.image_xscale` and `sge.StellarClass.image_yscale` attributes.

### Navigation

- index
- next |
- previous |
- The Pygame SGE 0.5.0 documentation »