In this game, the Knight is on a quest to rescue a captured wizard from the dragon's lair located in a jungle. The player controls the Knight, who moves left and right using arrow keys and can jump over obstacles (like logs and mud puddles). The Knight can collect magical items (like potions) to gain points. When the Knight touches the wizard, the wizard changes his costume to a 'freed' version, and a victory sound plays. If the Knight collides with the dragon, he loses a life and must restart at a checkpoint.
These are the high level steps to create this project. Try to create the project on your own first as much as possible, before checking the detailed solution samples below.
This section provides detailed, step-by-step instructions on how to build the project. There are many ways to create a project, so feel free to explore different approaches. Please note that these instructions are Al-generated, so errors may occur and the coding blocks may not map to Scratch exactly. But it should serve as very valuable references. Stay attentive as you follow along, and enjoy!
Start by creating a Knight sprite. Use the arrow keys to move the Knight left and right. Add a jump feature using the space bar. This will involve changing the y-position of the Knight to simulate jumping.
Create sprites for obstacles like logs and mud puddles. Use a simple conditional to check if the Knight is touching these obstacles and make the Knight jump over them. Also, create magical item sprites like potions that the Knight can collect to gain points.
Design a Wizard sprite with two costumes: one for captured and one for freed. Create a Dragon sprite that the Knight must avoid. If the Knight touches the Dragon, he loses a life and restarts at a checkpoint.
Create a variable for lives and set up checkpoints where the Knight will restart if he loses a life. Use a broadcast message to handle life loss and restarting.
When the Knight reaches the Wizard and frees him, switch the Wizard's costume and play a victory sound. This signals the end of the game.
It is common to have bugs in the code. Here are some of issues you might run into.
Enroll your child in award-winning online Scratch coding classes led live by experts and designed by professionals from Google, Stanford, and MIT.
The challenge continues: Enjoy even more Scratch tutorials dreamed up by other students or use your imagination to make your own!
Explore your child's grade level to find computer science classes and learning pathways that set your student up for success.