{% trans 'Watch it here now.' as msg_meta_extra} Play Your Game with a Friend - Escape Game - CS First Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more.

arrow_back Play Your Game with a Friend

Transcript

In this video, you'll remix this game so that a second player can control a chaser using key press events.

To start, select a chaser spray.

This spray is going to do something different from the other chasers so rename it player two.

To program the chaser to move with key press events, remove only the code that moves the spray and leave the if statement that checks if the two sprays are touching.

Next, program events to move the sprite forward, backward, left and right when a second player presses the arrow keys.

This video will fast forward through addition of these blocks, but when you create this code, remember that you need to add four events, four motion blocks, and if you want the sprite to run smoothly, a repeat until not pressing code stack for each event.

After you code all four events, tinker with the sprite speed by changing the value of the move 10 steps block.

Play around with those values until player two moves slowly enough to make the game fair.

It may take a few tries to get this right.

A big part of computer science is trying new things.

Testing them, then going back to tinker with the code until you're happy with the result.

Now it's your turn.

Program events to move the sprite forward, backward, left and right, when a second player presses the arrow keys, then tell users how to work your program using either a save log or instructions in the project page.

One you've finished programming your game for a second player, ask your neighbor to try it out.

Choose an Add-On
Play a Sound if Caught
Add a sound to your game and program your project to play that sound.
Play Your Game with a Friend
Program one sprite to be controlled by another player.
Change Up the Player
Change up your player's costume whenever it touches another sprite.
Speed Up the Chase
Make the game harder by making the chasers faster.
High Score!
Create a new variable that stores the game's current high score.
arrow_backward Back
Next arrow_forward
Instructions
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!
Attributions
  • The song “Magic Marker” is © YouTube-- CC-BY-SA 4.0 does not apply.