NOTE: I can’t find the SHARE button on the student’s page at the moment - it’s not where it usually is! Please
see screenshot of my student’s workspace in GameLab. Does it make any difference that she is not logged in at the moment?
HERE IS THE QUESTION I WANTED TO ASK:
The lesson is about setting velocity for the sprites.
My student noticed that in the sample video in the top-right corner of the GameLab work space, the helicopter sprite goes up and then bounces on its way down.
My student did a good job and her code looked much like the two example solutions. But neither her code or the two example solutions enabled the helicopter sprite to bounce on its way down. It just dropped at an even pace until it dropped below the bottom of the screen.
How can she make her sprite bounce on the way down?
And is there a way to see the code behind the model videos in the top-right corner?
If you’re talking about the video on bubble 4, I think that the bouncing is just a result of pushing the up button while playing the game.
Did I understand the question correctly?
Thank you, Mike. I don’t think so. In the example, the sprite goes up (say an inch) and then starts descending. About 3/4" down the sprite seems to hit an invisible floor and it bounces up 1/8"before descending again.
If the student presses the key and lets it go, the sprite goes up (say an inch) and then starts descending and never stops (ie no bounce to interrupt the fall.
Does that make sense?
The videos do make it hard to see what is causing the movement but I do believe the up movement is from the “up arrow key”. If you look at the instructions in bubble 4, it states to " Add code inside the conditional that will change the sprite’s velocity to move up if the “up” arrow is pressed."
The instructions have the students set a positive constant velocity using the counter pattern on the sprite that causes it to constantly fall down. The up arrow key adds a negative velocity but only for as long as the key is held down. As soon as the up arrow key is released, the constant positive velocity will continue to push the player constantly down. Part of the strategy of the game is to keep the player in view and afloat.
Hope I am understanding the question as well:)
Thank you very much, Michelle!