I decided to design a game Truth or Dare. This game is like Hot Potato, the player who catches the shaking sphero will be asked a question from your friends.
Instruction
Step 1: gather some friends in a circle
Step 2: Start the program
Step 3: Toss the sphero to your friends
Step 4: The player who catches the shaking sphero will be the one to ask Truth or Dare.
Building a game/variable
Building a game/variable
1.)Go to variables and drag the set block into the loop forever and choose expire, now go to operators and drag random integer operator into the right side of the set block, notice there are two types of random operators int or integer means it will be a whole number, if you picked float the result could be a number with a decimal like 4.5. Using an integer here keeps your logic simpler but you will use float values in future activities.
2.) So now let’s make it so that it takes between three and ten tosses to expire. This is suitable for about 3 players to play the game. Each player needs to catch it once before the game expires. If you want to play more than 3 players, you need to increase the minimum and the maximum values accordingly.
3.)Go to controls and drag the loop until block and nest it in the loop forever just below the set expire block.
4.)Now go to operators and drag the basic comparator block of the loop until the command and select greater than. Then go to variables and drag the toss variables to the left side of the statement and then the expire variable to the right.
5.) Now write a code comment on this block ( Loop until the toss variable is greater than the expire variable, then call the blocks within).
6.) Now go to the lights and sounds category and drag the main LED and change it to RED.
7.) Now go to movements and drag a raw motor block below. Keep the left motor 0 sets and set the right motor to 255 and the duration to 0.1 seconds.
Next step
- Go to controls and nest the “If-Then” block to the loop in the ‘loop until’. Now go to comparators drag the basic comparator and place it in the true field, set it to greater than. Next, go to sensors and drag the accelerometer into the left side of the operation and select the total access. Change it to 0 on the right side to three.
- Now add a place sound block and the game abrupt sound and set it to continue, also add the strobe block to add a quick flash of light and set the colour to green and the period to 0.2 sec and count to 1. Go to variables and grab a set block and choose toss.
- Now drag a basic operator to the right beside block and change it to edition. Now you can drag the toss variable to the lift of the plus line. Change the 0 to 1
- Go to controls and drag a delay block and place it after the loop until block and set it to 1 sec. Now go to light and sounds and drag a sound block and choose a game you lose sound and set it to continue. Now place the main LED block and change it to orange
- Go to movements and drag the raw motor block and set both the left and the right motor power to 255 and the duration to 2 sec. Go to controls and drag the delay block and set it to 1 sec. And drag a speak block and right you lose. Go to variables and drag the set block and set it to toss.
What have I learned?
I learned how to write a program to make a game.
Did I enjoy making this?
To be honest, no, because I'm not good at making like these things and also I ran out of time by making this project.
What did you try hard for this project?
Thinking what game should I make.
No comments:
Post a Comment
To support my learning I ask you to comment as follows:
1. Something positive - something you like about what I have shared.
2. Thoughtful - A sentence to let us know you actually read/watched or listened to what I had to say
3. Something thoughtful - how have you connected with my learning? Give me some ideas for next time or ask me a question.
Note: only a member of this blog may post a comment.