WorksheetsThe Draw Loop
Total questions: 12
Worksheet time: 6mins
Prior to the lesson on the draw loop, all the instructions we have programmed were executed in what order?
Sequential order (from top to bottom).
Random order
Order determined by the computer to be most efficient
First it executes the drawing commands, then it executes the sprite commands, and lastly, it executes the text commands.
What is a flipbook?
A book with drawings on each page that look like movement when you flip through the pages.
A gymnastic move that inspired people at code.org
When you flip the order that the computer executes instructions.
A way to measure frames per second (fps)
How is an animation created?
Draw a series of images that are similar but have changes. then show each image in turn.
Use a video camera to create a movie.
Program the computer to record a movie.
Animations are not related to computers.
What is the purpose of the draw function in Game Lab?
To reset the program
To generate random numbers
To create real animations
To draw a single rectangle
What does the fill command do inside the draw loop?
Reset the program
Choose a new color
Draw a new shape
Generate random numbers
What is the effect of the draw loop in the program?
Repeats the commands in a loop
Draws a single shape
Generates random numbers
Resets the program
What commands are executed first?
Commands outside of the draw loop
Commands inside the draw loop
Commands not related to the draw loop
Commands from the Draw toolkit
How many times will a command inside a draw loop be executed?
Infinite times or until the program is terminated
Each command is executed twice
Repeatedly until the loop runs out of energy
Commands are repeated up to 1000 times
What will the following code do?
Draw green circles in random places all over the screen until the screen is covered in circles
Draw one green circle in the center of the screen
Draw an ellipse in the bottom corner
Nothing, there is an error
What will the following code do?
Draw one circle on a red background. The circle will move around the screen randomly
Draw circles all over the screen until the screen is covered in circles
Draw a circle in the bottom corner
Nothing, there is an error
Which of these is the correct way to use a draw loop?
What does "frame rate" control?
It tells the computer how frequently to update the screen.
Frame rate has nothing to do with programing, it only applies to hardware.
It tells the computer how many animations a sprite can have assigned.
It is the cost of framing your animation.
