Game Development Reference
In-Depth Information
Objective complete - mini debriefing
Currently the cannonball is moving on in a straight line. In reality, a cannonball doesn't move
like that (but we'll be fixing this). It is heavy, and what goes up must come down. You can try
it yourself with a ball or a stone. Throw it upwards in front of you and see what happens. Just
be careful with the neighbor's windows!
Creating a parabolic shot
The ball will move upwards in the direcion you threw it. At some point it will start to
slow down, stop, and then start falling down. The path the ball follows is called a parabola.
This is what we expect of gravity. It's always around us, so we don't pay too much atenion
to it. If you would throw the ball in space, which has no gravity, the ball would move on
forever in a straight line, as it does now in our game. On Earth, the ball will move up for
a while, then slow down, and eventually fall down again. This movement path is described
in the following diagram:
In this case, the cannon and cannonball should be on the ground, so we want to simulate
some gravity. Not only will the parabola trajectory look more interesing, it will also make
the game more challenging. You could try hiing a target by shooing the cannonball at a
steep angle and have it hit a target as it drops down. It is very useful to shoot over the hills,
which we will do in the last stage of this project.
 
Search WWH ::




Custom Search