Creating a racing game in SCRATCH programming application can be a very interesting one.
What is scratch programming?
Scratch is known to be one of the even driven block based programming languages that is primarily used to create interactive stories, games, and advanced animations. In addition, it is widely used by lots of educational institutions to introduce programming concepts to children.
To create a racing car game where the player controls a car to reach its destination or finish line, the below code explains it the best way:
- When Green Flag Clicked
- Set X to 0
- Set Y to 0
- Forever
- If Key [Up Arrow] Pressed
- Change Y by 5
- If key [Down Arrow] Pressed
- Change Y by -5
- If key [Left Arrow] Pressed
- Change X by -5
- If key [Right arrow] Pressed
- Change X by 5
- If Touching [Finish Line]
- Say “ Win!” for 2 seconds
Congratulations on your simple game building.
NOTE
- Practicing scratching all the time makes you a good builder.
- Ensure to ask friends who are already intermediate and has the best knowledge of all.
- Apply skills and do research always online to gain more experience
About Author
Discover more from SURFCLOUD TECHNOLOGY
Subscribe to get the latest posts sent to your email.