Scratch Game with Levels
Scratch makes it easy to create and control Sprites (images).
Unfortunately, it's only designed for one single Level (scene).
Multiple Levels / Sequences of Actions
We can create a multiple-level game by using the following ideas:
- each level uses a different background image -
use [switch to background] for this purpose
- at the beginning, [show] the Sprites for level 1
and hide all the Sprites for the other levels.
Use a message like (finish1) to signal the end of the level.
- at the end of each level, use [broadcast] to send a message
to all the Sprites to [hide] all the Sprites from the current level
and [show] all the Sprites for the next level
- all the Sprites should have [when flag clicked] and either show or
hide themselves
- most Sprites react to end of a level with show or hide
Sample Levels Game
The following game : http://scratch.mit.edu/projects/47049962/
demonstrates the use of BROADCASTS + hide + show
to create a multi-level game or story. By using broadcasts,
we can set up a SEQUENCE of events/actions that
follow one after the other.
The teacher will explain the important concept
in the Sprites and code in the sample game.
Making it Interesting
There are lots of ideas for how to make a game interesting.
These don't involve specific commands,
but rather clever ideas. Here are some suggestions:
- Don't make every level the same. Levels can involve:
- a "story" where actions occur one after another
- solving a puzzle
- touching various objects in the right order
- Have an overall story, with every level being part of the story.
- Maintain some continuity by having the same player in all levels
(although this may be several different copies of the same picture)
- Collect points or money or objects or information as the story
progresses.
- Keep individual levels simple, but the overall story could be complex.
Assignment
You have until 2 Dec (18:00) to create a game in Scratch.
- Your game should have several levels - at least 5 screens,
plus beginning and ending screens. Some of the levels might
be quite simple, like the questions in the sample program
- Each level needs an appropriate background.
- At least some levels must involve keyboard (or mouse-click) control.
- At least one level must involve some sort of puzzle that needs to be
solved.
- You must have a sensible or interesting or fun story for the whole
game,
not just random, disconnected scenes
- There should be some "friend" sprites that are "good guys"
and some "monster" sprites that are "bad guys"
- Use some variety of motions - no always the same motions -
like the figure 8 in the Bee example game
Due Date : Friday 2 Dec at
18:00