Top Banner
Adventure Game 1 Lessons 1-3
30

Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Sep 30, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Adventure Game

1

Lessons 1-3

Page 2: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Backgrounds

In Scratch, paint 3 different

backgrounds on the stage. I have created a park with a path, an

inside room and a green grassy area

2

Page 3: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Sprites

In Scratch, paint a sprite for your

character (call it ‘Me’) and a flower

(call it Flower1)

3

Page 4: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Sprites

Rotate the sprite so that it faces in

the correct direction

4

Page 5: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Movement Script

Add a script to your character to

make it move when you press

keys

5

Page 6: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Hide Script

Add a script to the Flower1 to make

it disappear when the character

touches it

6

Page 7: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Hide Script

Add a variable called health

7

Change the script of Flower1 so that it starts at 0 and you gain 1 health for touching it

Page 8: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Poison Flower Create a Poison

flower sprite

8

Create a script to make it hide if you touch it and

take off health. Remember you can drag the script from Flower1 onto the Poison flower

and edit it

Page 9: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Testing

9

When you play the game there are some problems

1. The ‘Me’ sprite may not be in the correct position or direction. Correct

this

Page 10: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Testing

10

When you play the game there are some problems

2. The flowers hide but do not show again when you replay the game.

Correct this

Page 11: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Portal

11

Create a new sprite. Call it Portal

Create a script so that when ‘Me’

touches it, a new instruction is

broadcast

Page 12: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Change Level

12

Create a script on the stage so that

when the message is broadcast, the

background changes

Page 13: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Testing

13

When you play the game there are some problems.

The ‘Me’ character is in the incorrect

position and direction. Correct this on the ‘Me’

script

Page 14: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Duplicate

14

Duplicate some of the flowers using the Duplicate tool

Page 15: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Dragon

15

Add a Dragon. I want this only on Level 2 which is

the inside background and

not on this background

Page 16: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Dragon

16

Firstly, we want the Dragon to

show when the background of the

stage = 2

Page 17: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Dragon script

17

Create a script on the Dragon.

We need it to look forever, to see if the background of the stage is the second background.

If it is the dragon shows, else the dragon hides

Page 18: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Portal script

18

We want the portal to only appear if you pick the 5

yellow flowers and have a health of 5

Page 19: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Poison Flowers

19

We only want the Poison flowers to appear on

background = 1. We need to add a script to each

Poison flower. Remember you can create the script

once and drag it onto each Poison flower

Page 20: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Dragon Question

20

The dragon will ask a question when you

touch it. If your Answer is Yes and you

choose to fight you will die. Else, a magic

key appears

Page 21: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Dragon Question

21

Improve the script to broadcast a

communication about the key if the player chooses not to fight, and to stop the game if the player chooses

to fight

Page 22: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Key Script

22

Now the key needs to be hidden

But it needs to appear when the ‘Key

appears’ message is broadcast.

It also needs positioning

Page 23: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Key Script

23

When I touch the key I will get it to broadcast

a new message

Page 24: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Stage script

24

The new message will change the stage background again

Page 25: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Stage script

25

At this point I will also set the initial background

Page 26: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Final Level

26

The final level will have a boss

Add a new sprite

Page 27: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Boss script

The boss is hidden. It only shows on this level when the

Change to Level 2 message is broadcast

27

Page 28: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Boss script

Drag the dragon script onto the boss and edit it

28

Page 29: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Boss script

You can ‘fight’ the boss by including the following scripts

29

Page 30: Adventure Game - WordPress.com...Adventure Game 1 Lessons 1-3 Backgrounds In Scratch, paint 3 different backgrounds on the stage. I have created a park with a path, an inside room

Extension You could now go on to develop your own game using the skills developed. It should have

- Character movement

- Show/Hide

- A variable e.g. health

- Different backgrounds

- A boss

- If/else

30