Font size
WorksheetsCS Disco Game Lab Lessons 15-17 Progress Check
Total questions: 10
Worksheet time: 14mins
How do the velocity blocks (velocityX and velocityY) work? Check ALL that apply.
They tell sprites how fast to move in a particular direction.
They have hidden counter pattern code inside the block.
They limit the sprites movement in any direction.
They allow you to build more complex code with ease.
Which velocity block makes the sprite move up or down?
sprite.velocityX
sprite.velocityY
sprite.rotationSpeed
sprite.velocityUporDown
Which velocity block makes the sprite move left or right?
sprite.rotationSpeed
sprite.velocityX
sprite.velocityY
sprite.velocityRightorLeft
True or False? Changing the World.frameRate will NOT affect the rotationSpeed.
True
False
What are two disadvantages of programming the code to detect whether sprites are touching each time versus using the "isTouching" block ?
It is error prone.
It reduces time and energy.
It reduces the risk of errors.
It would take up more time and energy.
isTouching returns a Boolean, so it can be used inside a
____________ to cause something to happen only when the two sprites touch.
variable
conditional
animation
To speed up a sprite that has a positive velocity, you need to _________ to the velocity inside the counter pattern.
subtract
divide
add
multiply
To speed up a sprite with a ___________ velocity, you need to subtract from the velocity inside the counter pattern.
negative
positive
neutral
medium
In which direction will the sprite move?
cart.velocityX = 25;
function draw() {
background("black");
cart.velocityX = cart.velocityX - 1;
drawSprites();
}
Up
Down
Left
Right
Which sprite moves left?
cart.velocityX = -1;
function draw() {
background("black");
cart.velocityX = cart.velocityX - 1;
drawSprites();
}
bone.velocityY = 1;
function draw() {
background("black");
bone.velocityY = bone.velocityY + 1;
drawSprites();
}
flybot.velocityY = -1;
function draw() {
background("black");
flybot.velocityY = flybot.velocityY - 1;
drawSprites();
}
