Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Carol Vorderman, Craig Steele, Claire Quigley, Daniel McCafferty, Martin Goodfellow

Rating No ratings yet

A visual step-by-step guide to writing code in Python. Beginners and experienced programmers can use Python to build and play computer games, from mind-bending brainteasers to crazy action games with explosive sound effects and 3-D graphics. Each chapter in Coding Games in Python shows how to construct a complete working game in simple numbered steps. The book teaches how to use freely available resources, such as PyGame Zero and Blender, to add animations, music, scrolling backgrounds, 3-D scenery, and other pieces of professional wizardry to games. After building a game, instructions show how to adapt it using secret hacks and cheat codes. Instructions are illustrated with zany Minecraft-style pixel art. Master the key concepts that programmers need to write code--not just in Python, but in all programming languages. Find out what bugs, loops, flags, strings, tuples, toggles, and turtles are. Learn how to plan and design the ultimate game--and then play it to destruction as you test and debug it. With coding theory interwoven into the instructions for building each game, learning coding is made effortless and fun.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# Coding Games in Python — Reading Guide ## 【One-Line Pitch】 A hands-on, project-based introduction to Python that teaches real programming concepts by building complete, playable games—perfect for young learners, complete beginners, and Scratch graduates ready to move to text-based coding. ## 【Book Arc】 - **Opening (~0%–12%)**: Front matter, author bios, and the book's philosophy—positioning Python as a beginner-friendly yet professional language and framing game development as the ideal way to learn coding by combining theory with practice. - **Early (~12%–29%)**: Table of contents reveals the book's structure: a "Getting Started" section, a "Learning the Basics" section, and eight game projects (Shoot the Fruit, Coin Collector, Follow the Numbers, Red Alert, Big Quiz, Balloon Flight, Dance Challenge, Happy Garden, Sleeping Dragons), followed by a reference section. - **Middle (~29%–47%)**: The foreword and opening chapter establish the learning approach—immersion through building, the importance of debugging as a normal part of programming, and a comparison between Scratch (visual) and Python (text-based) showing how concepts transfer between languages. - **Middle (~47%–59%)**: The "Getting Started" chapter covers what Python is, why it's popular (portability, "batteries included" standard library, readability), and introduces game genres—platform, one-button, puzzle, strategy, and multiplayer—to show the range of what readers can build. - **Middle (~59%–65%)**: Introduction to key Python modules for game development: Pygame for full game control, Pygame Zero as a beginner-friendly simplified version, plus Random, Tkinter, Time, and Math modules—each with specific game applications. ## 【Key Takeaways】 - **Python is a "batteries included" language** (Middle): The Standard Library provides prewritten code for common tasks, so beginners can start building immediately without installing lots of extra tools. This lowers the barrier to entry significantly. - **Scratch knowledge transfers directly to Python** (Middle): Concepts like if-then-else conditions and print statements work similarly in both languages—only the syntax changes. This makes Python the natural next step for Scratch users. - **Pygame Zero is the ideal starting point for game programming** (Middle): It's a simplified version of Pygame that hides complex features while remaining powerful enough for impressive games—perfect for beginners who want results without getting lost in technical details. - **Python modules are the building blocks of game development** (Middle): Random adds chance (dice rolls, random enemies), Time tracks game duration, Math handles calculations, and Tkinter builds graphical user interfaces—each module solves a specific game problem. - **Debugging is a normal, expected part of programming** (Early): The book explicitly tells readers not to get disheartened by bugs—finding and fixing errors is part of the craft, and practice reduces both the frequency and the time needed to catch them. - **Game genres teach different coding skills** (Middle): Platform games teach scrolling backgrounds and obstacle mechanics, puzzles exercise logic and knowledge testing, strategy games require planning and decision-making logic, and multiplayer games introduce competition mechanics. - **Python is portable across platforms** (Middle): The same code runs on PCs, Macs, Linux machines, and Raspberry Pi—so games built with Python can be shared and played on many different systems. ## 【Reading Tips】 - **Skim the front matter and author bios** (~0%–12%): These pages establish credibility but contain no technical content—skip ahead to the table of contents to see the full project lineup and plan your reading path. - **Deep-read the "Getting Started" chapter** (~41%–65%): This is where the foundational concepts live—what Python is, how modules work, and which tools you'll need. Pay special attention to the Scratch-to-Python comparison if you're coming from Scratch. - **Use the table of contents as your roadmap** (~24%): The book is structured so games progress in complexity. If you're a complete beginner, start with the basics section before jumping into projects; if you have some experience, you can skip ahead to the first game project. - **Don't skip the debugging advice** (~29%–35%): The foreword's guidance on handling bugs is essential mindset preparation—read it before starting your first project so you know what to expect when things go wrong. - **Treat the module introductions as reference material** (~59%–65%): The overview of Pygame, Pygame Zero, Random, Tkinter, Time, and Math modules is worth revisiting when you start each new game project to understand which tools you'll be using. ## 【Coverage Limits】 The excerpts cover the book's front matter, table of contents, foreword, and the opening "Getting Started" chapter—including Python fundamentals, game genres, and module introductions. They do not cover the actual game-building tutorials, the "Learning the Basics" section, or the reference/glossary content. ##
Excerpt 1
nG IN PYTHON Games US_002-003_Title.indd 3 23/02/18 6:38 pm DK INDIA Senior editor Bharti Bedi Project art editor Sanjay Chauhan Editor Tina Jindal Assistant...
View in text
Excerpt 2
nal Coding Week. US_004-005_imprint.indd 5 22/02/18 1:40 pm CAROL VORDERMAN MBE is one of Britain’s best-loved TV presenters and is renowned for her mathemat...
View in text
Page 10
more than the bugs that manage to creep into their programs. If something goes wrong in one of your games, go back over your code and check it all carefully....
View in text
Page 14
nd numbers, so it’s easy to read and write—just like a book. ◁ Diverse applications Python is used to build systems and tools for lots of interesting tasks i...
View in text
Page 16
dice or when choosing a random enemy for the player to face. ◁ Tkinter This tool is used to build simple graphics in games to create Graphical User Interface...
View in text
Page 18
on of Python for Windows. It should start with the number 3. Select executable installer from the different installer options that appear. Use this installer...
View in text
Page 20
is will install Pygame Zero, also known as pgzero for short. 4 pip install pgzero Install Pygame Once the package manager is installed, type the following co...
View in text
Page 20
in the command at right and press Enter to install Homebrew. It might ask you to enter your password again, and it will take a short while to install, so don...
View in text
Tags
AI categories
PythonProgramming LanguageEducation
ISBN: 1465473610
Publisher: DK Children
Publish Year: 2018
Language: English
Pages: 223
File Format: PDF
File Size: 29.6 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…