Skip to content
Scan a barcode
Scan
Paperback Learn Pygame by Building Games: A Hands-On Python Game Dev Guide Book

ISBN: B0HHN586G2

ISBN13: 9798171474614

Learn Pygame by Building Games: A Hands-On Python Game Dev Guide

The fastest way to learn game programming is to build games, and this book has you doing exactly that from the first chapter. You start with a blank window and finish with a complete, downloadable top-down dungeon crawler, and along the way you build eight playable games in Python with Pygame. Each project introduces the concepts you need at the moment you need them, so nothing is abstract and every idea is attached to something running on your screen. You will build a bouncing ball to learn the game loop and delta-time movement, then Pong for input, rectangles, collision and a first AI opponent. A catch-the-falling-objects game teaches spawning and timers, then gets rebuilt on Pygame's sprite system so you can see exactly what that system saves you. Snake shifts your thinking to grids and cells. Breakout tackles the collision problem Pong dodged: when the ball hits a brick, which side did it hit, and how should it bounce? An Asteroids-style shooter introduces vectors, rotation and screen wrapping, and then gets covered in particles, screen shake and the small timing tricks that turn a working game into one that feels good to play. The back half of the book builds a full platformer across several chapters: a jump tuned for feel with variable height, coyote time and jump buffering, a fixed timestep so physics behaves identically on every machine, tilemaps and a scrolling camera, animation from spritesheets, enemies with state-machine AI, and a combat system with hitboxes, knockback and invulnerability frames. You wrap it in a real scene system with menus, a pause screen and settings, add sound and music, and make progress and high scores survive the game closing. The capstone pulls everything together into a dungeon crawler with rooms, enemies, items, a boss, and a save system. The final chapters cover profiling and optimizing a finished game, and packaging it with PyInstaller for Windows, macOS and Linux, plus a web build with pygbag, so other people can actually download and play what you made. Every line of code is explained, every game runs, and every chapter ends with challenges that extend that chapter's game. Short interlude chapters cover skills that apply to all of it: reading error messages and debugging, keeping a project small enough to finish, difficulty and fairness, and structuring a larger codebase. Two appendices give a Pygame quick reference and a troubleshooting guide organized by symptom. This book is for readers who know the basics of Python and want to make it move, and for anyone who has tried Pygame before and got stuck past the tutorial stage. You do not need any prior game development experience. You need a little Python and the willingness to type the code in.

Recommended

Format: Paperback

Condition: New

$24.99
Ships within 2-3 days
Save to List

Customer Reviews

0 rating
Copyright © 2026 Thriftbooks.com Terms of Use | Privacy Policy | Do Not Sell/Share My Personal Information | Cookie Policy | Cookie Preferences | Accessibility Statement
ThriftBooks ® and the ThriftBooks ® logo are registered trademarks of Thrift Books Global, LLC
GoDaddy Verified and Secured