Muutke küpsiste eelistusi

Mission Python: Code a Space Adventure Game! [Pehme köide]

  • Formaat: Paperback / softback, 280 pages, kõrgus x laius: 235x178 mm, 1 Illustrations
  • Ilmumisaeg: 16-Oct-2018
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1593278578
  • ISBN-13: 9781593278571
Teised raamatud teemal:
  • Formaat: Paperback / softback, 280 pages, kõrgus x laius: 235x178 mm, 1 Illustrations
  • Ilmumisaeg: 16-Oct-2018
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1593278578
  • ISBN-13: 9781593278571
Teised raamatud teemal:
A space-themed guide to coding in the Python language instructs young enthusiasts on the fundamentals of loops, strings and lists for building a logic-puzzle game that can be customized with Pygame Zero graphics, sound effects, maps and puzzles. By the author of Cool Scratch Projects in Easy Steps. Original. Simultaneous eBook. Program a graphical adventure game in this hands-on, beginner-friendly introduction to coding in the Python language.Launch into coding with Mission: Python, a space-themed guide to building a complete computer game in Python. Youll learn programming fundamentals like loops, strings, and lists as you build Escape!, an exciting game with a map to explore, items to collect, and tricky logic puzzles to solve. As you work through the book, youll build exercises and mini-projects, like making a spacewalk simulator and creating an astronauts safety checklist that will put your new Python skills to the test. Youll learn how to use Pygame Zero, a free resource that lets you add graphics and sound effects to your creations, and youll get useful game-making tips, such as how to design fun puzzles and intriguing maps. Before you know it, youll have a working, awesome game to stump your friends with (and some nifty coding skills, too!). You can follow this book using a Raspberry Pi or a Microsoft Windows PC, and the 3D graphics and sound effects you need are provided as a download.

Arvustused

"Sean McManus has managed to put Python programming language within easy reach." Teach Secondary

"Mission Python takes a reader from their first steps in programming to completing their first game." Custom PC Magazine

"If youre looking for additions to your computer science education or gifts for your budding programmer, Id generally recommend anything from No Starch Press, but Mission Python is one of my new favorites." GeekMom

"A great book to get into coding a game in Python." Othelo Vieira, OtheloVieira.com

Muu info

Program a graphical adventure game in this hands-on, beginner-friendly introduction to coding in the Python language.
Acknowledgments xv
Introduction 1(12)
How to Use This Book
1(1)
What's in This Book?
2(1)
Installing the Software
3(1)
Installing the Software on Raspberry Pi
4(1)
Installing Python on Windows
4(1)
Installing Pygame Zero on Windows
5(1)
Installing the Software on Other Machines
6(1)
Downloading the Game Files
7(1)
Downloading and Unzipping the Files on a Raspberry Pi
7(1)
Unzipping the File on a Windows PC
8(1)
What's in the ZIP File
8(1)
Running the Game
9(1)
Running Pygame Zero Programs on the Raspberry Pi
9(1)
Running Pygame Zero Programs in Windows
10(1)
Playing the Game
11(2)
1 Your First Spacewalk
13(20)
Starting the Python Editor
14(1)
Starting IDLE in Windows 10
14(1)
Starting IDLE in Windows 8
15(1)
Starting IDLE on the Raspberry Pi
15(1)
Introducing the Python Shell
15(1)
Displaying Text
16(1)
Training Mission #1
17(1)
Outputting and Using Numbers
17(1)
Introducing Script Mode
18(1)
Creating the Starfield
18(3)
Understanding the Program So Far
21(2)
Stopping Your Pygame Zero Program
23(1)
Adding the Planet and Spaceship
23(1)
Changing Perspective: Flying Behind the Planet
24(1)
Training Mission #2
25(1)
Spacewalking!
26(1)
Training Mission #3
27(1)
Understanding the Spacewalk Listing
27(2)
Training Mission #4
29(1)
Are You Fit to Fly?
29(2)
Mission Debrief
31(2)
2 Lists Can Save Your Life
33(14)
Making Your First List: The Take-Off Checklist
34(1)
Seeing Your List
35(1)
Adding and Removing Items
35(1)
Using Index Numbers
36(1)
Inserting an Item
36(1)
Accessing an Individual Item
36(1)
Replacing an Item
37(1)
Deleting an Item
37(1)
Training Mission #1
37(1)
Creating the Spacewalk Checklist
38(1)
Training Mission #2
38(1)
A List of Lists: The Flight Manual
38(1)
Making a List of Lists
38(1)
Training Mission #3
39(1)
Finding an Item in the Flight Manual
39(1)
Combining Lists
40(1)
Making Maps from Lists: The Emergency Room
41(1)
Making the Map
42(1)
Finding an Emergency Item
43(1)
Training Mission #4
44(1)
Swapping Items in the Room
44(1)
Training Mission #5
45(1)
Are You Fit to Fly?
45(2)
Mission Debrief 46
3 Repeat After Me
47(12)
Displaying Maps with Loops
48(1)
Making the Room Map
48(1)
Displaying the Map with a Loop
49(1)
Training Mission #1
50(1)
Loop the Loop
50(1)
Nesting Loops to Get Room Coordinates
50(2)
Cleaning Up the Map
52(1)
Training Mission #2
53(1)
Displaying a 3D Room Image
53(2)
Understanding How the Room Is Drawn
55(1)
Working Out Where to Draw Each Item
56(1)
Training Mission #3
57(1)
Are You Fit to Fly?
57(1)
Mission Debrief
58(1)
4 Creating The Space Station
59(20)
Automating the Map Making Process
59(1)
How the Automatic Map Maker Works
60(1)
Creating the Map Data
60(2)
Writing the Game_Map Code
62(3)
Testing and Debugging the Code
65(1)
Generating Rooms from the Data
66(2)
How the Room Generating Code Works
68(1)
Creating the Basic Room Shape
69(2)
Adding Exits
71(1)
Testing the Program
72(1)
Training Mission #1
72(1)
Exploring the Space Station in 3D
72(3)
Training Mission #2
75(1)
Making Your Own Maps
76(1)
Are You Fit to Fly?
76(1)
Mission Debrief
77(2)
5 Preparing The Space Station Equipment
79(18)
Creating a Simple Planets Dictionary
80(1)
Understanding the Difference Between a List and a Dictionary
80(1)
Making an Astronomy Cheat Sheet Dictionary
80(2)
Error-Proofing the Dictionary
82(1)
Training Mission #1
82(1)
Putting Lists Inside Dictionaries
83(1)
Extracting Information from a List Inside a Dictionary
84(1)
Training Mission #2
85(1)
Making the Space Station Objects Dictionary
85(2)
Adding the First Objects in Escape
87(2)
Viewing Objects with the Space Station Explorer
89(1)
Designing a Room
89(2)
Training Mission #3
91(1)
Adding the Rest of the Objects
91(4)
Training Mission #4
95(1)
Are You Fit to Fly?
95(1)
Mission Debrief
96(1)
6 Installing The Space Station Equipment
97(54)
Understanding the Dictionary for the Scenery Data
97(2)
Adding the Scenery Data
99(3)
Adding the Perimeter Fence for the Planet Surface
102(2)
Loading the Scenery into Each Room
104(3)
Updating the Explorer to Tour the Space Station
107(2)
Training Mission
109(1)
Are You Fit to Fly?
109(1)
Mission Debrief
110(1)
Moving Into The Space Station
111(1)
Arriving on the Space Station
112(1)
Disabling the Room Navigation Controls in the EXPLORER Section
112(1)
Adding New Variables
112(3)
Teleporting onto the Space Station
115(1)
Adding the Movement Code
116(3)
Understanding the Movement Code
119(3)
Training Mission #1
122(1)
Moving Between Rooms
122(4)
Are You Fit to Fly?
126
Mission Debrief 126
8(119)
Repairing The Space Station
127(1)
Sending Information to a Function
128(1)
Creating a Function that Receives Information
128(1)
How It Works
129(1)
Training Mission #1
129(1)
Adding Variables for Shadows, Wall Transparency, and Colors
130(2)
Deleting the EXPLORER Section
132(1)
Adding the DISPLAY Section
133(1)
Adding the Functions for Drawing Objects
134(2)
Drawing the Room
136(2)
Understanding the New draw() Function
138(3)
Positioning the Room on Your Screen
141(1)
Making the Front Wall Fade In and Out
142(3)
Displaying Hints, Tips, and Warnings
145(1)
Showing the Room Name When You Enter the Room
146(2)
Are You Fit to Fly?
148(1)
Mission Debrief
149(2)
9 Unpacking Your Personal Items
151(20)
Adding the Props Information
151(3)
Adding Props to the Room Map
154(3)
Finding an Object Number from the Room Map
157(2)
Picking Up Objects
159(1)
Picking Up Props
159(1)
Adding the Keyboard Controls
160(1)
Adding the Inventory Functionality
161(1)
Displaying the Inventory
162(2)
Adding the Tab Keyboard Control
164(1)
Testing the Inventory
165(1)
Dropping Objects
166(1)
Training Mission #1
167(1)
Examining Objects
168(1)
Training Mission #2
169(1)
Are You Fit to Fly?
169(1)
Mission Debrief
170(1)
10 Make Yourself Useful
171(12)
Adding the Keyboard Control for Using Objects
172(1)
Adding Standard Messages for Using Objects
172(2)
Adding the Game Progress Variables
174(1)
Adding the Actions for Specific Objects
174(3)
Combining Objects
177(2)
Training Mission #1
179(1)
Adding the Game Completion Sequence
180(1)
Exploring the Objects
180(1)
Are You Fit to Fly?
181(2)
11 Activating Safety Doors
183(14)
Planning Where to Put Safety Doors
184(1)
Positioning the Doors
185(1)
Adding Access Controls
185(2)
Making the Doors Open and Close
187(2)
Adding the Door Animation
189(1)
Training Mission #7
190(1)
Shutting the Timed Door
190(2)
Adding a Teleporter
192(1)
Training Mission #2
193(1)
Activating the Airlock Security Door
193(2)
Removing Exits for Your Own Game Designs
195(1)
Mission Accomplished?
196(1)
Are You Fit to Fly?
196(1)
12 danger! Danger! Adding hazards
197(20)
Adding the Air Countdown
198(1)
Displaying the Air and Energy Bars
198(1)
Adding the Air Countdown Functions
199(3)
Starting the Air Countdown and Sounding the Alarm
202(1)
Training Mission #1
202(1)
Adding the Moving Hazards
203(1)
Adding the Hazard Data
204(1)
Sapping the Player's Energy
205(1)
Starting and Stopping Hazards
205(3)
Setting Up the Hazard Map
208(1)
Making the Hazards Move
208(2)
Displaying Hazards in the Room
210(1)
Training Mission #2
211(1)
Stopping the Player from Walking Through Hazards
212(1)
Adding the Toxic Spills
212(1)
Making the Finishing Touches
213(1)
Disabling the Teleporter
213(1)
Cleaning Up the Data
213(1)
Your Adventure Begins
214(1)
Your Next Mission: Customizing the Game
215(1)
Are You Fit to Fly?
216(1)
Mission Debrief
216(1)
A Escape: The Complete Game Listing
217(28)
B Table Of Variables, Lists, And Dictionaries
245(4)
C Debugging Your Listings
249(4)
Indentation
250(1)
Case Sensitivity
251(1)
Parentheses and Brackets
251(1)
Colons
251(1)
Commas
252(1)
Images and Sounds
252(1)
Spelling
252(1)
Index 253
Sean McManus is an experienced computer book author, with extensive experience in writing coding books for children. His children's titles include Cool Scratch Projects in Easy Steps, Scratch Programming in Easy Steps, and Super Skills: How To Code in 10 Easy Lessons. He co-wrote Raspberry Pi For Dummies with Mike Cook. Sean has been a Code Club volunteer, helping junior school children to learn programming in weekly sessions.