Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Assignment 4, ITSE 1429
Old
hammerone
Junior Member
 
Status: Offline
Posts: 7
Join Date: Aug 2011
Default Assignment 4, ITSE 1429 - 09-15-2011, 07:11 PM

On my forth assignment in my Alice Java class I was given the task of creating my own scene and writing a “Textual Storyboard” about it. At the end I had to make one of the characters sing a song and jumps up and down while doing so.
After scratching my head several times over what my scene would be I came up the idea of using the bikekid and aliceliddel objects. The bike kid rides his bike far into the back ground, turns and rides behind a house, turns again and heads back to the far ground. During this time aliceliddel is standing in the far ground with her head moving to watch the bikekids every move. As the bikekid is riding back into the far ground he is heading straight for aliceliddel then suddenly makes a right turn and rides off the screen. Aliceliddel turns to the camera and sings the song while jumping up three times.
I created a method called paddle to simulate the bike movement. I put bikekids left and right leg turn methods, bike gear turn method, bikekid move method, and aliceliddel head turn toward method into a together statement. I set the gear to turn ¼ revolutions. I set variables for the duration time and for the movement distance. I put these same methods in another do together statement with the gear turning in the opposite direction, turning ¼ revolutions. I then put the two together statements into a loop statement and set it to loop 10 times. I found that when I put the right values in the variables I could get a smooth movement of the bike and give a somewhat elusion of the kid paddling the bike. The more paddle methods you call on the world. first method editor, the farther the bike kid goes. I choose to have the aliceliddel object to sing the song. Since the song has the same four lines in each of the three verses, the assignment instructs us to make a method called boomboom to call each time those lines are to be sung. Since the assignment also instructs us to have the object jump while singing, I also included the jumping in that same method. In order to make aliceliddel jump a different height every time you run the program I set a parameter called setrandom for the aliceliddel move method height distance in the boomboom method. I then set a variable called random number in the world. my first method editor and set the randomNumber function as the value. Every time I called the boomboom method I set the setrandom parameter to equal the variable random number. I noticed that randomNumber function returns the same value several times in a row sometimes, but I guess that is normal.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.