Buy New
-50%
$19.84$19.84
FREE delivery Monday, June 22 on orders shipped by Amazon over $35
Ships from: Amazon.com Sold by: Amazon.com
Used - Good
$8.99$8.99
FREE delivery June 26 - 30
Ships from: Books Today For You Sold by: Books Today For You
Sorry, there was a problem.
There was an error retrieving your Wish Lists. Please try again.Sorry, there was a problem.
List unavailable.
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Invent Your Own Computer Games with Python, 4th Edition
Purchase options and add-ons
Begin by building classic games like Hangman, Guess the Number, and Tic-Tac-Toe, and then work your way up to more advanced games, like a text-based treasure hunting game and an animated collision-dodging game with sound effects. Along the way, you’ll learn key programming and math concepts that will help you take your game programming to the next level.
Learn how to:
–Combine loops, variables, and flow control statements into real working programs
–Choose the right data structures for the job, such as lists, dictionaries, and tuples
–Add graphics and animation to your games with the pygame module
–Handle keyboard and mouse input
–Program simple artificial intelligence so you can play against the computer
–Use cryptography to convert text messages into secret code
–Debug your programs and find common errors
As you work through each game, you’ll build a solid foundation in Python and an understanding of computer science fundamentals.
What new game will you create with the power of Python?
The projects in this book are compatible with Python 3.
- Reading age10 years and up
- Print length376 pages
- LanguageEnglish
- Dimensions7.05 x 0.79 x 9.25 inches
- PublisherNo Starch Press
- Publication dateDecember 16, 2016
- ISBN-101593277954
- ISBN-13978-1593277956
Deals on related products
Customers also bought or read
- The Big Book of Small Python Projects: 81 Easy Practice Programs
Paperback$36.80$36.80FREE delivery Mon, Jun 22 - Object-Oriented Python: Master OOP by Building Games and GUIs
Paperback$17.76$17.76Delivery Mon, Jun 22 - Impractical Python Projects: Playful Programming Activities to Make You Smarter
Paperback$19.45$19.45Delivery Jun 29 - Jul 2 - Python for Kids, 2nd Edition: A Playful Introduction to Programming
Paperback$21.49$21.49Delivery Mon, Jun 22 - Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming#1 Best SellerFunctional Software Programming
Paperback$23.96$23.96Delivery Mon, Jun 22 - Cracking Codes with Python: An Introduction to Building and Breaking Ciphers
Paperback$21.17$21.17Delivery Mon, Jun 22 - Doing Math with Python: Use Programming to Explore Algebra, Statistics, Calculus, and More!
Paperback$24.30$24.30$3.99 delivery Jul 21 - Aug 10 - Learn to Code by Solving Problems: A Python Programming Primer
Paperback$21.18$21.18Delivery Mon, Jun 22 - Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More
Paperback$31.91$31.91Delivery Mon, Jun 22 - Modeling and Simulation in Python: An Introduction for Scientists and Engineers
Paperback$37.66$37.66FREE delivery Mon, Jun 22 - Beginning Game Development with Python and Pygame: From Novice to Professional (Beginning From Novice to Professional)
Paperback$51.45$51.45$3.99 delivery Jul 7 - 13 - Creative Coding in Python: 30+ Programming Projects in Art, Games, and More
Paperback$13.31$13.31Delivery Mon, Jun 22 - Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners
Paperback$20.22$20.22Delivery Mon, Jun 22 - Godot 4 for Beginners: Develop engaging 2D and 3D games with Godot 4's scripting and design features
Paperback$31.99$31.99Delivery Mon, Jun 22 - Learn to Program with Minecraft: Transform Your World with the Power of Python
Paperback$28.90$28.90Delivery Mon, Jun 22 - Dive Into Algorithms: A Pythonic Adventure for the Intrepid Beginner
Paperback$26.19$26.19$3.99 delivery Sat, Jul 11 - Think Like a Programmer: An Introduction to Creative Problem Solving
Paperback$22.55$22.55Delivery Jun 25 - 29 - Dead Simple Python: Idiomatic Python for the Impatient Programmer
Paperback$49.25$49.25FREE delivery Mon, Jun 22 - Real-World Python: A Hacker's Guide to Solving Problems with Code
Paperback$32.49$32.49Delivery Mon, Jun 22 - 100 Exercises for Practicing Python: A set of exercises with different levels of complexity | Beginner - Intermediate - Advanced | Solved exercises for all levels
Paperback$14.97$14.97Delivery Mon, Jun 22 - Practical SQL, 2nd Edition: A Beginner's Guide to Storytelling with Data#1 Best SellerComputer Programming Structured Design
Paperback$19.99$19.99Delivery Mon, Jun 22 - How Computers Really Work: A Hands-On Guide to the Inner Workings of the Machine
Paperback$27.65$27.65$3.95 delivery Jul 9 - 14
From the Publisher
About the Author
Al Sweigart is a software developer and teaches programming to kids and adults. He has written several Python books, including Automate the Boring Stuff with Python and Making Games with Python & Pygame.
About the Publisher
No Starch Press has published the finest in geek entertainment since 1994, creating both timely and timeless titles like Python Crash Course, Python for Kids, How Linux Works, and Hacking: The Art of Exploitation. An independent, San Francisco-based publishing company, No Starch Press focuses on a curated list of well-crafted books that make a difference. They publish on many topics, including computer programming, cybersecurity, operating systems, and LEGO. The titles have personality, the authors are passionate experts, and all the content goes through extensive editorial and technical reviews. Long known for its fun, fearless approach to technology, No Starch Press has earned wide support from STEM enthusiasts worldwide.
Editorial Reviews
Review
—Computerworld
“Many of the games include flowcharts so the reader will better understand the logic needed to complete the game, and I was especially happy to see a few chapters focus on topics not necessary limited to games such as Cartesian coordinates and using the built-in Debugger.”
—GeekDad
“This is an excellent way to learn Python, if you are a kid or not. Little kids can learn with their adult guide, and older kids will eat this book up in an afternoon or two.”
—Greg Laden, National Geographic's ScienceBlogs
“This book is a great entry point for beginning programmers that 'gamifies' coding, allowing readers to immediately apply the concepts covered, rather than teaching basics with little application.”
—School Library Connection
"If games are your thing, this would be the perfect book to learn Python."
—Rajat, @argent_codes
About the Author
Product details
- Publisher : No Starch Press
- Publication date : December 16, 2016
- Edition : 4th
- Language : English
- Print length : 376 pages
- ISBN-10 : 1593277954
- ISBN-13 : 978-1593277956
- Item Weight : 1.38 pounds
- Reading age : 10 years and up
- Dimensions : 7.05 x 0.79 x 9.25 inches
- Best Sellers Rank: #57,356 in Books (See Top 100 in Books)
- #14 in Game Programming
- Customer Reviews:
About the author

Al Sweigart is a software developer and tech book author living in Houston. He has written several programming books for beginners, including Automate the Boring Stuff with Python. His books are freely available under a Creative Commons license at his website https://inventwithpython.com.
Related products with free delivery on eligible orders
Customer reviews
- 5 star4 star3 star2 star1 star2 star82%13%5%0%0%0%
- 5 star4 star3 star2 star1 star1 star82%13%5%0%0%0%
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Generated from the text of customer reviewsSelect to learn more
Top reviews from the United States
- 5 out of 5 stars
Interest is the best teacher.
Reviewed in the United States on April 11, 2026Interest is the best teacher. That is why I choose this book to teach my sons Python.
The book is well written. My teenage son followed it to learn Python and build a few games in Python.
I will guide my son to continue to learn Python with the book as a reference.
I highly recommend it for kids and interested adults to learn programming in Python.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Best book for teaching beginners (children or adults!) how to program in Python from scratch.
Reviewed in the United States on October 23, 2017I just finished reading "Invent Your Own Computer Games with Python", and it's my new all-time favorite book for beginners who want to learn how to program. Al's outdone himself with this one. He does an incredible job of teaching the reader how to program in Python from scratch; whenever he comes to a concept that the reader may not be familiar with, he explains it clearly and thoroughly using simple English, and then demonstrates why the concept is useful.
The writing in this book is tight, engaging, entertaining, and just seriously impressive, and the projects are super fun too. I particularly liked the Tic-Tac-Toe project: I thought it was really clever to have the reader implement an AI for one of their games so early on in the book, instead of burying something fun like that in a later chapter.
I don't know if Al's gotten way better at writing over the past few years, or if he's gotten a great editor, or some combination of the two; but whatever the cause, this book really shines. When I read his book "Making Games with Python & Pygame" (published in 2012), I found that he sometimes explained concepts using frustratingly vague language, or introduced them in an order that bothered me, and I also noticed a few typos and bugs in that book's prose and code; I found basically zero such issues in "Invent Your Own Computer Games with Python".
The only main thing I wish he'd change is that he uses mixedCase for his variable and function names, but snake_case is the naming standard in Python programs (documented in PEP8). It's not obvious to me why he prefers mixedCase, and this seems like something that shouldn't have survived to the fourth edition of this book. All in all, though, this is a problem I'm more than willing to overlook, given how otherwise excellent this book is.
From now on, whenever a friend asks me what the best way is of learning to program, I'm going to point them directly to this book. Keep up the great work, Al!
52 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Learn Python through game program creation
Reviewed in the United States on November 6, 2025This book is a fun way to learn Python programming by teaching the language elements by writing games. From simple statements, using the debugger, designing programs logically with flowcharts, processing a main event loop, to incorporating player-missile graphics and sound, this books provides a good introduction to Python by building games and providing insights into how to build your own games.
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 4 out of 5 stars
Its a good book but with a warning
Reviewed in the United States on October 9, 2017Its a good book but with a warning. You learn a lot about logic and how to design your code/app. He explains each section of the code to you in detail about what it is doing. Right away he teaches you about debugging and how to use that to figure out how the code works. I'd recommend the book for any adult, I would not recommend giving it to your 10 year old kid as they may lose interest pretty quick. Some of the logic is definitely for someone with a bit of previous in school programming or past history of it. I've done simple coding and took Java in college and I even had to really think and investigate on some of the logic. I'd advise you to go over the book yourself before giving to your child to be able to help explain. Another warning is some of the code is really long, lots of typing. And I'd suggest downloading the source files as the code in the book isn't always correct to begin with so your app may not run.
28 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Another winner from No Starch Press.
Reviewed in the United States on May 31, 2026Writing simple games was an enjoyable way to learn Python. I had a great time typing in in the code, testing, and then seeing how I could customize these games.
You could ask AI to write these games for you. There is still value in undersanding how code wor
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Good Book
Reviewed in the United States on March 1, 2026Good coding book
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
A Must-Have Guide for Aspiring Programmers and Game Developers
Reviewed in the United States on April 28, 2025"Invent Your Own Computer Games with Python" is a truly fantastic book. It goes far beyond just teaching game creation; it lays a solid foundation in so many fundamental programming topics that are essential for writing any kind of software, not just games. You really learn the core concepts needed to succeed.
However, the way it uses game development to teach these concepts is definitely the best part! It makes learning engaging and practical. After working through this book, I genuinely feel equipped to create a huge range of projects, perhaps even anything I can imagine building.
Honestly, this was the best purchase I've made in a long time, and that's saying something because I'm not usually a huge fan of reading! If you want to learn Python and programming in a fun, hands-on way that delivers real results, I highly recommend this book. It truly empowers you to start inventing your own creations.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Amazing book for Gamedev basics
Reviewed in the United States on October 26, 2025I love video games im learning blender substance and so much more to better make my own assets but this book helps me with the basics with python games im usually into Unity or Unreal but I can say this has spread a new light on game development using this book
One person found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Top reviews from other countries
Correcaminos4 out of 5 starsBien para empezar
Reviewed in Spain on July 18, 2017Quizás hecho en falta más programas con entorno gráfico.Al final trata sobre pygame. Por lo demás muestra los programas de forma didáctica y amena
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Chandra5 out of 5 starsWorthy buy
Reviewed in India on August 12, 2024Bought this for my son who is in high school. Good to see him stuck to this book and coding on his own. Python is crucial in today’s context and hopefully his love for code grows further. Partly thanks to this book which teaches via a game-like narration.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Stargazer5 out of 5 starsExtremely useful and much much better than all the others I ...
Reviewed in the United Kingdom on May 25, 2017Extremely useful and much much better than all the others I have tried. It is carefully arranged so that progression and additions to any initial code can be clearly followed - simply by numbering lines of code and using bold print. This makes it SO much better other books that claim to be for beginners. One drawback that it does share with its competitors is the absence of a distinct and obviously different font for code words and lines of code. As printed, the difference is too slight unless concentration is high. However I still rate it very highly.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Anonymous5 out of 5 starsArrived safe and sound!
Reviewed in Canada on September 7, 2024Got here on time and in good condition. Looking forward to reading it.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Gabriel5 out of 5 starsExceptional Quality
Reviewed in Japan on February 12, 2024I had an excellent experience with Rarewaves-USA; they shipped my order promptly and everything arrived in perfect condition.
The book "Invent Your Own Computer Games with Python" is fantastic. The quality of the book exceeded my expectations and I am thrilled with my purchase. It really doesn't get any better than this!
Highly recommend both the seller and the book to anyone interested in programming or game development. Truly a great find!

5 out of 5 starsExceptional Quality
Reviewed in Japan on February 12, 2024I had an excellent experience with Rarewaves-USA; they shipped my order promptly and everything arrived in perfect condition.
The book "Invent Your Own Computer Games with Python" is fantastic. The quality of the book exceeded my expectations and I am thrilled with my purchase. It really doesn't get any better than this!
Highly recommend both the seller and the book to anyone interested in programming or game development. Truly a great find!
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again













