Python Game Programming By Example - Programmer Books

[Pages:351] Python Game Programming By Example

Table of Contents

Python Game Programming By Example Credits About the Authors About the Reviewers

Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders

Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Downloading the color images of this book Errata Piracy Questions

1. Hello, Pong! Installing Python An overview of Breakout The basic GUI layout Diving into the Canvas widget Basic game objects The Ball class The Paddle class The Brick class

Adding the Breakout items Movement and collisions Starting the game Playing Breakout Summary 2. Cocos Invaders Installing cocos2d Getting started with cocos2d

Handling user input Updating the scene Processing collisions Creating game assets Space Invaders design The PlayerCannon and GameLayer classes Invaders! Shoot'em up! Adding an HUD Extra feature ? the mystery ship Summary 3. Building a Tower Defense Game The tower defense gameplay Cocos2d actions Interval actions Instant actions Combining actions Custom actions Adding a main menu Tile maps Tiled Map Editor Loading tiles The scenario definition

The scenario class Transitions between scenes

Game over cut scene The tower defense actors

Turrets and slots Enemies Bunker Game scene The HUD class Assembling the scene Summary 4. Steering Behaviors NumPy installation The ParticleSystem class A quick demonstration Implementing steering behaviors Seek and flee Arrival Pursuit and evade Wander Obstacle avoidance Gravitation game Basic game objects Planets and pickups Player and enemies Explosions The game layer Summary 5. Pygame and 3D Installing packages Getting started with OpenGL

Initializing the window Drawing shapes Running the demo Refactoring our OpenGL program Processing the user input Adding the Pygame library Pygame 101 Pygame integration Drawing with OpenGL The Cube class Enabling face culling Basic collision detection game Summary 6. PyPlatformer An introduction to game design Level design Platformer skills Component-based game engines Introducing Pymunk Building a game framework Adding physics Renderable components

The Camera component The InputManager module The Game class Developing PyPlatformer Creating the platforms Adding pickups Shooting! The Player class and its components The PyPlatformer class

Summary 7. Augmenting a Board Game with Computer Vision

Planning the Checkers application Setting up OpenCV and other dependencies

Windows Mac Debian and its derivatives, including Raspbian, Ubuntu, and Linux Mint Fedora and its derivatives, including RHEL and CentOS OpenSUSE and its derivatives Supporting multiple versions of OpenCV Configuring cameras Working with colors Building the analyzer Providing access to the images and classification results Providing access to parameters for the user to configure Initializing the entire model of the game Updating the entire model of the game Capturing and converting an image Detecting the board's corners and tracking their motion Creating and analyzing the bird's-eye view of the board Analyzing the dominant colors in a square Classifying the contents of a square Drawing text Converting OpenCV images for wxPython Building the GUI application Creating a window and binding events Creating and laying out images in the GUI Creating and laying out controls Nesting layouts and setting the root layout Starting a background thread Closing a window and stopping a background thread

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download