Python Game Programming by Example (Paperback)

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技術的人。本書針對初學者,無論是對遊戲開發知識了解很少或者完全不了解的人,逐步介紹了如何建立七個不同的遊戲,從著名的太空侵略者到經典的3D平台遊戲。

你將學到什麼
- 利用Python的清晰語法快速構建遊戲
- 探索不同的框架來開發圖形應用程序
- 實現具有自主和看似智能行為的非玩家角色(NPC)
- 設計和編寫一些流行的遊戲,如乒乓球和塔防遊戲
- 輕鬆為基於精靈的遊戲創建地圖和關卡
- 在遊戲設計過程中模塊化並應用面向對象的原則
- 利用Chimpunk2D、cocos2d和Tkinter等庫
- 使用攝像頭和計算機視覺算法創建自然用戶界面(NUI),解釋玩家的現實世界動作

詳細內容
隨著對學習編程的興趣日益增長,遊戲開發成為一個吸引人的主題。從幾何到基本的人工智能算法,幾乎每個遊戲都可以應用許多概念。Python是一種廣泛使用的通用高級編程語言。它提供的結構旨在實現小型和大型規模上的清晰程序。它是第三種最受歡迎的語言,其語法結構不主要基於C。Python編程也非常簡單,並且非常靈活,這正是遊戲開發所需的。這種語言的易用性使得初學者可以輕鬆編寫遊戲,無需太多努力或培訓。Python也可以用很少的代碼工作,在大多數情況下使用“用例”方法,將冗長的顯式編碼保留給異常情況和例外情況,使遊戲開發成為一項可實現的任務。

《Python遊戲編程實例》使讀者能夠在不需要深入了解Python編程知識的情況下,使用Python開發酷炫且受歡迎的遊戲。本書包含七個實踐項目,使用了幾個著名的Python包,並對每個遊戲的理論和設計進行了全面的解釋。

本書將教讀者遊戲設計技術和編碼,如乒乓球和塔防遊戲。此後,它將允許讀者添加更多的複雜性,以使遊戲更有趣和逼真,包括3D效果。

在本書結束時,你將掌握Chimpunk2D、cocos2d和Tkinter等幾個GUI庫,以及開發Python遊戲的一些技巧和算法。

風格和方法
本書是一本以實例為基礎的指南,將教你使用Python構建遊戲。本書遵循逐步的方法,適合想要入門基礎遊戲開發的初學者。通過閱讀本書,你將成為具有良好Python編程知識的優秀遊戲開發者。