Close Modal

Invent Your Own Computer Games with Python, 4th Edition

Look inside
Paperback
7.06"W x 9.25"H x 0.79"D   | 22 oz | 20 per carton
On sale Dec 16, 2016 | 376 Pages | 9781593277956
Reading Level: Lexile 1030L
Invent Your Own Computer Games with Python will teach you how to make computer games using the popular Python programming language—even if you’ve never programmed before!

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.
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.
Available for sale exclusive:
•     Afghanistan
•     Aland Islands
•     Albania
•     Algeria
•     Andorra
•     Angola
•     Anguilla
•     Antarctica
•     Antigua/Barbuda
•     Argentina
•     Armenia
•     Aruba
•     Australia
•     Austria
•     Azerbaijan
•     Bahamas
•     Bahrain
•     Bangladesh
•     Barbados
•     Belarus
•     Belgium
•     Belize
•     Benin
•     Bermuda
•     Bhutan
•     Bolivia
•     Bonaire, Saba
•     Bosnia Herzeg.
•     Botswana
•     Bouvet Island
•     Brazil
•     Brit.Ind.Oc.Ter
•     Brit.Virgin Is.
•     Brunei
•     Bulgaria
•     Burkina Faso
•     Burundi
•     Cambodia
•     Cameroon
•     Canada
•     Cape Verde
•     Cayman Islands
•     Centr.Afr.Rep.
•     Chad
•     Chile
•     China
•     Christmas Islnd
•     Cocos Islands
•     Colombia
•     Comoro Is.
•     Congo
•     Cook Islands
•     Costa Rica
•     Croatia
•     Cuba
•     Curacao
•     Cyprus
•     Czech Republic
•     Dem. Rep. Congo
•     Denmark
•     Djibouti
•     Dominica
•     Dominican Rep.
•     Ecuador
•     Egypt
•     El Salvador
•     Equatorial Gui.
•     Eritrea
•     Estonia
•     Ethiopia
•     Falkland Islnds
•     Faroe Islands
•     Fiji
•     Finland
•     France
•     Fren.Polynesia
•     French Guinea
•     Gabon
•     Gambia
•     Georgia
•     Germany
•     Ghana
•     Gibraltar
•     Greece
•     Greenland
•     Grenada
•     Guadeloupe
•     Guam
•     Guatemala
•     Guernsey
•     Guinea Republic
•     Guinea-Bissau
•     Guyana
•     Haiti
•     Heard/McDon.Isl
•     Honduras
•     Hong Kong
•     Hungary
•     Iceland
•     India
•     Indonesia
•     Iran
•     Iraq
•     Ireland
•     Isle of Man
•     Israel
•     Italy
•     Ivory Coast
•     Jamaica
•     Japan
•     Jersey
•     Jordan
•     Kazakhstan
•     Kenya
•     Kiribati
•     Kuwait
•     Kyrgyzstan
•     Laos
•     Latvia
•     Lebanon
•     Lesotho
•     Liberia
•     Libya
•     Liechtenstein
•     Lithuania
•     Luxembourg
•     Macau
•     Macedonia
•     Madagascar
•     Malawi
•     Malaysia
•     Maldives
•     Mali
•     Malta
•     Marshall island
•     Martinique
•     Mauritania
•     Mauritius
•     Mayotte
•     Mexico
•     Micronesia
•     Minor Outl.Ins.
•     Moldavia
•     Monaco
•     Mongolia
•     Montenegro
•     Montserrat
•     Morocco
•     Mozambique
•     Myanmar
•     Namibia
•     Nauru
•     Nepal
•     Netherlands
•     New Caledonia
•     New Zealand
•     Nicaragua
•     Niger
•     Nigeria
•     Niue
•     Norfolk Island
•     North Korea
•     North Mariana
•     Norway
•     Oman
•     Pakistan
•     Palau
•     Palestinian Ter
•     Panama
•     PapuaNewGuinea
•     Paraguay
•     Peru
•     Philippines
•     Pitcairn Islnds
•     Poland
•     Portugal
•     Puerto Rico
•     Qatar
•     Reunion Island
•     Romania
•     Russian Fed.
•     Rwanda
•     S. Sandwich Ins
•     Saint Martin
•     Samoa,American
•     San Marino
•     SaoTome Princip
•     Saudi Arabia
•     Senegal
•     Serbia
•     Seychelles
•     Sierra Leone
•     Singapore
•     Sint Maarten
•     Slovakia
•     Slovenia
•     Solomon Islands
•     Somalia
•     South Africa
•     South Korea
•     South Sudan
•     Spain
•     Sri Lanka
•     St Barthelemy
•     St. Helena
•     St. Lucia
•     St. Vincent
•     St.Chr.,Nevis
•     St.Pier,Miquel.
•     Sth Terr. Franc
•     Sudan
•     Suriname
•     Svalbard
•     Swaziland
•     Sweden
•     Switzerland
•     Syria
•     Tadschikistan
•     Taiwan
•     Tanzania
•     Thailand
•     Timor-Leste
•     Togo
•     Tokelau Islands
•     Tonga
•     Trinidad,Tobago
•     Tunisia
•     Turkey
•     Turkmenistan
•     Turks&Caicos Is
•     Tuvalu
•     US Virgin Is.
•     USA
•     Uganda
•     Ukraine
•     Unit.Arab Emir.
•     United Kingdom
•     Uruguay
•     Uzbekistan
•     Vanuatu
•     Vatican City
•     Venezuela
•     Vietnam
•     Wallis,Futuna
•     West Saharan
•     Western Samoa
•     Yemen
•     Zambia
•     Zimbabwe

Chapter 1: The Interactive Shell
Chapter 2: Writing Programs
Chapter 3: Guess the Number
Chapter 4: Jokes
Chapter 5: Dragon Realm
Chapter 6: Using the Debugger
Chapter 7: Designing Hangman with Flowcharts
Chapter 8: Writing the Hangman Code
Chapter 9: Extending Hangman
Chapter 10: Tic-Tac-Toe
Chapter 11: Bagels
Chapter 12: Cartesian Coordinates
Chapter 13: Sonar Treasure Hunt
Chapter 14: Caesar Cipher
Chapter 15: Reversi
Chapter 16: AI Simulation
Chapter 17: Using Pygame and Graphics
Chapter 18: Animating Graphics
Chapter 19: Collision Detection and Input
Chapter 20: Sounds and Images
Chapter 21: Dodger
“Pretty close to the ultimate how-to-learn python book. First, it combines an easy ramp up from expecting you to know virtually nothing to having you try out – and understand – Python. Second, it provides the code, the tools, and the explanations required for you build a number of increasingly sophisticated games and the know-how to branch out to creating games completely on your own.”
—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

Invent Your Own Computer Games with Python will teach you how to make computer games using the popular Python programming language—even if you’ve never programmed before!

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.

Creators

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.

Table of Contents

Chapter 1: The Interactive Shell
Chapter 2: Writing Programs
Chapter 3: Guess the Number
Chapter 4: Jokes
Chapter 5: Dragon Realm
Chapter 6: Using the Debugger
Chapter 7: Designing Hangman with Flowcharts
Chapter 8: Writing the Hangman Code
Chapter 9: Extending Hangman
Chapter 10: Tic-Tac-Toe
Chapter 11: Bagels
Chapter 12: Cartesian Coordinates
Chapter 13: Sonar Treasure Hunt
Chapter 14: Caesar Cipher
Chapter 15: Reversi
Chapter 16: AI Simulation
Chapter 17: Using Pygame and Graphics
Chapter 18: Animating Graphics
Chapter 19: Collision Detection and Input
Chapter 20: Sounds and Images
Chapter 21: Dodger

Praise

“Pretty close to the ultimate how-to-learn python book. First, it combines an easy ramp up from expecting you to know virtually nothing to having you try out – and understand – Python. Second, it provides the code, the tools, and the explanations required for you build a number of increasingly sophisticated games and the know-how to branch out to creating games completely on your own.”
—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
Penguin Random House Comics Retail