Skip to content

SPGL is a simple Python game library / framework for creating 2D games. It is built on the Python Turtle module and is compatible with Python 2.x and 3.x.

License

Notifications You must be signed in to change notification settings

wynand1004/SimplePythonGameLibrary

 
 

Repository files navigation

SGE (Version 0.5)

Overview:

The purpose of the Simple Game Engine is to give beginning Python coders a simple framework to make basic 2D games. It is intended as a simple 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 built-in modules
  • Python 2.x and 3.x compatibility
  • Cross-platform (Linux, Mac, and Windows)

Getting Started

Download the repository to your computer. There are 3 demo files, SGE_Demo.py which is a simple game using primitives (triangles and circles). Use the left arrow, right arrow, and up arrow to control the player. There is also SGE_Minimal_Example.py contains a simple game framework which will create a window - use this as the basis of your own programs. Finally, there is SGE_Space_Invaders.py, a simple demo I am working on to test SGE features. Note: I used tabs, not spaces.

Performance

I have tested this on Linux only at this point. I know from experience that the turtle module on Mac is slower. On my Linux machine, I can easily get 100 sprites moving around the screen at 30 frames per second. See the SGE_Demo.py program for an example.

Known Issues

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.

On Windows, SGE uses the winsound module to play sounds. I have not tested this yet as I do not have access to Windows at the moment.

Documentation Available on the Wiki

Follow me on Twitter @tokyoedtech

Various tutorials available on my YouTube Channel

About

SPGL is a simple Python game library / framework for creating 2D games. It is built on the Python Turtle module and is compatible with Python 2.x and 3.x.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages