Game Development Reference
In-Depth Information
5.
Place a touching <kart2> block in the slot right of the or operator. Note how
we check for the kart and not the control sprite. This is because the kart sprites
are a lot bigger than the control sprites. So, they are easier to hit.
6. Player one will now not only bounce back when hiing a wall, but also when
hiing his/her opponent. Of course, we need to do the same for player two,
or the game would be a bit unfair.
7.
Make sure to have control sprite player2 respond in the same way to
hiing kart1 .
Turning players into obstacles that slow each other down also adds a tacical element
to the game. Players can now acively try to run each other of the road.
Finishing the game
Two players can now race each other around the circuit, which is already a lot of fun.
But it would be even beter if the game has a clear end state and a noiicaion about
who won the game.
Engage thrusters
We will add some more scripts to the control sprites player1 and player2 . We will first
build one complete instrucion set, which we can then easily copy to the second sprite.
To determine whether a player has completed a round, we need to add a finish line.
This can be a simple addiional sprite laid across the track:
1. Click on the Paintbrush icon to create a new sprite.
2. Select the Line tool and draw a horizontal line. Make sure that the line is wide
enough to stretch across the road and the sandy areas next to it.
3. Drag the line to the posiion of the inish line on the backdrop image.
 
Search WWH ::




Custom Search