Python Game Programming By Example

A pragmatic guide for developing your own games with Python
Preview in Mapt

Python Game Programming By Example

Alejandro Rodas de Paz, Joseph Howse

1 customer reviews
A pragmatic guide for developing your own games with Python
Mapt Subscription
FREE
$29.99/m after trial
eBook
$22.40
RRP $31.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Python Game Programming By Example Book Cover
Python Game Programming By Example
$ 31.99
$ 22.40
GameMaker Programming By Example Book Cover
GameMaker Programming By Example
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $32.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781785281532
Paperback230 pages

Book Description

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.

Table of Contents

Chapter 1: Hello, Pong!
Installing Python
An overview of Breakout
The basic GUI layout
Diving into the Canvas widget
Basic game objects
Adding the Breakout items
Movement and collisions
Starting the game
Playing Breakout
Summary
Chapter 2: Cocos Invaders
Installing cocos2d
Getting started with cocos2d
Creating game assets
Space Invaders design
Invaders!
Shoot'em up!
Summary
Chapter 3: Building a Tower Defense Game
The tower defense gameplay
Cocos2d actions
Adding a main menu
Tile maps
The scenario definition
Transitions between scenes
The tower defense actors
Game scene
Summary
Chapter 4: Steering Behaviors
NumPy installation
Implementing steering behaviors
Gravitation game
Summary
Chapter 5: Pygame and 3D
Installing packages
Getting started with OpenGL
Adding the Pygame library
Drawing with OpenGL
Basic collision detection game
Summary
Chapter 6: PyPlatformer
An introduction to game design
Introducing Pymunk
Building a game framework
Developing PyPlatformer
Summary
Chapter 7: Augmenting a Board Game with Computer Vision
Planning the Checkers application
Setting up OpenCV and other dependencies
Supporting multiple versions of OpenCV
Configuring cameras
Working with colors
Building the analyzer
Converting OpenCV images for wxPython
Building the GUI application
Troubleshooting the project in real-world conditions
Further reading on OpenCV
Summary

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

Authors

Table of Contents

Chapter 1: Hello, Pong!
Installing Python
An overview of Breakout
The basic GUI layout
Diving into the Canvas widget
Basic game objects
Adding the Breakout items
Movement and collisions
Starting the game
Playing Breakout
Summary
Chapter 2: Cocos Invaders
Installing cocos2d
Getting started with cocos2d
Creating game assets
Space Invaders design
Invaders!
Shoot'em up!
Summary
Chapter 3: Building a Tower Defense Game
The tower defense gameplay
Cocos2d actions
Adding a main menu
Tile maps
The scenario definition
Transitions between scenes
The tower defense actors
Game scene
Summary
Chapter 4: Steering Behaviors
NumPy installation
Implementing steering behaviors
Gravitation game
Summary
Chapter 5: Pygame and 3D
Installing packages
Getting started with OpenGL
Adding the Pygame library
Drawing with OpenGL
Basic collision detection game
Summary
Chapter 6: PyPlatformer
An introduction to game design
Introducing Pymunk
Building a game framework
Developing PyPlatformer
Summary
Chapter 7: Augmenting a Board Game with Computer Vision
Planning the Checkers application
Setting up OpenCV and other dependencies
Supporting multiple versions of OpenCV
Configuring cameras
Working with colors
Building the analyzer
Converting OpenCV images for wxPython
Building the GUI application
Troubleshooting the project in real-world conditions
Further reading on OpenCV
Summary

Book Details

ISBN 139781785281532
Paperback230 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Learning Data Mining with Python Book Cover
Learning Data Mining with Python
$ 35.99
$ 25.20
Python GUI Programming Cookbook Book Cover
Python GUI Programming Cookbook
$ 35.99
$ 25.20
Python Machine Learning Book Cover
Python Machine Learning
$ 35.99
$ 25.20
Mastering Object-oriented Python Book Cover
Mastering Object-oriented Python
$ 26.99
$ 18.90
Expert Python Programming Book Cover
Expert Python Programming
$ 26.99
$ 5.40
Zen Cart: E-commerce Application Development Book Cover
Zen Cart: E-commerce Application Development
$ 29.99
$ 21.00