10 Start Alice Double click on the Alice icon to start AliceIt may take a minute to start upCancel the opening dialog screenGame Making with Alice

11 Build the SceneClick on the add objects button at the bottom right of the sceneScroll to the Farm category and clock on FarmGame Making with Alice

12 Add Objects to Scene Click and Drag some objects into the sceneOnce in the scene objects can be positioned with the mouseObject can be rotated by selecting the proper option from the menu in the upper rightIf you want to get rid of an object right click it and select deleteGame Making with Alice

14 Add The CowClick on the Local Gallery to get back to the list of categoriesOpen the Animals CategoryScroll over to the Cow and add one to the worldGame Making with Alice

15 Back to Programming Exit the scene editor by clicking the done buttonGame Making with Alice

16 Make a method to hide the cowClick on the cow in the object tree.Click on the methods in the details windowClick on the create new method buttonName the method hideGame Making with Alice

17 Add commands to the hide methodClick on the properties tab in the detail windowDrag the opacity = 1(100%) icon into the window for hideChange the opacity to 0(0%)Click on the methods tab in the details windowDrag over the cow move commandSelect down for the direction and other for the amount.Set to 2Game Making with Alice

19 Create the pop up methodClick the cow in the object treeClick on methodsClick the create new method buttonname the method popUpSimpleGameInAlice

20 Move the cow randomly Start by dragging out cow move tilesone for each of left, right, forward, and backwardClick on world in the object tree to select itClick on functions in the details windowDrag out random number and drop it on the 1 meterselect more and change max to 2Be sure to drop the random number on the 1 meter when the 1 meter is in a green box. The green box shows where the dropped tile will go.SimpleGameInAlice

21 Add a commentYou can add a comment to explain what you are doing in EnglishDrag a // tile from the bottom of the method editing window to where you wish to place the commentClick on the down arrowSelect otherType in the commentSimpleGameInAlice

22 Showing the cow Click on cow in the object tree to select itClick on methods in the details windowDrag out a cow move tileselect up 2 metersClick on properties in the details windowDrag out opacity = 0change to 1 (100%)SimpleGameInAlice

24 Adding a property (field)We need to store the number of time the cow has been clickedClick the cow in the object treeClick on the properties tabClick the create new variable buttonname the variable numClicksset the value to 0By default the type of the new variable is a number which is fine since we will use this field to record the number of hits.SimpleGameInAlice

25 Increment the number of hitsIf the user clicks on the cow we want to add 1 to the number of clicks so farCreate a method that does thisIt should be a new cow method (cow selected in object tree)Drag numClicks variable into method and select the increment cow.numClicks by 1 optionSimpleGameInAlice

26 Respond to mouse click on cowIn the events window click the create new event buttonselect When the mouse is clicked on somethingChange the anything to the cow (the entire cow)Change the nothing to cow incrementClicksSimpleGameInAlice

27 Method to run the game Click on world in the object treeSelect methods and edit the my first methodPull up a while tile from the bottom of the editor window and drop into the my first methodselect trueSimpleGameInAlice

28 Change while loop Click on functions tabdrag out a < b and drop it on trueselect 1 and 1

29 While number of hits < 5Click on cow in the object treeClick on propertiesdrag out numClicks = 0 and drop on the first 1Change the second 1 to 5click on other and enter 5SimpleGameInAlice

30 Hide and wait a random amount of timeClick on cow and then the methodsDrag out hideDrag up a wait tile from the bottom of the editor windowselect 1 secondClick on world in the object treeclick on functionsdrag out random number and drop on the 1 secondSimpleGameInAlice

31 pop up and wait for 1 secondChange random number on wait to a min of 0.5 secondsDrag out a cow popUpTry it out!What happens after you click on the cow 5 times?SimpleGameInAlice

32 Tell the user they wonAdd some 3D text that tells the user she or he wonClick on File and then on Add 3D TextType in the textyou can change the fontPlace it where you want it to appearClick on add objects to get to the mouse controlsClick on done when doneSimpleGameInAlice

33 Make the text invisible to startClick on the text in the object treeClick on propertiesModify opacity to 0 (0%)SimpleGameInAlice

34 When the user wins show the textDrag out opacity = 0 to the my first methodchange to 1 (100%)Play the game!SimpleGameInAlice

35 Speeding things up in hide methodAll animation commands takes 1 second by defaultyou can change this using the more…Drag a Do together block from the bottom and then drag both commands into itDo the same thing for the popUp method.SimpleGameInAlice

36 Speeding things up in popUp methodRemove the random move left and forwardRight click commands and select deleteChange minimum on random move right and back to -2Set duration on random moves to 0Put move up and set opacity to 1 commands to a do together block and change duration to 0.5 seconds

38 Add instructionsCreate 3D text that tells the user what to do in the gameWhen the game starts wait for 1 secondthen make the text invisiblecan set opacity to 0SimpleGameInAlice

39 Show the number of hitsCreate 3D text that says Hits and one that says 0Use the mouse controls to position the textClick on Add Objects to see the mouse controlswhen done click on doneSimpleGameInAlice

40 Create World incrementClicks methodAdd an incrementClicks method to the worldcall the cow incrementClicks methodclick on the 0 3dText object then propertiesdrag out text = 0select default stringreplace the default string with the what as string function in the world to convert the number to a stringchoose expressions and pick cow numClicks as what to convertWhy should we add the incrementHits method to the world and not just modify the cow increment hits? The problem is that we need to modify the 0 text which is not part of the cow put part of the world. In order to make reusable pieces we can't access things in cow methods that are not part of the cow. But, in the world incrementHits method we can call the cow increment hits method.SimpleGameInAlice

41 Change when mouse clickedModify then when mouse is clicked on the cow to call the world's incrementClicks methodTry it!SimpleGameInAlice

42 Other Ideas Have the cow play a sound when hitmodify cow incrementClicks methoduse play sound in methodsyou can also record your own soundsclick on properties for the cowclick on the + next to Soundsand record a sound and name itCount the number of times the cow has appearedAdd a way to losemaybe it will only run till it appears 10 timesmaybe add a timer and a time limitmaybe add other cows that if you click on these you lose, change color of target cow to something like orangeMake the amount of time you give the user to click on the cow a random amount from 0.5 to 1 secondSimpleGameInAlice

43 Summary Alice can be used to create simple 3D games Concepts coveredcreating methodscreating a property (field)creating a variableusing a while loopcreating a commentSimpleGameInAlice