Download presentation
Presentation is loading. Please wait.
1
Exploring Visual Programming Stagecast Creator Tutorial, Activity I: Kids Smoking on the Playground Visual Programming Group Center for Human-Computer Interaction Virginia Tech This tutorial is a draft of materials being developed as part of behavioral research underway in the Computer Science Department at Virginia Tech. It is provided on an "as-is" basis; however, we welcome comments and suggestions. Please direct any feedback to lcolson@vt.edu.
2
Introduction n Stagecast Creator is used to build visual simulations, animated worlds. You will learn to use and change example worlds, and eventually build your own. n We are interested in how Creator might be used to build simulations interesting the Blacksburg community. n No programming experience is required to use Creator. n A Quick Reference Sheet is provided as a help aid.
3
n Open the Stagecast Creator program. u Double click on the on the screen. n Open a world; click on u Browse the list of worlds and select Smoking Kids. u Click Open n Play the smoking kids simulation. u Watch what happens. How do the kids change? Why? n Stop the simulation when you have watched it a few times. n Reset the world using the Creator menu in the upper left corner. Explore the Smoking Kids
4
Smoking and Sickness n Let’s see how smoking and sickness work. Double click on the girl u A window with her possible behaviors or rules opens. u Click on the orange tab at the bottom of the window. After you click it will change to look like this. u What value does the sickness variable have? Why?
5
Each kid has a characteristic called. We call this characteristic a variable. Every time a kid puffs, their variable increases. The Rules for Sickness When sickness equals 5, the kid turns gray. When sickness equals 10, the kid falls down. While the kid lies down, sickness gradually decreases. When sickness gets back to 0, they stand up. Step through the simulation one step at a time until the girl collapses. What happens to the girl at each step? What is her sickness variable after 3 steps? Step1 ____________________________________ Sickness ___________ Step2 ____________________________________ Sickness ___________ Step3 ____________________________________ Sickness ___________ n Close the variable list by clicking again on. Smoking and Sickness
6
How Does Sickness Work? n Double click on the rule. u Creator rules are set up as before-after pairs. IF the before part matches a situation in the world; Then the after part of the situation is changed. u What is the before situation for this rule? The after part? BEFORE ___________________ AFTER ________________ n To see how sickness works, look at the details of the before part. u Click on the “show the tests” on the left of the rule maker window. u How is sickness tested? n Now let’s change how the sickness variable is used. u Click on in the rule maker. Change the sickness test to be 10, then click. n Run the simulation to test your changes. u Do you see a difference between the two kids now? n Stop and Reset the simulation before continuing.
7
Making a More Realistic Simulation n It seems odd that the kids just fall down without sitting first. Why don’t we add this in? u If the girl’s rule maker is not open, double click to open it. n Open and the girl’s Collapse rule. u What actions does she take when this rule fires? (check the right ) u What test decides whether she will collapse? (check the left ) n Examine the girl’s appearances by using a right click on the girl in the after part of the rule. u When would you use the different appearances? u How should she look before falling to the ground?
8
n Use the appearance menu to select the sit-puff appearance, then do the same thing to select sit-hold. u Look the list of actions for this rule. What has changed? n Make sure the actions are in the order you want, so that the girl sits before she collapses. n First she sits and puffs, then she sits and holds, and finally she collapses. If the actions are out of order, select one and drag it to a new location (this will be shown by a black line). n Run the simulation to test your changes then make the same changes for the boy. Making a More Realistic Simulation
9
Add a Character n Click the ‘create a character’ button and then click on a clear space on the stage. A blob should appear. n Now we want to make the blob into a new character. u Click ‘draw an appearance’ button and then on the blob. The picture painter window will appear. u Click and then use one of the drawing tools to make a cloud. Note: the second color on the top left hand side works best. n When you are finished click. n the simulation. What happens? What does the cloud do?
10
Adding Rules to a New Character n Now we are going to make rules so that the cloud can move. Let’s make it move right first. n Click on the ‘make a rule’ button and then on the smoke. The rule maker opens and a yellow spotlight appears around the cloud. n Stretch the spotlight over one block to the right. Move the cloud to the new highlighted box. Before:After: n Name this rule Move Right. When your finished click. Now make two more rules, one to make the cloud go up and another one to make it go down. n the simulation. What does the cloud do now? Is it moving the way you expected? n Double click on the cloud and open it’s rule window. again. Rule ordering counts. The first rule available that works will be done even if there are others that also work. u Change the order of the rules so that the Move Right rule is first. one more time to see how it works. n Click on the copy tool and then click the cloud character. Make about 5 more and place them at the top of the screen. and see how they interact.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.