Invent Your Own Computer Games with Python, 4/e (Paperback)
暫譯: 用 Python 創造自己的電腦遊戲,第四版 (平裝本)

Al Sweigart

買這商品的人也買了...

相關主題

商品描述

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.

商品描述(中文翻譯)

《用 Python 發明自己的電腦遊戲》將教你如何使用流行的 Python 程式語言製作電腦遊戲——即使你從未編程過也沒關係!

首先,從建立經典遊戲開始,例如猜字遊戲(Hangman)、猜數字(Guess the Number)和井字遊戲(Tic-Tac-Toe),然後逐步進入更高級的遊戲,例如基於文字的尋寶遊戲和帶有音效的動畫躲避碰撞遊戲。在這個過程中,你將學習關鍵的程式設計和數學概念,幫助你將遊戲編程提升到更高的水平。

學習如何:
- 將迴圈、變數和流程控制語句結合成真正可運行的程式
- 為任務選擇合適的資料結構,例如列表(lists)、字典(dictionaries)和元組(tuples)
- 使用 pygame 模組為你的遊戲添加圖形和動畫
- 處理鍵盤和滑鼠輸入
- 編寫簡單的人工智慧,讓你可以與電腦對戰
- 使用密碼學將文字訊息轉換為秘密代碼
- 除錯你的程式並找出常見錯誤

在你完成每個遊戲的過程中,你將建立扎實的 Python 基礎和計算機科學基本概念的理解。

你將用 Python 的力量創造出什麼新遊戲呢?

本書中的專案與 Python 3 兼容。