1 of 27

Lower Elementary

Computer Science

Create a Chicken Crossing Game

2 of 27

Objective

Students will be able to program an interactive player character and adjust the difficulty of play in a game.

3 of 27

Vocabulary

Event: Something that causes something else to happen in a program

4 of 27

Vocabulary

Debug: To fix a problem in a program

5 of 27

Computer games have images that move. These are called animations.

6 of 27

Obstacles are animations that get in the way of the goal!

7 of 27

Player characters are controlled by the player.

8 of 27

Changing how an obstacle or player character moves can make the game easier or harder.

9 of 27

Try this game at the easy and hard levels.

Which level do you like best? Why?

OPEN ACTIVITY

10 of 27

Create a game where the chicken character has to move past the car to get to the chicken coop!

11 of 27

Program the car to start on the “green flag”.

12 of 27

Program the car to move right.

13 of 27

Add a “forever loop”.

14 of 27

Test your program.

15 of 27

Set the car’s difficulty.

  • Add a “speed” block.

  • Make the car

smaller or bigger.

A fast, big car makes the game harder.

A slow, small car makes the game easier.

16 of 27

We will program the player character together. Add a chicken to your scene!

17 of 27

Place the chicken below the road.

18 of 27

The chicken will be controlled by the player. We can add a “start on tap” event.

19 of 27

What direction will the chicken need to move to get to the coop?

20 of 27

Add a “move up” block.

21 of 27

The car is an obstacle. The chicken will go back to the start when bumped!

22 of 27

Add a start on bump event.

23 of 27

Add the “go home” block to send the chicken back to where it started.

24 of 27

Find a number to makes the game easier.

You can try different numbers!

Set the difficulty of the game!

Change the number in the “move up” block.

25 of 27

Your turn!

  1. Add a second chicken and place it below the road.

  • Program the chicken to move up when tapped.

  • Program the chicken to reset when bumped.

26 of 27

Make one chicken’s difficulty easy and the other hard. Can you help both chickens cross the road?

27 of 27

  • Paint the background, car, and chicken characters.

  • Use “speed” blocks to change the difficulty.

  • Add another chicken with a different level of difficulty.

Ready for more?