Game Development Reference
In-Depth Information
Perform the following steps to iniialize when the game starts:
1.
Start with a when I receive <game_start> block.
2.
Check whether to be Marco or Polo. The user selects the character at the
beginning of the game. Add an if player_name = () then () else () block; in if player_
name=() , enter Marco . If the player's name is Marco, add the switch costume to
<marco> block. Inside else () , add the switch costume to <polo> block accordingly.
3.
Enter 120 in the set <jump_steps> to () block.
4.
Enter 0.5 in the set <jump_wait_ime> to () block.
5.
Enter 8 in the set <fall_speed> to () block.
6.
Enter 0 and 80 in the go to x: () y : () block respecively.
7.
Enable show .
Perform the following steps to fall down:
1.
Start with a when <green lag> clicked block.
2.
Enable hide .
3.
Add a forever block. In the forever block, add a repeat unil touching <Brick>?
block. In the repeat unil touching <Brick>? block, add a change y by () *
fall_speed block; enter -1 .
Perform the following steps to jump:
1.
Start with a when <space> key pressed block.
2.
Enable the change y by jump_steps block.
3.
Enable the wait jump_wait_ime secs block since sprite will coninue to jump.
This is to wait between each jump to prevent player from jumping too high.
 
Search WWH ::




Custom Search