Project 4
Horse Race
It’s a day at the races! And you can construct your own horse derby, complete with animated horses, trotting sounds, and a photo finish.
Horse Race is a simulation featuring a racetrack you paint, as well as animated horses available in the MicroWorlds EX Animation collection. You’ll add commands for setting the horses at the starting line and then moving the horses along the track at random speeds. As with any horse race, the horses all run at the same time — in coding terms, this means that the commands controlling their racing motion execute in parallel. Every race is unique, so you never know which horse will win! You’ll also add object-specific color under commands to each horse object, and announce (via an alert box) which horse reaches the finish line first. Finally, you’ll use the Create a Melody feature to make a simple trotting sound that plays throughout the race.
Brainstorm
There are numerous options for objects that can be raced down the lanes of the track. MicroWorlds EX has a wide variety of characters in the Animation collection that are fun to race:
- Kids on a track team
- Dogs
- Kangaroos
- Fire-breathing monsters
- Ghosts
Start a New Project
Begin creating your Horse Race simulation by starting a new project as follows:
- Start MicroWorlds EX.
- From the yellow MicroWorlds EX startup screen, select Free Mode.
A new project opens.
- From the menu bar, ...
Get Coding For Kids For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.