October 7, 2007 will

Table of Contents for Pygame Book

The following is a list of the chapter titles for Beginning Game Development with Python and Pygame, and a brief explanation of the contents.

Any questions about the book contents, let me know!


  1. Introducing Python

    Introduction to basic Python.

  2. Exploring Python

    Goes a little deeper in to Python, covers Classes.

  3. Introducing Pygame

    Explains how import and use Pygame.

  4. Creating Visuals

    Covers different ways of drawing to the screen.

  5. Making Things Move

    Explains animation, vectors and time-based movement.

  6. Accepting User Input

    Covers how to read input devices and connect them to in-game motion.

  7. Take Me to Your Leader

    Covers artificial intelligence.

  8. Moving into the Third Dimension

    Explains the basic 3D concepts, with samples.

  9. Exploring the Third Dimension

    Covers 3D maths and introduces OpenGL.

  10. Making Things Go Boom

    Sound and Music.

  11. Lights, Camera, Action!

    Covers textures and reading 3D models from files.

  12. Setting the Scene with OpenGL

    Covers lighting, blending, fog and other OpenGL features.


  • A. GameObjects Reference
  • B. How to package Pygame games
Use Markdown for formatting
*Italic* **Bold** `inline code`

Links to [Google](http://www.google.com)

> This is a quote

import this
your comment will be previewed here
Tennessee Leeuwenburg 8 years ago

Hi Will,

I am the Editor-In-Chief of "The Python Papers". I'd love to include something covering your book in our next issue. If you'd be interested in contributing a little content, I'd love to give you some air-time.

Contact me at tleeuwenburg@gmail.com if you are interested.


DeanG 8 years ago

Very exciting stuff!
I'm very glad to see Appendix B. Please consider either another chapter or appendix to summarize advanced topics. Frankly, knowing the keywords and basic approach will help [give the necessary clues to] those who will proceed from the book to the internet. Examples: Internet Play: PyGame and Networking, Threads, Twisted, Perceived and Real Limitations (side scrollers?), Cross Platform concerns, Beyond CPython: Stackless, IronPython/Mono and Jython?, Screenshots and Printing, Adding Scripting to your Game....better stop before I completely discredit myself. ;-)

phil hassey 8 years ago

Hey -

I maintain the pygame website... If you want some kind of coverage there, send me an e-mail and we can figure out a "News item" to post on the front page, or something.

In the meantime, feel free to add mention of the book to the wiki.


Will 8 years ago


Those are all great topics, but the book has gone to the printers and I think I would need another book to do justice to those subjects! Maybe I can cover them in a sequel!


DeanG 8 years ago

Sorry, I hadn't realized it was in printer. Congratulations! Guess we can chalk that list up to Wiki and Blog entry topics. :-)

Bruce 8 years ago

I bought this book and it's awesome :)
I'm on chapter 2.

Will 8 years ago

Hope you enjoy it Bruce! :)

wdh 8 years ago

I bought a copy of the book a while back and you've certainly got me hooked on game programming, but have a question I'd like to ask about the use of 3D with Pygame. Many game development web sites talk about the concepts of "world space" (an entity's position relative to the game world's origin) and "local space" (an entity's position/orientation relative to it's own origin), but your book does not mention these concepts as far as I can tell (this is not a criticism by the way, just a curiosity). Google does not reveal anything on the topic relating to Python/Pygame whatsoever.

I've read that vectors and points can be transformed from world space to local space and vice versa using matrices, but to be honest I don't really understand why you need local space at all. Most examples talk about local space as being useful when you need to calculate positions of other objects relative to the object whose local space you are using, but as you demonstrate in the book with the soldier/droid example on page 168, this is perfectly possible in what I understand to be "world space".

I'm fairly certain I'm just missing something due to a lack of understanding (hey, I'm a novice) but I'd be interested to know what your thoughts are on the above. Do you make the distinction between world and local space in your more advanced games, i.e. are they just topics that would not fit in 300 pages? Or are they irrelevant?


Will 8 years ago

Hi wdh,

I can't remember if I used the term 'local space' explicitly in the book -- I'm guessing I didn't -- but local space is simply the coordinates of a model before they are transformed. World space is the coordinates of the model after they have been transformed. I guess you have already figured that out.

It is possible to work entirely with world space, but sometimes it can simplify certain calculations if you use local space. For instance if you have a complex model of a space ship and you want to test if it has come in to contact with a energy bolt (approximated by a sphere) you could transform all the points in the ship to world space and do the test... or you could transform a single point for the sphere centre to the local space of the ship model. Transforming a single point is obviously quicker than transforming many.

Another example would be a game character with a certain field of view. You may have to transform other objects in to the characters local space to determin if it can see them.

Hope that helps!


kiran 7 years ago

I am passionate about python and pygame and so i went through your book which is awesome, but where can i clarify my doubts in that book.(cause some of the results are mismatching (Ex: Tank game, i am geeting some memory location when i am printing the tank like “bob (30 armor,10 ammo,true)” ; “ bob (tank1.Tank object at 0x00C59CB0)”
Malcolm Sutherland 6 years ago
Dear Sir,

I recently purchased your book, as part of my decision to quit science and retrain as a computer scientist. (Environmental Science as a job sector is dead in the UK.) So far it's been insightful and easy to follow, until I came across Listing 5.14 in Chapter 5 (page 107). I've tried over and over again to run this code (of course I added the preceding code such as def __init__, etc).

Could you advise me on how exactly the full code for Listing 5.14 is written? This would be very helpful to a novice like me struggling to reinvent himself. Thanks.
Zane Armstrong 5 years ago
I have been reading and trying out the examples in the book for a while now and its been a fantastic resource for how to program games and use pygame as well. Its probably the definitive text on this subject at the moment given there are no other books on this subject around.

This book has definately taught me how to use pygame and how to read the pygame documentation online and how to make games which of course is the primary goal of any one wanting to use pygame.

The topics covered in the book are useful to any game programmer and have supercharged my understanding of making games in python and pygame.

I would however have found a short introduction to collision detection among objects really useful as well.

I totally recommend this book to anyone learning pygame and game programming.

Keep up the good work Will. You rock.
Doudoulolita 5 years ago
Hello, I was very happy to read your book but sorry not to find it in french. I really hope it will be translated.
I hope you can read french a little and read a bit of this topic:
It explains that I teach how to use computer to beginners and that I would like to introduce programming video game to teenagers. So before, I ask for help to understand programming better myself ! I hope you don't mind that I use a lot of examples from your book, as I liked it so much.
For this purpose and for fun, I also participate to a project: http://usf.tuxfamily.org/wiki/User_talk:Doudoulolita
May be I will be able one day to help USF's programmers for the code, thanks to your book !
Another important thing: I like sushi, too !
Will McGugan 5 years ago
DouDoulolita, Glad you like my book (and sushi)!

I'm delighted you will be using my book to teach programming. Feel free to use any of the code/samples. I don't speak French, but I got the gist of it from Google translate. Best of luck with it…