Game Development Reference
In-Depth Information
As the purpose of the two coming chapters is to cover the fundamental
mechanisms of the gameplay, I will not use any image element. I will stick to the
basic shapes in GameSalad.
In this chapter, you will learn to:
Build a complete slingshot system.
Simulate an elastic slingshot element in GameSalad.
Control the camera.
Implement gravity for your game.
Use advanced camera settings.
Manage a defined number of attempts to destroy targets.
Building a Slingshot: Elastic and Pullback
Force
Building the slingshot is one of the keys to your game. In doing so, you will learn
some new functions like magnitude and vectorToAngle.
Anatomy of a Slingshot
A slingshot is a catapult that has a T-shape with two elastics attached to it. It is
used to throw small projectiles by hand. Figure 6-1 shows a drawing of a
slingshot.
Figure 6-1. Drawing of a slingshot
You will position the slingshot on the ground. The projectile will have a limited
area of movement. The more you pull back on the elastic, the farther you will
send the projectile, as shown in Figure 6-2.
 
Search WWH ::




Custom Search