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

Get Python Game Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.