I haven't read that book but I just glanced at a sample from it and the first thing I saw was:
- Code: Select all
global FPSCLOCK, DISPLAYSURF, BASICFONT, RESET_SURF, RESET_RECT, NEW_SURF, NEW_RECT, SOLVE_SURF, SOLVE_RECT
I would get that book as far away from anyone trying to learn python as possible.
I really do believe that people try to delve into making "games" far to quickly. I understand the need to feel like you are "creating something" as you learn, but you will do much better if you learn the basics soundly first (and yes this includes classes/OO). I have attempted to help people in the past with pygame who are just starting and want to make something like a platformer. Suffice to say they get out of their depth almost immediately. Everything in pygame (and most APIs for that matter) is based on classes. If you don't understand what classes are, what they are for, or how they work, you won't get anywhere. You will be cutting and pasting code because you have seen it before and not because you understand it.
Edit: Looked at that book a little more. He does almost everything I tell people to never do in pygame. He collapses his namespace; he updates the display in multiple functions rather than in one place. He iterates through the event queue with a for loop in multiple places. Anyway enough ranting... my advice is to find something better.
Edit2: Just realized I was looking at the other book listed there. Not the one mentioned. So my above comments apply to "Making Games with Python and Pygame," not to "Invent Your Own Computer Games with Python". I will take a look at that one later.