 Hello everyone! In this video, we are going to make a game whose aim is to feed a super hungry shark that hasn't eaten in days as many fish as we can by controlling it with evive's potentiometer. Let's begin. First of all, connect evive to your computer via a USB cable. Pick the blocks. Next, click on the board button in the toolbar and select evive from the drop-down menu. Click on the connect button in the toolbar. A dialog box will appear asking you to select the port to which evive is connected. Since we have connected it to the computer via a USB, we are going to stick to serial ports. Select the COM port to which evive is connected and click on the upload firmware button to upload the firmware to evive. We need to do so because we are going to play the game in stage mode. Let's done. Now, let's make the game. Let's first set the stage. Since we have a shark and a lot of fish in our game, our background should be something that resembles the ocean. Click on the choose a backdrop button and select the underwater backdrop from the library. Time to bring in the shark and its prey. Open the sprite library by clicking on the choose a sprite button and the shark to sprites. Now, we don't want the shark to eat Toby, so let's get him out of here before the shark notices him. Right click on his icon and select delete from the drop-down menu. To write the script for the shark, select it from the sprite palette. Now drag and drop the when flat click block into the scripting area from the events palette. Then drag and drop the set size to block from the looks palette to adjust the shark's size. Set it as 80% of the original. To set its initial position, drag and drop the go to XY block and set X and Y to 0. Now, open the variables palette and click on make a variable to create a variable named score for keeping count of the number of fish the shark eats. Next, set the initial score to 0 by dragging and dropping the set my variable to block. Select score from its drop-down and set it to 0. Whatever we write next must execute continuously. Therefore, drag and drop the forever block from the control palette. Next, drag and drop the point in direction and move steps block inside the forever block. Now, we want to control the shark using evive's potentiometer but there is a catch. The potentiometer gives value in the range of 0 to 1, 0, 2, 3 and our shark can rotate 360 degrees only. Therefore, to correctly control the shark's movement, we will map the potentiometer value using the mathematical formula. To implement the formula, first drag and drop a division block from the operator's palette inside the point in direction block. Next, drag and drop a multiplication block inside the first space of the division block. Now, from the evive palette, drag and drop the potentiometer reading block in the first space of the multiplication block. In its second space, write 360. In the second space of the division block, write 1023 and you are done. It's time to write the scripts for the fish. Make sure that the fish sprite is selected. First, let's write the script to create multiple fish. Drag and drop the when flag clicked block in the scripting area. Then, snap a forever block below it. For cloning the fish that is for creating multiple fish for the same sprite, drag and drop the create clone of block from the control palette inside the forever block. Now, it would be a good idea to make each clone look a little different. For that, add the next costume block from the looks palette. To make sure that there is a gap between the appearance of two clones, add a delay of 1 second using the weight block. Now, time to give the fish some moves. Let's make them appear and move around randomly to make the game a little challenging. First, drag and drop the when I start as a clone block from the control palette. To make the clones appear at random point on the stage, drag and drop the go to block from the motion palette below the when I start as a clone block and select random position from the drop down. Next, drag and drop the show block from the looks palette below the go to block. To make the clones move from one position to another, drag and drop the glide to block, select random position from the drop down and set the gliding time as 2 seconds. After gliding for 2 seconds, the clone should disappear. Therefore, end the script using the delete this clone block from the control palette. Finally, it's time to feed the shark. Funny enough, we must write a script for the fish sprite to feed the shark. Let's get to it. Every time it eats a fish, the score should increase. Follow along to write the script for the scene. First, drag and drop the when I started as a clone block. Then, snap a forever block below it. Next, drag and drop an if block inside the forever block. Now, by eating a fish, we mean that the shark will in fact just touch its clone. To check if the shark is touching the fish, drag and drop the touching block from the sensing palette inside the if block and select shark 2 from the drop down. Then drag and drop the change by block from the variables palette inside the forever block and from the drop down select score. This will increase the score by one every time the shark eats a fish. Next, we will send a message to shark sprite that it is touching a fish so that the shark can eat it. For that, drag and drop the broadcast block from the events palette below the change by block. From the drop down of the broadcast block select new message. A dialog box will appear asking you to enter a message. Type eat. Now, as soon as the shark touches the clone, it should disappear. Therefore, drag and drop the delete this clone block. When the script of the fish broadcast the message eat, we want to make the shark act as if it has actually eaten the fish. Let's write the script for the same. First, select its sprite from the sprite palette. Then, from the events palette, drag and drop the when I receive block in the scripting area. From its drop down, select eat. To make the shark look as if it is eating, we need to change its costumes. Therefore, drag and drop the switch costume to block below the when I receive block and from the drop down, select shark to be. Next, add a delay of 0.2 seconds. Then again, switch the costume back to shark to A. Now, let's add a sound to make it look more lively. Go to the sound palette and drag and drop the start sound block at the end. Select the bite sound from its drop down. With this, your game is ready. Feed the shark as many fish as you can. If you like this video, don't forget to give it a thumbs up. Bye and happy DIYing.