Candy Dash is a fast-paced collecting game where the player moves around the scene to collect candy while trying to score as many points as possible before time runs out.
Thereโs a twist though โ not all candy is collectible! Some candy will cause problems, so the player must decide what to collect and what to avoid.
Try it out
1. Open Flock XR and go to the Demo menu. 2. Select ๐ Candy dash 3. Press Play. 4. Press A and D to look left and right 5. Press W to go forward and S to go backward 6. You should see: – Candy objects placed around the map – A controllable player character – Tree obstacles to navigate around – A score that increases when candy is collected – Candy disappearing (or reacting) when collected – A time up message Try to collect as many candies as you can!
Explore the code
Open the code and look for these parts:
Sky and ground Blocks that set the sky colour and create a simple ground map.
Animations Blocks that play character animations such as Run, Fall, and Idle.
Movement Blocks that move the character and rotate the camera if keys are pressed.
Candy collisions Blocks that detect when the player touches or collides with candy and blocks that delete (dispose of) the candy when collected.
Variables Blocks that set and change variables to control the score and time left during gameplay.
Remix ideas
Try extending the project with your own ideas:
Subtract one from the total score if a bad candy is collected.
Reset the score to zero if a bad candy is collected.
Add a candy target and check if the player collected enough before time runs out.
Increase player speed over time.
Add more obstacles to avoid.
Change the colour theme to give your game a different vibe.
A similar project you could create
Create your ownย collectable game: โ Keep track of score and create win or lose conditions. โ Add multiple types of good, bad, and bonus collectables with different effects and point values. โ Change the colour of collected items instead of deleting them.
Collectable mechanics like this are used in many popular games, can you think of any?