The purpose of the Simple Python Game Library is to give beginning Python coders a simple framework to make basic 2D games. It is intended as an alternative to Pygame. As it is built on the Turtle module, it has the same features and limitations of that module. It does not require any external libraries to be added.
Design Principles
- Use only standard modules
- Python 2.x and 3.x compatibility
- Cross-platform (Linux, Mac, and Windows)
Download the repository to your computer. There are 2 demo files, SPGL_Demo.py which is a simple game using primitives (squares, triangles, arrows, and circles). Use the arrow keys to control the player. There is also SPGL_Minimal_Example.py which contains a simple game framework which will create a window - use this as the basis of your own programs.
On my Linux machine, I can easily get 100 sprites moving around the screen at 30 frames per second. See the SPGL_Demo2.py program for an example.
-
Image files need to be in .gif format. This is a limitation of the turtle module.
-
Sound files should be in .wav format for widest compatibility. Compatibility with other formats (.ogg, .mp3, etc.) will vary widely based on the operating system and installed codecs.
- Available on the Wiki
-
Subscribe to my YouTube Channel.
-
Follow me on Twitter - @tokyoedtech.
-
Check out my blog.