Python Game Programming by Example (Paperback)
暫譯: Python 遊戲程式設計實例解析 (平裝本)

Alejandro Rodas de Paz, Joseph Howse

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

商品描述

A pragmatic guide for developing your own games with Python

About This Book

  • Strengthen your fundamentals of game programming with Python language
  • Seven hands-on games to create 2D and 3D games rapidly from scratch
  • Illustrative guide to explore the different GUI libraries for building your games

Who This Book Is For

If you have ever wanted to create casual games in Python and you would like to explore various GUI technologies that this language offers, this is the book for you. This title is intended for beginners to Python with little or no knowledge of game development, and it covers step by step how to build seven different games, from the well-known Space Invaders to a classical 3D platformer.

What You Will Learn

  • Take advantage of Python's clean syntax to build games quickly
  • Discover distinct frameworks for developing graphical applications
  • Implement non-player characters (NPCs) with autonomous and seemingly intelligent behaviors
  • Design and code some popular games like Pong and tower defense
  • Compose maps and levels for your sprite-based games in an easy manner
  • Modularize and apply object-oriented principles during the design of your games
  • Exploit libraries like Chimpunk2D, cocos2d, and Tkinter
  • Create natural user interfaces (NUIs), using a camera and computer vision algorithms to interpret the player's real-world actions

In Detail

With a growing interest in learning to program, game development is an appealing topic for getting started with coding. From geometry to basic Artificial Intelligence algorithms, there are plenty of concepts that can be applied in almost every game. Python is a widely used general-purpose, high-level programming language. It provides constructs intended to enable clear programs on both a small and large scale. It is the third most popular language whose grammatical syntax is not predominantly based on C. Python is also very easy to code and is also highly flexible, which is exactly what is required for game development. The user-friendliness of this language allows beginners to code games without too much effort or training. Python also works with very little code and in most cases uses the “use cases” approach, reserving lengthy explicit coding for outliers and exceptions, making game development an achievable feat.

Python Game Programming by Example enables readers to develop cool and popular games in Python without having in-depth programming knowledge of Python. The book includes seven hands-on projects developed with several well-known Python packages, as well as a comprehensive explanation about the theory and design of each game.

It will teach readers about the techniques of game design and coding of some popular games like Pong and tower defense. Thereafter, it will allow readers to add levels of complexities to make the games more fun and realistic using 3D.

At the end of the book, you will have added several GUI libraries like Chimpunk2D, cocos2d, and Tkinter in your tool belt, as well as a handful of recipes and algorithms for developing games with Python.

Style and approach

This book is an example-based guide that will teach you to build games using Python. This book follows a step-by-step approach as it is aimed at beginners who would like to get started with basic game development. By the end of this book you will be competent game developers with good knowledge of programming in Python.

商品描述(中文翻譯)

使用 Python 開發您自己的遊戲的務實指南

關於本書


  • 加強您在 Python 語言中的遊戲程式設計基礎

  • 七個實作遊戲,快速從零開始創建 2D 和 3D 遊戲

  • 插圖指南,探索不同的 GUI 函式庫以構建您的遊戲

本書適合誰

如果您曾經想用 Python 創建休閒遊戲,並希望探索這種語言所提供的各種 GUI 技術,那麼這本書就是為您而寫的。本書旨在幫助對 Python 和遊戲開發幾乎沒有知識的初學者,逐步介紹如何構建七種不同的遊戲,從知名的《太空侵略者》到經典的 3D 平台遊戲。

您將學到什麼


  • 利用 Python 的簡潔語法快速構建遊戲

  • 發現開發圖形應用程式的不同框架

  • 實現具有自主和看似智能行為的非玩家角色 (NPC)

  • 設計和編碼一些受歡迎的遊戲,如 Pong 和塔防

  • 輕鬆為您的精靈遊戲編排地圖和關卡

  • 在遊戲設計中模組化並應用物件導向原則

  • 利用 Chimpunk2D、cocos2d 和 Tkinter 等函式庫

  • 創建自然用戶界面 (NUI),使用相機和計算機視覺算法來解釋玩家的現實世界行為

詳細內容

隨著對學習程式設計的興趣日益增長,遊戲開發成為開始編碼的吸引主題。從幾何學到基本的人工智慧算法,幾乎每個遊戲都可以應用許多概念。Python 是一種廣泛使用的通用高級程式語言。它提供的結構旨在使小型和大型程式都能清晰易懂。它是第三受歡迎的語言,其語法並不主要基於 C。Python 也非常容易編碼,並且高度靈活,這正是遊戲開發所需的。這種語言的用戶友好性使初學者能夠輕鬆編碼遊戲,而不需要太多的努力或訓練。Python 的程式碼量也很少,在大多數情況下使用“用例”方法,將冗長的明確編碼保留給例外情況,使遊戲開發成為一項可實現的成就。

《Python 遊戲程式設計範例》使讀者能夠在不具備深入 Python 程式設計知識的情況下開發酷炫和受歡迎的遊戲。本書包括七個實作專案,使用幾個知名的 Python 套件開發,並對每個遊戲的理論和設計進行了全面的解釋。

它將教導讀者遊戲設計和編碼的一些流行遊戲的技術,如 Pong 和塔防。之後,它將允許讀者增加複雜性,使遊戲更有趣和現實,使用 3D 技術。

在本書結尾,您將在您的工具箱中添加幾個 GUI 函式庫,如 Chimpunk2D、cocos2d 和 Tkinter,以及一些用於使用 Python 開發遊戲的配方和算法。

風格與方法

本書是一個基於範例的指南,將教您使用 Python 構建遊戲。本書遵循逐步的方法,旨在幫助希望開始基本遊戲開發的初學者。在本書結束時,您將成為具備良好 Python 程式設計知識的合格遊戲開發者。