Game Development Reference
In-Depth Information
Classified intel
The order in which the condiion checks for the scoreYellow value are placed is very
important. Since the score is increasing from 0 upwards, we first need to check the highest
value ( > 29 ), which is the last condiion to be achieved. When this condiion is not met, the
script will then check if scoreYellow has reached 15 yet. And if that's not the case either,
it will default the basic, innermost, else condiion.
If we switched these checks around, the >29 condiion would never be reached because
the >14 condiion would resolve and throw us out of the loop before we reached the other
condiion check.
Tweaking and balancing
To finish this project, we will add a few more details to prepare for the next project. In the
next project, we want to add a boss fight to this game; but when should the boss appear?
I've decided to make this a imed event. The player should survive for a certain amount of
ime, shooing enemies along the way to increase the power of the spear. Ater 90 seconds,
the starfish will disappear and a boss monster will appear.
You may have also noiced that the scrolling images tend to sick to the sides of the stage
before disappearing. This is a feature of Scratch to prevent you from completely losing sight
of sprites. To get rid of these lingering sprites, we use a visual trick to obscure them.
Engage thrusters
Let's irst work on the ime limit to complete our game. We will use the built-in imer to
count the seconds unil the boss appears.
1. Go to the Stage object to add some scripts.
2. We irst reset the imer (using the reset imer block) to start couning from 0
when the game starts.
3. Then, we let the script wait unil the imer is greater than 90 by entering 90 in the
wait unil imer > () block.
Search WWH ::

Custom Search