Game Development Reference
In-Depth Information
Objective complete - mini debriefing
With this step, we have probably completed the most difficult part of the script. We used the
new Make a Block opion to create funcions that make script a litle easier to read and can
save work or excessive copy-pasing when creaing complex operaions.
The beginnings of a game can be visible now; the cat can be moved through the maze.
Creating a goal
Now that the cat can explore the maze, it needs a challenge. It's a good idea to give it a
specific goal to search for.
Prepare for lift off
We will draw a sprite that will be the goal for the cat to reach. What this goal will look like is
not really important. The important thing is that it is exactly 20 x 20 pixels in size, so it will it
a ile segment perfectly.
I choose to represent the goal as a "magical" warp panel consising of bright, blue rings. You
can create the same or design your own goal sprite.
Once done, name the sprite as exit . This will give us the following screenshot:
Engage thrusters
This sprite will have the same two broadcast listeners as the cat to start working. When
the maze is drawn, we will hide the sprite, and when the game starts, we will show it by
performing the following steps:
1.
Drag the when I receive <createMaze> script from the cat and drop it on the exit
sprite to copy it there. That's the first half done.
2.
Then, start the second script with a when I receive <startGame> block.
3.
First, move the exit sprite to the lower-right with go to x: (230) y: (-170) block.
4.
Then, add a repeat unil loop.
5.
Check for the condiion not touching color <black> ?
 
Search WWH ::




Custom Search