Python Game Programming By Example

 
 
Packt Publishing Limited
  • 1. Auflage
  • |
  • erschienen am 28. September 2015
  • |
  • 230 Seiten
 
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
E-Book | PDF mit Adobe DRM | Systemvoraussetzungen
978-1-78528-391-8 (ISBN)
 
A pragmatic guide for developing your own games with PythonAbout This BookStrengthen your fundamentals of game programming with Python languageSeven hands-on games to create 2D and 3D games rapidly from scratchIllustrative guide to explore the different GUI libraries for building your gamesWho This Book Is ForIf 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 LearnTake advantage of Python's clean syntax to build games quicklyDiscover distinct frameworks for developing graphical applicationsImplement non-player characters (NPCs) with autonomous and seemingly intelligent behaviorsDesign and code some popular games like Pong and tower defenseCompose maps and levels for your sprite-based games in an easy mannerModularize and apply object-oriented principles during the design of your gamesExploit libraries like Chimpunk2D, cocos2d, and TkinterCreate natural user interfaces (NUIs), using a camera and computer vision algorithms to interpret the player's real-world actionsIn DetailWith 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 &quote;use cases&quote; 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 approachThis 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.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
978-1-78528-391-8 (9781785283918)
178528391X (178528391X)
weitere Ausgaben werden ermittelt
Alejandro Rodas de Paz is a computer engineer and game developer from Seville, Spain.
He came across Python back in 2009, while he was studying at the University of Seville. Alejandro developed several academic projects with Python, from web crawlers to artificial intelligence algorithms. In his spare time, he started building his own games in Python. He did a minor in game design at Hogeschool van Amsterdam, where he created a small 3D game engine based on the ideas he learned during this minor.
He has also developed some open source projects, such as a Python API for the Philips Hue personal lighting system. You can find these projects in his GitHub account at https://github.com/aleroddepaz.
Prior to this publication, Alejandro collaborated with Packt Publishing as a technical reviewer on the book Tkinter GUI Application Development Hotshot. Joseph Howse is a writer, software developer, and business owner from Halifax, Nova Scotia, Canada. Computer games and code are imbibed in his earliest memories, as he learned to read and type by playing text adventures with his older brother, Sam, and watching him write graphics demos in BASIC.
Joseph's other books include OpenCV for Secret Agents, OpenCV Blueprints, Android Application Programming with OpenCV 3, and Learning OpenCV 3 Computer Vision with Python. He works with his cats to make computer vision systems for humans, felines, and other users. Visit http://nummist.com to read about some of his latest projects done at Nummist Media Corporation Limited.
  • Cover
  • Copyright
  • Credits
  • About the Authors
  • About the Reviewers
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Configuring the analyzer based on user input
  • Updating and showing images
  • Running the application
  • Troubleshooting the project in real-world conditions
  • Further reading on OpenCV
  • Summary
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

32,73 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
PDF mit Adobe DRM
siehe Systemvoraussetzungen
Hinweis: Die Auswahl des von Ihnen gewünschten Dateiformats und des Kopierschutzes erfolgt erst im System des E-Book Anbieters
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung dieser Web-Seiten erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok