Professional Documents
Culture Documents
Getting Started With Alice: Getting Started With Alice: The Basics
Getting Started With Alice: Getting Started With Alice: The Basics
Getting
Started With Alice:
TheBasics
ByJennaHayes
underthedirectionof
ProfessorSusanRodger
DukeUniversity
July2008
www.cs.duke.edu/csed/alice/aliceInSchools
Step1:Background
p
g
OpenupAlice,andchoosea
backgroundforyourAlice
world.Yourworldissomething
g
youcanputobjectsinandmake
themdothings.Therearesix
differentbackgroundoptions.
F thi
Forthisexample,choosegrass.
l h
Step2:ObjectLibrary
AddanobjecttoyourAliceworld.
Aliceisfullofdifferentkindsof
objectstoaddtoyourworldtomake
it i t
itinteresting.ClickontheAdd
ti
Cli k
th Add
Objectsbutton:
Clickontheanimalsfolderof
objects:
Step3:AddObject
Findthebunnyamongthe
Find
the bunny among the
typesofobjectsandclickonit.
ThenclickAddInstanceto
World.Thisishowyouaddan
objecttoyourAliceworld.
Thebunnyobjectwillappearin
yourworld.ClickthegreenDone
arrowontherighthandsideof
thescreentobeginworkingwith
your new bunny
yournewbunny.
Step4:FindingMethods
OnyourAlicescreen,youshouldseeyour
O
Ali
h ld
methodeditor.Thisistheareawhereyou
willbetellingyourbunnywhattodo.It
lookslikethis:
Amethodisacommandyoucantelltoyourbunny.
Yourbunnyalreadyknowscertaincommands.Find
theobjecttree thatliststheobjectsinyourworld,
in the left hand corner of your screen and click on
inthelefthandcornerofyourscreen,andclickon
bunny:
Step5:AddingMethods Wearegoingtomakeyourbunnyjump,byusing
Belowtheobjecttree,themethods,
orcommands,thatyourbunny
alreadyknowswillpopup:
themove
the
move methodtotellittogoupandthenback
method to tell it to go up and then back
downagain.Beforewecandothat,weneedtofind
theDoinorderbuttonunderthemethodeditor,
clickit,anddraganddropitintothemethodeditor:
WhenwedropmethodsintothisnewDoinorder
,
y, g
,
command,thiswillmakethebunny,guesswhat,
dotheminorder!
Step7:MethodSpecifics
Step6:AddingMethodscont.
Clickonthemovemethodinthelist
ofmethodsundertheobjecttree,drag
itacrosstothemethodeditor,anddrop
it on top of your Do in order command:
itontopofyourDoinordercommand:
Sincewewanttomakethebunny
Si
tt
k th b
moveupfirst,moveyourmouseover
theupdirection,andthenclickon1
meter:
Yourfirstcommandtoyourbunny
isnowcomplete.
p
Whenyoureleasethemovemethod,youshould
p
y
seesomeoptionsforyourmethod:whatdirection
youwantthebunnytomovein,andhowfaryou
wantittomove.
Step8:FinishingtheCommand
Tomakeyourbunnymovebackdownfrom
its jump right click on your move command
itsjump,rightclickonyourmovecommand
andselectcopy.Yourmovecommandwillbe
copiedrightbeneathwhereyoudroppedit.
Clickonthesmalldownarrownexttothe
secondup changeittodown.Yourmethod
editorshouldlooklikethis:
Findtheplay buttonintheupperleft
hand corner of your screen, and click
handcornerofyourscreen,andclick
ittowatchyourbunnyjump!
Step 9 cont.
To see the methods that the bunnys ears
know, click on rightEar and theyll
they ll show
up in the bottom left corner of your
screen. Choose the turn method, and
drag it into your Do Together command in
th method
the
th d editor.
dit T
To make
k th
the ear tturn
out, select left for the direction, and then
select 1/4 Revolution to make the ear turn
p
circle to the left.
of a complete
Now click on the
leftEar, and
repeat the
process, except
instead of asking
the ear to
turn left, ask it to
turn right. Your
method
editor should
now look like
this:
Now play your Alice world. You can actually read the speech bubble now!
Congratulations on finishing your first Alice world!