Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Python, PyGame and Raspberry Pi game development
Kelly S., Apress, New York, NY, 2016. 198 pp. Type: Book (978-1-484225-16-5)
Date Reviewed: Jan 11 2018

The Raspberry Pi is a tiny, affordable computer ideally suited for the hobbyist. One of the uses of Raspberry Pi is as a game machine. Its operating system is an adaptation of the Debian Linux operating system. Included in the system’s software is the Python language and the PyGame game engine. This slim book (198 pages) introduces the reader to PyGame and how it can be used with Python.

The PyGame engine is a wrapper around a library of routines that access the graphics and sound resources of the device. It includes additional software for game physics and artificial intelligence. In the Raspberry Pi device, the connections between PyGame and the Python interpreter are configured so that the user does not have to set a PATH variable and other environmental variables to make them work together properly.

The book assumes that the reader may have no experience at all with the Python language. Its structure interleaves topics directed toward learning the language and the use of PyGame. Learning the language and PyGame are done in the context of the three games developed in the book: Bricks, Snake, and a version of the old Space Invaders game. There are a total of 21 chapters in the book (each only a few pages long), plus an index at the end.

Python is formally covered fairly completely as an overview. The presentation starts with formatting blocks, coding decisions and iterations, and containers. The IDLE editor is mentioned briefly. At this point, a third of the way through the book, the treatment of game development starts when PyGame is introduced; the Bricks game project starts shortly afterward. The remaining Python language features are presented in conjunction with the Bricks game project. User-written functions are presented. File I/O is touched upon. Object-oriented programming features are given an overview. As one might expect, it is not possible to go into much depth in learning Python in 100 pages or so of discussion. There are no exercises for the reader. The treatment of the language is really an amplified outline. The serious reader of this book needs a good Python text at hand.

At this point, approximately one-third of the book remains. It is used to develop the Snake and Invaders games, emphasizing the use of PyGame for control of the game, incorporating sound, and using finite state machines to manage the behavior of enemies.

The purchaser of this book should follow the text using the listings of the complete games that can be downloaded from the author’s website as given in the book. Each complete listing is important in gaining a perspective on the entire project and all of the aspects of the code. Although the book has many fragments of code inserted to illustrate various points, context is important for understanding how everything fits together. The reader should also be aware that there are differences between the code snippets in the book and the corresponding segments in the listings from the website.

The coverage of the principal components of a game engine hits all of the main points: graphic and video, animation, physics, artificial intelligence, and finite state machines. These could have been discussed more extensively. In my opinion, it would have been desirable to focus the book much more on PyGame itself and not attempt to teach Python to the beginner. Knowledge of and skill in Python should have been a prerequisite. In addition, many of the figures are indistinct and blurred. This makes the book appear as if it had been rushed to print.

The book claims that PyGame is not just for the Raspberry Pi device. There are installs for other operating systems on the PyGame website. However, I was not successful in making PyGame work on my Windows laptop. It will be best to use it on the Raspberry Pi where everything is designed to work together.

Reviewer:  Anthony J. Duben Review #: CR145767 (1803-0144)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Games (K.8.0 ... )
 
 
Python (D.3.2 ... )
 
 
Real-Time And Embedded Systems (C.3 ... )
 
 
Special-Purpose And Application-Based Systems (C.3 )
 
Would you recommend this review?
yes
no
Other reviews under "Games": Date
How to beat your chess computer
Keene R., Levy D. (ed), Henry Holt, New York, NY, 1992. Type: Book (9780805023169)
Jun 1 1994
Relationships between fun and the computer business
Bushnell N. Communications of the ACM 39(9): 31-37, 1996. Type: Article
Apr 1 1997
NetWarriors online
Gradecki J., John Wiley & Sons, Inc., New York, NY, 1996. Type: Book (9780471135555)
Jul 1 1997
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy