11: Catch the Cue Ball (Part 02)
Learning Target
- Use variables to store information
- Use randomization to improve decrease predictability
- Change game behavior based on user input
Instructions
Step 1:
If Part 01 of your project isn't already open, then open it in GDevelop from the Build Menu.
Step 2:
Save the project as "Catch the Cue Ball 02" or something like that. You can save it in the same folder as last time, but saving it with a different name means you can always return to the first version of the game should you need to.
Step 3:
We'll start by changing the position of the Cue Ball when we click on it with the mouse.
The first half of this video (0:00-04:05) will show how that is done.
CHANGE in GDEVELOP:
-
- When you see something that looks like this in the video:
objectName.Variable(variableName)
-
- You should use this newer and simpler syntax instead:
objectName.variableName
Step 4:
Next, we'll make the ball move in a random direction (
Step 5:
Lastly, we'll use a variable to gradually increase the speed of the object every time we click on it (
Step 6:
Save your game. Then, preview the game to make sure it is working as shown here (
Make any changes that you think are needed. Then, save your project again.
Repeat this step as needed.
Step 7:
Click the Submit Assignment button. Upload your most recent copy of the game file.
If you saved your game to a Google Drive folder, you can submit that instead.
Grading
| Your submission... | Your grade... |
|---|---|
|
Extended
|
A+ |
|
Exceptional
|
A |
|
Good
|
B |
|
Reasonable
|
C |
|
Needs Improvement
|
D |
|
Insufficient
|
F |
| Scores may be rounded to the nearest whole number. | |