Project description: Let’s use Hatch Kids to build a candy collection game in which our player avoids terrible poison and collects candy!
Recommended ages: 6-9 years | Experience level: Beginner | Platform: Hatch Kids | We will use: Block-based coding | Recommended time: 30 minutes
STEP 1: Sign up for Hatch Kids
Click Here to go to Hatch Kids
Select “Code with Blocks” as shown in the screenshot.
You are now ready to begin creating your project!
STEP 2: Design your game
1. Choose a template and get started.
- You can choose any template from the various templates shown above to create your own project!
- For this project, we have picked the ‘Castle’ template.
2. Let’s design our environment before coding!
- Designing involves the addition of 3D models to our environment.
- Click on the ‘Design’ section and add 3D models using the ‘Add 3D objects’ button as shown below.
3. When you select the Minecraft Castle template, the MinecraftAvatar is added by default.
4. Add a poison and a lollipop 3D model in front of the MinecraftAvatar.
5. Use the Translate button to position the 3D models in front of the MinecraftAvatar.
Final design view:
STEP 3: Let’s code!
Our Minecraft Avatar likes candy, but doesn’t like poison. When it finds candy, it gives a happy response, and when it finds poison, it gives a sad response.
Remember what we need to do!
- From the ‘Events’ section drag & drop the ‘When play button clicked’ block to the coding space.
- This block is used to start an event, in this case, our project will start when the player clicks on this play button.
Speak block:
- From the ‘MinecraftAvatar’ section, get the ‘MinecraftAvatar say __ for _ sec’ block.
- Make the avatar say “Let’s collect the candy” & “Let’s avoid the poison”.
Collision with candy:
- From the ‘MinecraftAvatar’ section, drag & drop the ‘When MinecraftAvatar collides with __’ .
- From the ‘Lollipop’ section, get the lollipop block and attach it to the collision block mentioned above.
- Make the MinecraftAvatar say “Yay! Thank you for the candy!”
Collision with poison:
- Collide with the poison in the same way as mentioned above and make the MinecraftAvatar say “Oh no! Not the poison!”
STEP 4: Save your work and download the app!
Make sure you save your work by hitting the “Save” option shown in the screenshot below.
- Click on “Publish.”
- Fill the relevant details about your project
- After publishing, you will receive a QR Code. Keep this open for now.
- To enjoy your game, you will first need to download the free Hatch XR app on Play Store or App Store on your mobile phone.
- Once downloaded, open the app, scan the QR code on your laptop browser, choose the AR option and enjoy!
STEP 5: Share your project with friends and family!
Impress your friends and family by sharing the project with them. Show them your unique candy collection game, and invite them to create similar projects of their own using the Hatch Kids platform!
Wait, can you do more?
- Yes! You can add a lot more things to your project.
- You can add more poison and candy 3D models with varying points attached to them
- You can also add a scoring system on your own when the 3D items are collected!
- Add a conversation between two 3D models before the game starts!