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