Game Development Reference
In-Depth Information
About the Restitution Attribute:
The restitution attribute defines the bounciness. Zero means no
bounce! Confused? Why not use bounciness? How will the ball go
back if it can't bounce? Well, the ball will bounce, not the racket!
(Imagine the racket bouncing out of the wall. Not very playable.) A
value of 1 in restitution means that no energy is lost out of the collision
(so it's perfectly elastic).
Adding Behaviors
You can open MyFirstPong_step2.gameproj to start from this point.
In order to add actions to your actors, you need to add behaviors. With
behaviors, you can change the actors' appearance, put some conditions to
some specific actions, or have them perform actions based on a timer. Thus you
use behaviors to add logic to your game.
What are behaviors?
To understand behavior in GameSalad, let's continue the analogy of a human
actor. As a movie director, you direct your actors to perform certain tasks (like
when the cop sees the bad guys, the cop will shoot at them).
In GameSalad, behaviors direct your actors. You may instruct an actor that if a
condition is met, it will auto-destroy itself. This is an example of a behavior.
You can have behaviors for actions (such as how to react when colliding) or
behaviors that check on specific conditions (if the score is below 11, continue to
play).
There are three types of behaviors:
1. Behaviors that occur once (these have an''A'' letter in a red box
next to their name).
2. Persistent behaviors that act continuously (these have a ''B''
letter in a green box to their name).
3. Rules that use conditions to perform other behaviors (these
have a ''G'' letter in a blue box next to their name).
 
Search WWH ::




Custom Search