Super Scratch Programming Adventure Covers Version 2 Learn to Program by Making Cool Games Covers Version 2 2nd Edition The Lead Project - Read the ebook online or download it to own the full content
Super Scratch Programming Adventure Covers Version 2 Learn to Program by Making Cool Games Covers Version 2 2nd Edition The Lead Project - Read the ebook online or download it to own the full content
com
https://ebookmeta.com/product/super-scratch-programming-
adventure-covers-version-2-learn-to-program-by-making-cool-
games-covers-version-2-2nd-edition-the-lead-project/
OR CLICK HERE
DOWLOAD EBOOK
https://ebookmeta.com/product/libreoffice-expert-2022-covers-
version-7-2-2-2022nd-edition-unknown/
ebookmeta.com
https://ebookmeta.com/product/tensorflow-in-action-covers-tensorflow-
version-2-9-1st-edition-thushan-ganegedara/
ebookmeta.com
https://ebookmeta.com/product/mark-of-platos-first-edition-dee-j-
stone/
ebookmeta.com
Sheikh s Accidental Pregnancy Botros Brothers Book 1 1st
Edition North Leslie
https://ebookmeta.com/product/sheikh-s-accidental-pregnancy-botros-
brothers-book-1-1st-edition-north-leslie/
ebookmeta.com
https://ebookmeta.com/product/ordering-a-billionaire-steamy-beach-
romance-instalove-dating-network-service-book-6-1st-edition-scarlett-
woods/
ebookmeta.com
https://ebookmeta.com/product/ambushed-the-brindle-dragon-4-1st-
edition-jada-fisher/
ebookmeta.com
https://ebookmeta.com/product/clean-architecture-for-android-1st-
edition-eran-boudjnah/
ebookmeta.com
Project Management in the Library Workplace 1st Edition
Alice Daugherty
https://ebookmeta.com/product/project-management-in-the-library-
workplace-1st-edition-alice-daugherty/
ebookmeta.com
version 2
covers
As you read this book, let your imagination run wild.
c
What will you create with Scratch? ve ov
rs er
– from the foreword by professor mitchel resnick, creator of scratch io s
super
SC R ATC H
Comics! games! Programming!
VENTURE !
AD
Scratch is the wildly popular educational This full-color comic book makes pro-
PROGR AMMING
programming language used by millions gramming concepts like variables, flow
of first-time learners in classrooms and control, and subroutines effortless to
homes worldwide. By dragging together absorb. Packed with ideas for games
colorful blocks of code, kids can learn that kids will be proud to show off,
computer programming concepts and Super Scratch Programming Adventure!
make cool games and animations. The is the perfect first step for the budding
latest version, Scratch 2, brings the lan programmer.
guage right into your web browser, with
About the Author
no need to download software.
The Learning through Engineering,
In Super Scratch Programming Adventure!, Art, and Design (LEAD) Project is an
kids learn programming fundamentals educational initiative established to
as they make their very own playable encourage the development of creative Learn to
video games. They’ll create projects thinking through the use of technology. Program
g
by Makin
inspired by classic arcade games that Created by the Hong Kong Federation of
can be programmed (and played!) in an Youth Groups in collaboration with the
Cool
Games !
afternoon. Patient, step-by-step expla- MIT Media Lab, the LEAD Project pro-
nations of the code and fun program- motes hands-on, design-based activities
ming challenges will have kids creating to foster innovation, problem-solving
their own games in no time. skills, and technical literacy.
T H E F I N E ST I N G E E K E N T E RTA I N M E N T ™
w w w.nostarch.com
The Project
Praise for
Super Scratch
Programming Adventure!
“If you think you might have a future programmer on your hands,
it’s time to introduce your kid to Scratch. . . . Super Scratch Pro
gramming Adventure! makes it even easier to get started.”
—Ruth Suehle, GeekMom
“If you have a kid who plays around with a computer and can read
even a little, get this.”
—Greg Laden, National Geographic’s ScienceBlogs
“If you’ve got a child or maybe even a classroom of students who are
wanting to make their own games, Scratch is a great option. . . . For
structured training that is also entertaining, Super Scratch Program
ming Adventure! will make a great textbook.”
—James Floyd Kelly, GeekDad
“If you’re looking for a way to get your kid interested in programming,
and Scratch in particular, I can’t recommend this Scratch book enough.”
—Chris O’Brien, San Jose Mercury News’ SiliconBeat
S u pe r
S c r at
atc h
dv e n tu r e!
i ng A m
Pr o g r a m
Learn to
by
Pr o g r a m
ool
Making C
Gam es!
The Project
Super Scratch Programming Adventure! Copyright © 2014 by the LEAD Project.
This edition has been updated to cover Scratch 2.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying, recording, or by any information
storage or retrieval system, without the prior written permission of the copyright owner and
the publisher.
Printed in USA
First printing
17 16 15 14 13 1 2 3 4 5 6 7 8 9
ISBN-10: 1-59327-531-5
ISBN-13: 978-1-59327-531-0
No Starch Press and the No Starch Press logo are registered trademarks of No Starch
Press, Inc. Other product and company names mentioned herein may be the trademarks of
their respective owners. Rather than use a trademark symbol with every occurrence of a
trademarked name, we are using the names only in an editorial fashion and to the benefit of
the trademark owner, with no intention of infringement of the trademark.
The information in this book is distributed on an “As Is” basis, without warranty. While every
precaution has been taken in the preparation of this work, neither the author nor No Starch
Press, Inc. shall have any liability to any person or entity with respect to any loss or damage
caused or alleged to be caused directly or indirectly by the information contained in it.
All characters in this publication are fictitious, and any resemblance to real persons, living or
dead, is purely coincidental.
Contents
10
N ote The Resources file includes two versions of each game
in the book. One version is a completely finished and
playable game, perfect for young learners and anyone
who wants to build on the games in the book. The
second set of projects has no programming added, so
that students can follow along with the programming
instructions in this book. Remember, there’s no wrong
way to play with Scratch!
11
Who Created Scratch?
Scratch is a project funded by the US National Science Founda-
tion (NSF). It was developed by the Massachusetts Institute of
Technology (MIT) Media Lab’s Lifelong Kindergarten Group.
12
Designing Scratch projects challenges kids to think cre-
atively, and learning how to overcome obstacles and solve
problems builds confidence. This gives learners an advantage
later in life.
13
Scratch is used around the world in elementary, middle, and
high schools. Computer science professors also use Scratch as a
means of introducing programming concepts to college students.
14
• Students at a university in Istanbul used Scratch to examine
video game culture by rapidly prototyping their own games
and testing the games with the public.
• English students in a middle school in California used
Scratch to build a random story generator.
• Students in an elementary school in Russia used Scratch to
build their own personalized tutorials for learning about the
coordinate system and trigonometry.
• High school students in Michigan used Scratch to build a
physics simulator.
The possibilities are endless. It is our sincere hope that
this book inspires students to create their own games, stories,
and more.
15
As long as they have the username and password at hand,
kids can find games to play through the project gallery, remix
them, and share their thoughts with others from around the
world! To see how someone else’s game was built, just click the
See Inside button ( ). To add to the program, click the
big orange Remix button ( ).
To share your own projects with the rest of the world, click
the big Share button ( ) in the Scratch editor. To make a
project private again, click the Unshare button in the My Stuff
listing.
Just remember that as a member of the Scratch community,
you’ll be sharing projects and ideas with people of all ages, all
levels of experience, and all parts of the world. So be sure to:
• Be respectful of other players
• Be constructive when commenting
• Help keep the site friendly and fun
• Keep personal information private
For more ideas and information about sharing and remixing
projects, visit http://wiki.scratch.mit.edu/wiki/Remix.
16
My Computer Can’t Run
Scratch 2.0!
If your computer doesn’t meet the requirements listed on
page 10, you can still download and install Scratch 1.4. (http://
scratch.mit.edu/scratch_1.4/). Scratch 1.4 projects are compat-
ible with the Web-based Scratch 2.0, and you can still share your
projects on the Scratch website using Scratch 1.4. (Unfortunately,
Scratch 1.4 cannot read programs created in the Scratch 2.0
software.)
You can download free PDF versions of Chapters 1 and 2,
which explain how the older 1.4 interface works, by visiting
http://nostarch.com/scratch/. You can also find versions of the
book’s games that are compatible with 1.4 on that page.
17
Meet the Cast
Mitch
A computer science
student who loves to
make cool programs,
he’s passionate about
movies and art, too!
Mitch is an all-around
good guy.
Beoo
Beoo o-
oo
p!
Earthqu
I sure wish ak
Meanwhile, in
programming e!
school on Earth...
were easier...
Whoa!
Chirp Chirp
Wake up.
W-who are
Come on, you? What just
wake up! happened?
20
My name is That’s right. I Amazing! My
Scratchy. followed that name is Mitch. I’m a
I’m from flash of light, And computer science
Cyberspace. here I am! student!
You’re from a
computer?!
Oh no! I
can’t move
my legs!
Hey Mitch.
um…is your Where is
planet always
so gray?
everybody?
Ahhh!
Me neither!
Something Help!!
terrible is
forming in
the sky!
No way!
Something’s
wrong. Let’s
go check
it out!
take this
Secret Manual
Stay Calm! before the
Thank goodness Black Tornado
I found you! swallows you!
Then follow my
Your body is instructions!
being frozen!
Let’s
do
this!
21
Breaking the Spell!
Chapter Focus The Game
Let’s get to know Scratch! We need to get Scratchy the cat
We’ll also learn about sprites moving again. We’ll make him
and coordinates. dance across the Stage.
an d D r
ck a
i
Cl
22
A Guided Tour of the Scratch Interface!
Palette
Sprite Toolbar Each of these ten buttons lets you choose
Contains the functions (called blocks) for programming your
Play the Give your Duplicate, Delete, sprites. You can combine these command
game full project a Grow, Shrink, and blocks in stacks to create programs that
screen. new name. Block Help tools control objects on the screen.
Stage
Displays your creation
Scripts Area
Here’s where you build your
programs. Stacking blocks
The green flag starts the together here lets you control
game and the red flag the sprites in your project. Click
stops the game. one of the three tabs at the top
to change to other functions:
Scripts: Allows you to
drag command blocks from
the Palette and put them
together to write a program
Costumes: Allows you to
draw, import, or edit images
Sprite List
for a sprite
Here are the characters
and objects you’ve created, Sounds: Allows you to record
including the Stage itself. or import sound files for a
Click the icons to edit each sprite to use
sprite individually.
23
Sprite Information
You might have noticed a little blue i in the corner of the box around
Scratchy when you select his sprite in the Sprite List. Try clicking the i,
and you’ll get information about that sprite.
This section shows the sprite’s name, position, and direction it is facing
(the little blue line).
Choose
the xy-grid
backdrop and
click OK to
use it. It’s in
the “Other”
category.
24
Now you can see exactly how Scratch positions objects.
Everything is on a grid with two axes:
y-axis: A vertical line that marks up and down positions;
ranges from –180 (lowest) to +180 (highest)
x-axis: A horizontal line that marks left and right positions;
ranges from –240 (farthest left) to +240 (farthest right)
Scratchy’s default position is at the point where the x-axis
and y-axis meet. His coordinates are (X: 0, Y: 0).
25
Click the number of a coordinate to change it. Set x to 0 and
set y to 125. Now click the block to run it! Scratch goes right
to that position. We’ve just written our first program! It’s really
that simple.
26
Type these coordinates in your
own program, so it matches this
picture. When you’re finished,
click the whole command block
to make Scratchy jump around
in a pentagon shape!
27
Because we used the When clicked command, we
can use these buttons above the Stage to start ( )
and stop ( ) the game.
28
This software bug can be fixed by adding
some more code—that is, new blocks—to
your program. In this case, simply place
a new go to block (from the blue Motion
palette) above the green Pen blocks and
below the When clicked block.
29
Remember to save
this file so you can
play with it later!
If you are logged into Scratch, the website stores all of your projects into
My Stuff so you can easily find them. The website saves your progress
every so often, but you can save manually too: File4Save Now. You can
also save different versions of your programs to make sure you don’t lose
older versions of your games and can safely experiment—File4Save Copy
creates a new version of your project in My Stuff. If you want to download
a version for yourself, try File4Download to your computer. Then save
it in a safe spot!
Scratchy’s Challenge!!
Can you edit this program to make Scratchy draw
different kinds of shapes? Give it a try!
30
Entering
Space
Magic Alright! I can
star web! feel my limbs
sh again!
WhoO
32
Great Idea!
This Secret Yes! If I learn You can design
Manual saved to program, it new equipment and
us. Maybe might help to even control our
it can help defeat the Dark movements!
other people Wizard!
as well!
We need the
energy from seven
Alright! dimensional strings
But why does
to open the stargate
Scratchy need
the space suit?
and reach my
friends...
Oh no!
My fellow ...but inside the
defenders are in vortex, there’s no
trouble! Change oxygen, and lightning
into a space suit can make things
and save them, disappear!
kind feline!
by the way,
Gobo, my name
is Scratchy, and
he’s Mitch! The adventure into
space begins…
33
A Space Odyssey!
Chapter Focus The Game
Learn to design new costumes Avoid the lightning bolts and
and program a sprite’s move collect seven dimensional strings.
ments, reactions, and sound Once you’ve got them all, the
effects. Monolith will appear!
34
Here’s where all the tools
are. The Brush and Eraser
tools make it easy to draw.
35
You also have tools to draw rectangles and ellipses.
Can you give Scratchy a stovepipe hat like Abe
Lincoln using the Rectangle and Ellipse tools?
36
To use the Select tool, use your
mouse to create a frame around a
certain area. Then you can do all
sorts of things to the selected part
of your costume:
• Click and drag the selection to
move it to a new location.
• Resize, smush, or stretch the
image using the handles on the
sides of the box
• Rotate the selection by clicking
and dragging the handle at the
top center of the box
• Press and hold the ctrl key and
C key at the same time to copy
the image area (Mac users can
use -C instead). Then press
ctrl-V to paste your selection,
as many times as you like.
• Press the delete key to erase
the selection.
37
Vector Mode
You may have noticed that
when you edit other sprites in
Scratch, you don’t see the same
Paint Editor tools. Some newer
sprites are vector art—that’s just
a fancy way to say they’re made
of shapes, instead of pixels.
Vector art have small filesizes,
but they are great quality—and
they can be resized without
losing quality.
38
Exploring the Variety of Random
Documents with Different Content
sermonibus in contentionem dicuntur incidisse. Et
Mitrobaten quidem, quum de virtute inter se disceptarent,
Orœtæ cum exprobratione dixisse: «Tu vero in virorum
numero habeare, qui Samum insulam, tuæ præfecturæ
proximam, in regis potestatem non redegisti, quum sit
subactu ita facilis, ut indigenarum aliquis, cum quindecim
armatis insurgens, ea potitus sit, atque etiam nunc in ea
dominetur!» (3) Dicunt igitur hunc, his auditis, ægre
ferentem exprobrationem, cupivisse non tam vindictam
capere de eo qui hæc illi dixisset, quam omnino Polycratem
perdere, propter quem male audisset.
HERODOTI
HISTORIARUM LIBER QUARTUS.
(MELPOMENE.)
XI. Est vero etiam alia narratio, ita habens; cui potissimum
equidem adsentior. Scilicet, Scythas Nomades (pastores)
Asiam incolentes, bello pressos a Massagetis, trajecto Araxe
fluvio in terram abiisse Cimmeriorum: quam enim nunc
terram Scythæ tenent, ea olim Cimmeriorum fuisse traditur.
(2) Cimmerios autem, invadentibus terram ipsorum Scythis,
quum deliberarent, utpote ingente irruente exercitu,
diversas abiisse in sententias; fortiter quidem propugnatam
utramque, fortiorem vero eam pro qua reges stabant. Populi
enim fuisse sententiam, excedendum esse terra, neque
manendum et adversus plures adeundum periculum: regum
vero, pro terra utique dimicandum cum invadentibus. (3)
Atqui nec regibus populum voluisse parere, nec reges
populo. Itaque his fuisse constitutum, non tentata pugna
abire, et invadentibus permittere terram: regibus vero
placuisse, sua potius in patria occumbentes sepeliri, quam
cum plebe aufugere; reputantes quantis bonis essent fruiti,
et quantis malis se pressum iri consentaneum esset, si ex
patria profugissent. (4) Talis quum fuisset utrorumque
sententia divisis agminibus, numero utrimque paribus, inter
se mutuo pugnam civisse; et hos quidem, qui a regum
partibus stetissent, a popularibus suis interfectos esse
cunctos, sepultosque a plebe Cimmeriorum ad Tyram
fluvium, ubi ad hunc diem conspicitur illorum sepulcrum;
quibus sepultis, plebem terra excessisse; supervenientes
vero Scythas desertam terram occupasse.
XX. Trans Gerrhum hæc est quæ Regia terra vocatur, quam
Scythæ nobilissimi tenent et numerosissimi, qui reliquos
Scythas servos suos esse reputant. (2) Pertinentque hi,
meridiem versus, ad Tauricam, versus orientem vero, ad
fossam illam quam cæcorum filii duxerunt, et ad emporium
Mæotidis paludis quod Cremni vocatur; partim eorum etiam
ad Tanain flumen. (3) Quæ supra Regios Scythas ad
septemtrionem vergunt, ea Melanchlæni tenent, diversæ
stirpis populus, non Scythicus. Supra Melanchlænos vero,
paludes sunt, et terra hominibus vacua, quantum nos
quidem novimus.