Você está na página 1de 22

The Math and Science within a GameSalad Platformer

Steps 4 and 6:
Ground actor Player actor

**We set Density, Friction, and Bounciness to 0 so they do not have an effect on the game they will not be used**

Collide and Collision


(Step 7)

Definitions:
Collide:
crash together with violent impact
http://dictionary.kids.net.au/word/collide

Collision:
a brief event in which two or more bodies come together
http://dictionary.kids.net.au/word/collision

Gravity
(Step 8)

Gravity
a force which tries to pull two objects toward each other anything which has mass also has a gravitational pull the more massive an object is, the stronger its gravitational pull is

the closer you are to an object, the stronger its gravitational


pull is it gives you weight it is the force that pulls on all of the mass in your body

Examples of Gravity
Earth's gravity is what keeps you on the ground and what causes objects to fall. Gravity is what holds the planets in orbit around the sun and what keeps the moon in orbit around Earth.
http://coolcosmos.ipac.caltech.edu/cosmic_kids/AskKids/def_gravity.shtml

Creating Gravity
To create Gravity in GameSalad, you simply need the
Accelerate behaviorit works together with the Collide behavior to allow your Player to move along the Ground.

The Accelerate behavior is a way to move your actor and


it has 3 settings:
1. Direction 2. Relative to 3. Acceleration

Direction:
the field for specifying an angle
Right, Up, Left, Down

Angles (0, 90, 180, 270)

http://idtech365.internaldrive.com/tutorials/actor-movement-blocking-volumes-gamesalad/

Relative to: this field has two


choices
Scene:
The actor will move in a direction that is relative to the screen Ex. Platform

Actor:
The actor will turn and move based on the direction it is facing
Ex. Space Shooter

Unofficial GameSalad Textbook

Acceleration:
speedthe higher the number, the faster it moves
Acceleration = 1,000 Faster = Stronger Gravity

Acceleration = 500 Slower = Weaker Gravity

Linear Velocity X
(Steps 10 through 16)

Definitions:
Velocity: distance travelled per unit time in a given direction
http://dictionary.kids.net.au/word/velocity

Linear velocity: the velocity of the object travelling in a straight line (the body is said to be moving with linear velocity when its direction is not changing)
http://physics.tutorvista.com/motion/linear-velocity.html

Linear Velocity X: is the velocity of the object travelling in a straight line along the x-axis (Left and Right)

Move RIGHT
(Steps 10 and 11)

self.Motion.LinearVelocity.X to 200 means that the actor will move 200 pixel spaces to the RIGHT in a straight line along the x-axis. self.Motion.LinearVelocity.X to 0 means there is NO movement or it stopped moving.

Move LEFT
(Steps 14 through 16)

Self.Motion.LinearVelocity.X

to -200

means that the actor will move -200 pixel spaces to the LEFT in a straight line along the x-axis. self.Motion.LinearVelocity.X to 0 means there is NO movement or it stopped moving.

Integer
(Step 20)

Definitions:
Integer: a number with no fractional part: includes the counting numbers {1, 2,3...}, zero {0}, and the negative of the counting numbers {-1,-2,-3}
http://www.mathsisfun.com/definitions/integer.html

Integer attribute: This attribute type is for whole numbers, both positive and negative.
Examples: -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Integer attribute type will round a number.


Examples:
1.5 becomes 2 20.4 becomes 20
Unofficial GameSalad Textbook

Linear Velocity Y
(Steps 22 through 26)

Definitions:
Velocity: distance travelled per unit time in a given direction
http://dictionary.kids.net.au/word/velocity

Linear velocity: the velocity of the object travelling in a straight line (the body is said to be moving with linear velocity when its direction is not changing)
http://physics.tutorvista.com/motion/linear-velocity.html

Linear Velocity Y: is the velocity of the object travelling in a straight line along the y-axis (Up and Down)

Move UP
(Steps 22 through 26)

self.Motion.LinearVelocity.Y to 500 means that the actor will move 500 pixel spaces UP in a straight line along the y-axis.

Credits:
Ask an astronomer for kids! - What is gravity? (n.d.). Welcome to Cool Cosmos! Retrieved March 1, 2010, from http://coolcosmos.ipac.caltech.edu/cosmic_kids/AskKids/def_gravity.shtml Definition of integer. (2011). Math is Fun - Maths Resources. Retrieved March 1, 2013, from http://www.mathsisfun.com/definitions/integer.html Game design engine, make games for iphone & android - gamesalad. (2013). GameSalad. Retrieved March 8, 2013, from http://gamesalad.com Garofalo, M. (2010). Unofficial gamesalad textbook. New York: Photics. Kids.Net.Au. (2010). Dictionary. Kids.Net.Au. Retrieved March 7, 2013, from http://dictionary.kids.net.au/ Linear velocity, linear velocity formula | physics@tutorvista.com. (2007). Physics Help, Physics Homework Help, Physics Problem Solver | Physics@TutorVista.com. Retrieved March 7, 2013, from http://physics.tutorvista.com/motion/linear-velocity.html Part 4 Actor movement and blocking volumes in gamesalad | id tech 365. (n.d.). Tutorials for kids & teens: make your own games, apps, programs websites & more! | iD Tech 365. Retrieved March 7, 2013, from http://idtech365.internaldrive.com/tutorials/actor-movementblocking-volumes-gamesalad/

Você também pode gostar