Game Programming With Python (Game Development Series)

Game Programming With Python (Game Development Series)
by Sean Riley

Game Programming With Python (Game Development Series)
List Price: $49.95
Our Price: $28.90
You Save: $21.05 (42%)
Availability: Usually ships in 1-2 business days
Buy Used: from $20.00 (click here)
Category: Book
See more book details and other editions


(Click here)
Buy this book at online book store in your country
Canada | UK | Germany | France

Book Summary Information

Author: Sean Riley
Edition: Paperback
Audio: English (Original Language); English (Unknown); English (Published)
Published: 2003-10-24
ISBN: 1584502584
Number of pages: 488
Publisher: Charles River Media

Book Reviews of Game Programming With Python (Game Development Series)

Book Review: Great idea; somewhat mediocre execution.
Summary: 3 Stars

First, a warning about my review style: I tend to focus heavily on negative things. That's probably because negative things are easier and more fun to write about. So while this review may have a mostly negative tone, do note that I don't hate this book... I just think it has a lot of room for improvement.

A few years ago I happened to be writing a game in Python when I came across this book at the bookstore. I was already familiar with both Python and game development, but I was uncertain of a few details at the time, and I liked what I saw on a cursory flip-through, so I decided to take it home. A few years later, I am again attempting to write a (different) game in Python, and this book came to mind, so here I am writing this review.

Sadly, some of the information in the book was already out of date when it was published. Python 2.3 was released in July 2003 (this book was released sometime in 2004), and yet this book seems to be written for Python 2.1, which was released in 2001. The language changed a lot within that time, though not so much as to make the code completely obsolete. The book does not take advantage of "new-style" classes introduced in Python 2.2. If the author didn't want to complicate the issue by distinguishing between old-style and new-style classes, he should have used only new-style classes, not old-style. All you have to do to make a class new-style is derive it from the "object" class; the author needed to devote only a few words to the subject. There's no discussion about the semantics of division, which was already in flux: if you put "from __future__ import division" at the top of your module, the expression 1/2 returns a float (0.5); otherwise it returns an integer (0). The new semantics should be taught because that is what future versions of Python are going to use by default.

The most blatant example of the author's ignorance is his recommendation that you download PyUnit. There's no need to because PyUnit has been included with Python since version 2.1! (Again, version 2.1 was released several years before the book was.) The only thing you get by downloading it is an old and obsolete version. To be fair, though, PyUnit's website needs to make it clear right up front that it's bundled with Python 2.1 and you only need to download it if you're using an old version of Python.

The worst thing has been noted by several other reviewers: the heavy dependence upon PyUI, a library created by the author that was never even finished. Although it has been put on sourceforge, nobody has been maintaining it. It would probably be best not to even bother with learning how to use it, because you'll have trouble getting it to work and nobody else uses it. Its only value is that it'll help you follow the book's examples. If you need a GUI for your game, there are others you can find at the pygame website, such as pgu or OcempGUI, both of which are currently maintained.

However, this is not all as bad as it sounds. A lot of the advice is still good, and if you keep learning about Python, you'll figure out how to work around this book's deficiencies. Unfortunately, this book is geared towards Python newbies, who shouldn't be expected to know how to do that. The code seems to be reasonably-written, it's just out of date. The sad thing is, if this book had been released a few years prior, and it didn't depend on a library that nobody uses or maintains, it'd probably be perfect. As it is, it was out of date even when published, and is only more so now.

Most of the good things in the book, such as the chapter on procedural content generation, don't seem to have much to do with Python itself, but rather are good concepts that happen to use Python for the examples. I think the book does have things to teach. But if you're a Python newbie, you'd do well to get another book about Python if you want to use the language as it is now, and not as it was six or seven years ago. Or, if you're an experienced programmer, you could do what I did and "pick it up" using the official tutorials and documentation, which are freely browsable and downloadable online.

On the positive side, the book especially deserves kudos for the idea in the first place. Although I had the idea of writing a game in Python before knowing about this book, the idea may not strike others so readily, especially if they haven't heard of Python. Too many books either start you with writing in C or C++, or else writing in some toy language such as some variant of BASIC that nobody uses. Python is as easy to use as the BASIC dialects, but as powerful as C++. It's just not as fast as C++ -- an obstacle that can still be tackled when you're ready for it. It's a language with a great variety of uses and an established user base, so it'll have use for many things beyond game development, while still being reasonably suited for that task. What more could you ask for?

In summary: the book was great idea, but the execution leaves some to be desired.

Summary of Game Programming With Python (Game Development Series)

If C and C++ are the languages of choice for game programmers, why should you consider using Python? Game Programming with Python explores this question in depth and teaches you why and how Python can reduce your development time, improve your technical designs, and make the entire development process more efficient. Game Programming with Python is about building games using Python. It deals with general concepts of game development and specifics that apply when using Python for game development. Some of the general topics include simulations, game architectures, graphics, networking, and user interfaces. The Python-specific topics covered include Python development strategies, using Python for data-driven systems, performance tuning, modules and packages, and interfaces between Python and other programming languages. Additionally, a series of increasingly complex examples are developed throughout the book using Python. Python is already being used by professional game developers in a number of popular commercial games, including the award winning Star Trek ® Bridge Commander (Totally Games), Freedom Force (Irrational Games), and Earth & Beyond (Electronic Arts). Games such as these use Python in three major ways: as a full-fledged programming language to develop real software systems; as a scripting language to control and interface between systems written in other languages; and as a data language to describe game rules and game objects. Throughout the book, each of these major uses of Python is discussed along with the differences between them. Written for Python programmers interested in learning game development, as well as game developers interested in using Python, the book assumes you have some programming background and a basic grasp of software engineering principles. Some knowledge of the game development process is also assumed, although a concise overview is provided.
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.

Games & Strategy Guides Books

Book Subjects
Most talked about in Python
Text Processing in Python ImageText Processing in Python
by David Mertz
Addison-Wesley Professional; Published: 2003-06-12; Paperback; Book
Best price: $27.84
Price in other shops: $54.99
Data Crunching: Solve Everyday Problems Using Java, Python, and more. ImageData Crunching: Solve Everyday Problems Using Java, Python, and more.
by Greg Wilson
Pragmatic Bookshelf; Published: 2005-04-20; Paperback; Book
Best price: $16.76
Price in other shops: $29.95
Web Component Development with Zope 3 ImageWeb Component Development with Zope 3
by Philipp von Weitershausen
Springer; Published: 2007-02-02; Hardcover; Book
Best price: $58.94
Price in other shops: $59.95
Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites (Prentice Hall Open Source Software Development Series) ImageRapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites (Prentice Hall Open Source Software Development Series)
by Mark Ramm, Kevin Dangoor, Gigi Sayfan
Prentice Hall PTR; Published: 2006-11-17; Paperback; Book
Best price: $28.94
Price in other shops: $44.99
Twisted Network Programming Essentials ImageTwisted Network Programming Essentials
by Abe Fettig
O'Reilly Media, Inc.; Published: 2005-10-20; Paperback; Book
Best price: $16.77
Price in other shops: $29.95
Game Programming with Python, Lua, and Ruby (Game Development) ImageGame Programming with Python, Lua, and Ruby (Game Development)
by Tom Gutschmidt
Course Technology PTR; Published: 2003-12-01; Paperback; Book
Best price: $4.99
Price in other shops: $39.99
Game Programming With Python (Game Development Series) ImageGame Programming With Python (Game Development Series)
by Sean Riley
Charles River Media; Published: 2003-10-24; Paperback; Book
Best price: $29.00
Price in other shops: $49.95
wxPython in Action ImagewxPython in Action
by Noel Rappin, Robin Dunn
Manning Publications; Published: 2006-03-23; Paperback; Book
Best price: $28.29
Price in other shops: $49.95
Rapid GUI Programming with Python and Qt (Prentice Hall Open Source Software Development) ImageRapid GUI Programming with Python and Qt (Prentice Hall Open Source Software Development)
by Mark Summerfield
Prentice Hall PTR; Published: 2007-10-28; Hardcover; Book
Best price: $37.65
Price in other shops: $49.99
Python For Dummies (For Dummies (Computer/Tech)) ImagePython For Dummies (For Dummies (Computer/ Tech))
by Stef Maruch, Aahz Maruch
For Dummies; Published: 2006-09-14; Paperback; Book
Best price: $7.08
Price in other shops: $29.99
Similar Books and other products
Core Python Programming (2nd Edition) (Core Series) ImageCore Python Programming (2nd Edition) (Core Series)
by Wesley J. Chun
Prentice Hall PTR; Published: 2006-09-28; Paperback; Book
Best price: $32.78
Price in other shops: $54.99
Python Essential Reference (3rd Edition) (Developer's Library) ImagePython Essential Reference (3rd Edition) (Developer's Library)
by David M. Beazley
Sams; Published: 2006-03-02; Paperback; Book
Best price: $25.66
Price in other shops: $44.99
Python in a Nutshell (In a Nutshell (O'Reilly)) ImagePython in a Nutshell (In a Nutshell (O'Reilly))
by Alex Martelli
O'Reilly Media, Inc.; Published: 2006-07-14; Paperback; Book
Best price: $22.89
Price in other shops: $39.99
Python Cookbook ImagePython Cookbook
by Alex Martelli, Anna Ravenscroft, David Ascher
O'Reilly Media, Inc.; Published: 2005-03-18; Paperback; Book
Best price: $28.92
Price in other shops: $49.95
Programming Python ImageProgramming Python
by Mark Lutz
Published: 1996-01-15; Paperback; Book
Best price: $42.80
Price in other shops: $44.95
Game Programming: The L Line, The Express Line to Learning (The L Line: The Express Line To Learning) ImageGame Programming: The L Line, The Express Line to Learning (The L Line: The Express Line To Learning)
by Andy Harris
Wiley; Published: 2007-02-09; Paperback; Book
Best price: $9.50
Price in other shops: $39.99
Python Programming for the Absolute Beginner, Second Edition (For the Absolute Beginner) ImagePython Programming for the Absolute Beginner, Second Edition (For the Absolute Beginner)
by Michael Dawson
Course Technology PTR; Published: 2005-11-08; Paperback; Book
Best price: $17.31
Price in other shops: $29.99
Learning Python (Help for Programmers) ImageLearning Python (Help for Programmers)
by Mark Lutz, David Ascher, Frank Willison
Published: 1999-04; Paperback; Book
Best price: $22.93
Price in other shops: $29.95
Foundations of Python Network Programming (Foundations) ImageFoundations of Python Network Programming (Foundations)
by John Goerzen
Apress; Published: 2004-08-17; Paperback; Book
Best price: $20.00
Price in other shops: $44.99
Beginning Game Development with Python and Pygame: From Novice to Professional (Beginning from Novice to Professional) ImageBeginning Game Development with Python and Pygame: From Novice to Professional (Beginning from Novice to Professional)
by Will McGugan
Apress; Published: 2007-10-17; Paperback; Book
Best price: $24.73
Price in other shops: $39.99
Book store. Illustrated catalog of books on different categories