Game Development Reference
In-Depth Information
Engage thrusters
We will create the code to iniialize the game and determine the game compleion
or terminaion.
Perform the following steps to iniialize the system:
1. Start with a
when <green lag> clicked
block.
2. Enter
2
and
5
in the
go to x: () y: ()
block respecively.
3. Enable the
switch costume to <Start Screen>
block.
4. Enable
show
.
5. Enter
480
in the
set <grid_length> to ()
block.
6. Enter
0
in the
set <game_score> to ()
block.
7. Enter
0.2
in the
set <frame_rate> to ()
block.
8. Enter
10
in the
set <grid_count> to ()
block. This number should be equal to or less
than the number of the costumes in the brick sprite.
9. Enter
3
in the
set <bad_food_start_grid_idx> to ()
block. The
bad_food_start_
grid_idx
variable is the plaform number when bad food can start appearing. For
example, if this variable is set to
3
, then mushroom can appear staring from grid 3.
10. Enter
0.75
in the
set <scroll_speed> to ()
block.