In this tutorial you will learn how to program a reaction game for 2 players!

Download the tutorial in PDF-format here!

Play-Button

1. Create a new project. First you add a new object (a button or something similar) that starts the game and contains the logic.

2. Now add the bricks to your script of the play button step by step.Now add the bricks to your script of the play button step by step.

image1_2.PNG

3. Now you need a loop. The content of this is executed as often, depending on how many rounds you want a game to have. After a random time, the characters should appear.

image1_3.PNG

image1_3tip.PNG

4. At the end you have to tell all characters again that the game is over and show the button again to be able to play again.

image1_4.PNG

5. Now all you have to do is: tell the players who won.

image1_5.PNG

Characters

1. Now only the characters that should be clicked on when they appear are missing. Don't forget that you need two pieces - one for each Player! Place them so that they appear right to the players when they are seated across from each other.

image2_1.PNG

2.  Now add the bricks to your script of the characters step by step. Don't forget that the characters shouldn't be visible at the beginning!

image2_2.PNG

3. Now you only have to count the points when the character is clicked and then hide them, that the player is not to able to collect more points.

image2_3.PNG

4. That's it. Try your game right now!

TIPP:
If you want to improve your game even more, try the expansions right away.

Extension 1 - Won!

1. How about a nicer message for the player who won?

To do this, add two objects with your desired message. Again, pay attention to the alignment.

erweiterung1_step_1.PNG

2.  Now add the bricks to your script of the messages step by step. Do not forget that the message should not be visible at the beginning!

erweiterung1_step_2.PNG

3. When the game starts (“When you receive: Game starts”) the messages should disappear again (“Hide”).

Extension 2 - Score

1. Would you also like to keep track of the points during the game?

To do this, add two objects with your wish symbol again. Again, pay attention to the alignment.

erweiterung2_step_1.PNG

2.  Now add the bricks to your script of the score counters step by step. Do not forget that the points should not be visible at the beginning!

erweiterung2_step_2.PNG

3. When the game ends, the points and the variable should disappear again.

erweiterung2_step_3.PNG

Extension 3 - Now it's getting difficult

1.  How about to make the game a little more difficult? For example: charaters should not always appearing in the same position?

To do this, you have to change the script of the characters. First, take a look at where your figure is placed.

erweiterung3_step_1.PNG

2. Now think about the positions in which your character should appear. For example, if you only want it to jump between left and right, you always have to keep the y position the same.

3. Every time the character now receives that it should show itself, a new position must be calculated.

erweiterung3_step_3.PNG

erweiterung3_step_3_tipp.PNG

4. If the figure should always be of different sizes, you now have to change the size every time the figure is displayed.

There is also the brick "Set size to":

erweiterung3_step_4.PNG

5. Your finished script for displaying the characters could now look like this.

erweiterung3_step_5.PNG

Now try to expand your game yourself.