A coding guide that builds a Plants vs. Zombies–style game in Python.
In the resultant game, Attack of the Vampire Pizzas, the player’s new pizza restaurant suffers from an infestation of sauce-drinking vampire pizzas; the player must keep the vampire pizzas out of the delivery boxes in order to prevent bad customer reviews (which will cause a “pizza shop closing” game-over message). As this complicated game is written in raw Python code, the book’s introduction is a beefy crash course containing detailed installation instructions as well as exercises to familiarize readers with the basics of using text code. Along with thorough instructions, a color-coded design (with a well-spelled-out key) allows readers to easily track the changes in the code and keep all of the nuts and bolts straight throughout (the text demands revisions and computational thinking). The largest segment of the book (which builds the game) has chapters that end with the code being worked on as well as a “Level Up!” sidebar, effectively a combination recap and progress bar that breaks the code-dense material into manageable chunks. The care in design extends to the physical form of the book—the spiral binding allows it to lie flat, and the covers contain a pop-out built-in bookstand for those who prefer to use it while it’s propped up. The final section gives ideas for readers to customize the game or try making one of their own design.
An innovative, accessible way to turn anyone into a serious coder. (further resources, asset gallery, index) (Nonfiction. 10-14)