Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Python Game Programming By Example

You're reading from   Python Game Programming By Example A pragmatic guide for developing your own games with Python

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781785281532
Length 230 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Alejandro Rodas de Paz Alejandro Rodas de Paz
Author Profile Icon Alejandro Rodas de Paz
Alejandro Rodas de Paz
Joseph Howse Joseph Howse
Author Profile Icon Joseph Howse
Joseph Howse
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Python Game Programming By Example
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon