Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
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
Toc

Chapter 5. Pygame and 3D

In our previous chapters, we developed our 2D games with Python modules that are built on top of a graphical user interface library, such as Tkinter and Pyglet. This allowed us to start coding our games without worrying about the lower-level details.

Now we will develop our first 3D game with Python, which will require an understanding of some basic principles of OpenGL, a popular multiplatform API for building 2D and 3D applications. You will learn how to integrate these programs with Pygame, a Python library commonly used to create sprite-based games.

In this chapter, we will cover the following topics:

  • A steady approach to PyOpenGL and Pygame
  • Initializing an OpenGL context
  • Understanding the different modes that can be enabled with OpenGL
  • How to render lights and simple shapes
  • Integrating OpenGL with Pygame
  • Drawing primitives and performance improvements
lock icon The rest of the chapter is locked
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