Python may not be the first language you think of when you consider computer games, but it's surprising adept at tying together elements of game systems and not at all bad for the implementation of games in its own right. Game Programming With Python
explains how to write game code in Python, and goes a long way toward showing that this isn't just a pet project of some hobbyists--that you'd really want to consider Python for game work. Sections dealing with graphics are particularly impressive. Even established Python enthusiasts will smile at what Sean Riley has accomplished in the area of terrain generation.
Much of the book is as interesting for its coverage of algorithms and design patterns generically as for its detailed coverage of Python programs. Riley takes care to explain, for example, the empirical logic behind the A* (a-star) path-finding algorithm as well as its specific implementation in Python. He devotes similar care to collision-detection algorithms and the simple artificial intelligence behind tic-tac-toe. Riley makes extensive use of libraries in his games, and studying his code is a good way for readers to learn about PyUI, PyOpenGL, and network services libraries. --David Wall
Topics covered: How to push Python to somewhere near the limits of its capabilities by using it to write games. The author talks about game design, useful algorithms, and strategies for using Python to interconnect game elements as well as using Python for core game functions.
1 Overview SECTION I Introduction 5 2 Game Architecture 3 Python Game Architectures SECTION II Game Infrastructure 25 4 Python Game Framework 5 Simulation Concepts 6 Data-Driven Simulations 7 Collision Detection SECTION III Game Technologies 97 8 Graphics 9 Audio 10 Input 11 Unit Testing SECTION IV Game Programming 161 12 Game Simulations 13 Game Levels 14 User Interfaces 15 Artificial Intelligence 16 Procedurally Generated Game Content SECTION V Multiplayer Games 295 17 Network Concepts 18 Network Layers 19 Clients and Servers 20 Multiplayer Game Example SECTION VI Advanced Topics 389 21 Using the Python C API 22 Extending Python 23 Embedding Python