0% found this document useful (0 votes)
39 views10 pages

Invent Your Own Computer Games With Python, 4th Edition Al Sweigart

Invent Your Own Computer Games with Python, 4th Edition by Al Sweigart is a programming book aimed at beginners, teaching them how to create computer games using Python. The book covers various topics including game design, coding, and debugging, with practical examples and projects. It is available under a Creative Commons license and can be accessed for free on the author's website.

Uploaded by

tsuzango1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views10 pages

Invent Your Own Computer Games With Python, 4th Edition Al Sweigart

Invent Your Own Computer Games with Python, 4th Edition by Al Sweigart is a programming book aimed at beginners, teaching them how to create computer games using Python. The book covers various topics including game design, coding, and debugging, with practical examples and projects. It is available under a Creative Commons license and can be accessed for free on the author's website.

Uploaded by

tsuzango1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

[Link]

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

[Link]

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

invent your own computer games


with python
[Link]/download/invent-your-own-computer-games-with-python-4th-e

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

[Link]/download/invent-your-own-computer-games-with-python-4th-e

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

INVENT
[Link]/download/invent-your-own-computer-games-with-python-4th-e
YOUR OWN
COMPUTER GAMES
WITH PYTHON
4TH EdITION

by Al Sweigart

San Francisco

This Book is Available on [Link]


Invent Your
invent yourOwn Computer
own computer Games
games with Python,
with python, 4th Edition Al Sweigart
4th edition.
Copyright © 2017 by Al Sweigart.

Some rights reserved. This work is licensed under the Creative Commons Attribution-NonCommercial-
ShareAlike 3.0 United States License. To view a copy of this license, visit [Link]
by-nc-sa/3.0/us/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

20 19 18 17 16 123456789

[Link]/download/invent-your-own-computer-games-with-python-4th-e
ISBN-10: 1-59327-795-4
ISBN-13: 978-1-59327-795-6

Publisher: William Pollock


Production Editor: Laurel Chun
Cover Illustration: Josh Ellingson
Interior Design: Octopod Studios
Developmental Editor: Jan Cash
Technical Reviewer: Ari Lacenski
Copyeditor: Rachel Monaghan
Compositor: Susan Glinert Stevens
Proofreader: Paula L. Fleming
Indexer: Nancy Guenther

The sprite images in Figure 20-1 on page 302, from left to right, were created by fsvieira, [Link],
LordNeo, and Suppercut. The grass sprite image in Figure 20-2 on page 302 was created by txturs. These
images have been dedicated to the public domain with a CC0 1.0 Public Domain Dedication.

For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900; info@[Link]
[Link]

Library of Congress Cataloging-in-Publication Data


Names: Sweigart, Al, author.
Title: Invent your own computer games with Python / by Al Sweigart.
Description: San Francisco : No Starch Press, Inc., [2017]
Identifiers: LCCN 2016037817 (print) | LCCN 2016044807 (ebook) | ISBN
9781593277956 | ISBN 1593277954 | ISBN 9781593278113 (epub) | ISBN
159327811X (epub) | ISBN 9781593278120 (mobi) | ISBN 1593278128 (mobi)
Subjects: LCSH: Computer games--Programming. | Python (Computer program
language)
Classification: LCC QA76.76.C672 S785 2017 (print) | LCC QA76.76.C672 (ebook)
| DDC 794.8/1526--dc23
LC record available at [Link]

No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other
product and company names mentioned herein may be the trademarks of their respective owners. Rather
than use a trademark symbol with every occurrence of a trademarked name, we are using the names only
in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.

The information in this book is distributed on an “As Is” basis, without warranty. While every precaution
has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or
indirectly by the information contained in it.

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

[Link]/download/invent-your-own-computer-games-with-python-4th-e
To Caro

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

about the author


[Link]/download/invent-your-own-computer-games-with-python-4th-e
Al Sweigart is a software developer, tech book author, and hoopy frood
who really knows where his towel is. He has written several programming
books for beginners, including Automate the Boring Stuff with Python and
Scratch Programming Playground, also from No Starch Press. His books are
freely available under a Creative Commons license at his website https://
[Link]/.

about the technical reviewer


Ari Lacenski is a developer of Android applications and Python software.
She lives in the Bay Area, where she writes about Android programming at
[Link] and mentors with Women Who Code.

This Book is Available on [Link]


Invent Your Own Computer Games with Python, 4th Edition Al Sweigart

[Link]/download/invent-your-own-computer-games-with-python-4th-e
Brief Contents

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

Chapter 1: The Interactive Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Chapter 2: Writing Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 3: Guess the Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Chapter 4: A Joke-Telling Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Chapter 5: Dragon Realm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Chapter 6: Using the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Chapter 7: Designing Hangman with Flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Chapter 8: Writing the Hangman Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Chapter 9: Extending Hangman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Chapter 10: Tic-Tac-Toe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Chapter 11: The Bagels Deduction Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Chapter 12: The Cartesian Coordinate System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Chapter 13: Sonar Treasure Hunt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Chapter 14: Caesar Cipher. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Chapter 15: The Reversegam Game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Chapter 16: Reversegam AI Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

Chapter 17: Creating Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Chapter 18: Animating Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

Chapter 19: Collision Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

This Book is Available on [Link]


Invent Your
Chapter Own
20: Using Computer
Sounds and Images. Games
. . . . . . . . .with
. . . . . Python,
. . . . . . . . . 4th
. . . . .Edition Al Sweigart
. . . . . 301

Chapter 21: A Dodger Game with Sounds and Images . . . . . . . . . . . . . . . . . . . . . . 311

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

[Link]/download/invent-your-own-computer-games-with-python-4th-e

This Book is Available on [Link]


viii Brief Contents

You might also like