Book Image

Python Game Programming By Example

Book Image

Python Game Programming By Example

Overview of this book

Table of Contents (14 chapters)
Python Game Programming By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing packages


PyOpenGL is a package that offers Python bindings to OpenGL and related APIs, such as GLU and GLUT. It is available on the Python package Index, so you can easily install it via pip:

$ pip install PyOpenGL

However, we will need freeglut for our first examples, before we integrate OpenGL with Pygame. Freeglut is a third-party library that is not included if you install the package from PyPI.

On Windows, an alternative is to download and install the compiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl. Remember to install the version for Python 3.4.

Pygame is the other package that we will need in this chapter. It can be downloaded from the official website at http://www.pygame.org/download.shtml. You can install it from source if you want to; the compilation page contains the steps for building Pygame on different platforms.

Windows users can directly use the MSI for Python 3.2 or download Unofficial Windows Binaries from the Christoph Gohlke's website...