Game Development Reference
In-Depth Information
At the beginning of each new level, Game Manager engages the user as well as the other
sprites in the game. To users, it displays the level-up screen that scrolls up, giving the users
ime to wiggle their ingers before the next game. To the other sprites, it noiies that this
level is over and the sprites then wrap up the current level and prepare for the next one.
Prepare for lift off
Instead of creaing the Game Manager scripts from scratch, we will use the complete
Game Manager sprite from the starter project and add two new levels to it.
Game Manager is the most complex sprite in this game. The Space Age message flow diagram
below shows that Game Manager is at the center of the happenings. It determines and
announces each stage of the game play: start, level-up, and terminaion. Moreover, Game
Manager scripts also enables exising levels to be conigured and new levels to be added.
Engage thrusters
At system start ( when <green lag> clicked ), Game Manager displays the game rule to the
user and prompts the user to play. It also iniializes global variables and game levels. This
iniializaion script is included in the starter project so that one can test the other sprites.
Let's take a look at its when <green lag> clicked script:
1. Display the start page by adding go to x: () y: () with the values 8 and 13 , then
switch costume to <Start Screen> , and show .
2. There are two game levels that we will add next. The first one is
set <max_game_level> to () with the value 2 .
3. We start with Level One by using set <game_level> to () with the value 1 .
4. Reset the game score using set <game_score> to () with the value 0 .
5. Now add set <min_enemy_count> to () with the value 3 . If the enemy count goes
below <min_enemy_count> , the player moves up a level.
6. Add set <move_steps> to () with the value 20 . Add set <frame_rate> to () with the
value 0.2 .
7. Let's move on to level coniguraion. First, clear all the entries from the level lists.
Add delete <all> of <enemyTypeList> , delete <all> of <enemyCountList> , and
delete <all> of <levelTimeoutList> .
8. Use the Configure Level () block to configure each level.
9. For Level One, use Conigure Level: 1 enemyType: <Rock> enemyCount: () imeout:
() with the values 15 and 20 . The enemy type must be exactly the same as the
enemy sprite name. Make sure that there is no extra space.
10. For Level One, use Configure Level: 2 enemyType: <Mother Ship> enemyCount: ()
imeout: () with the values 1 and 30 .
Search WWH ::

Custom Search