Hello fellow Wonder Workshop coders! I have made a brand new game in Blockly that uses Wonder Workshop’s Dash and Dot. It’s called Dash vs. Dot – The Ultimate Battle! This game transforms Dash and Dot into ultimate fighting machines, who battle each other with their magical powers. It is a game for all ages, and is fun for the whole family. This game is for 2 players.
What you’ll need:
I have included my playing cards here so you can download, print, and cut out the cards on the sheet. I laminated my sheets before I cut them out so they would be thicker and more sturdy. To program Blockly, follow my steps below, or watch my video tutorial.
Programming Blockly – Step 1 : The Start Block
Let’s begin by opening Blockly and creating a new project. You can name this project anything you would like – be creative. When you first load the program you will see the yellow “START” block. You are going to add the blocks shown in the image below and set the correct variables in your program.
In the program, Dash is represented by the ORANGE variables and ORANGE lights. Dot is represented by the APPLE variables and GREEN lights. Each robot starts with 100 health points. The WATERMELON variable starts at 0 and will choose a random number between 1 and 10 to decide which robot will go first. If the number is 1, 2, 3, 4, or 5, then the lights will turn GREEN, and that means Dot is going first. If the number is 6, 7, 8, 9, or 10, the lights turn ORANGE, and Dash will go first.
Once the robots say “Let’s do it” and “Yes”, it’s time to for the game to begin!
Programming Blockly – Step 2 : The Attacks
Each robot button will need to be programmed with 4 different attacks. Use the “WHEN” blocks to program all 4 buttons for Dash, and all 4 buttons for Dot. My code is shown in the images below so you can use that as a reference. You will have many opportunities to make your program unique. The sound effects, custom sounds, and attack names can be whatever you’d like.
The Top Button attack is special. It does damage to the opponent, but also regenerates a bit of your own health. The code uses the same base as the other 3 attacks, but you add a second “CHANGE” block for the regeneration. When you do this, make sure it’s adding health, not taking it!
At the bottom of each attack you can see the block labeled “Call BluDeath” or “Call KuazieDeath.” These cues reference the functions seen below in Step 3.
Programming Blockly – Step 3 : Creating the Functions
Once an attack button is pressed, it runs the attack in the Blockly program. At the end of each attack it runs the “CALL” function block. This triggers the functions seen below. If Dash attacks, it will call the function to test for Dot’s health. If Dot attacks, it will call the function to test for Dash’s health.
“KuazieDeath” is looking at the ORANGE variable (Dash’s health). If the value after the attack is less than 1, then Kuazie admits defeat. The same thing goes for the “BluDeath” function, except it looks at the APPLE variable (Dot’s health) after she has been attacked.
Still have questions?
If you still have some questions, check out my video tutorial, and hopefully that will clear a few things up! Remember to get creative with your coding, your attack names, and your custom sounds. If you use this program, I would love to see what you create. Upload a video and post the link in the comments below so I can check it out!
Don’t forget to download and print the playing cards!
Thanks for reading and following along. Remember, if you’re not following already, be sure to click the ‘follow’ button in the bottom right so you can get notified when a new post on my blog is out, and don’t forget to subscribe to my YouTube Channel.
See you all next time! Bye!