Index
A
- addCart function / When Angry Birds meets Crush the Castle
- addWheel function / When Angry Birds meets Crush the Castle
- Angry Birds game
- force, applying / Forces in a real game
- bird, launching / Physics games aren't just a matter of physics
- physics bird, placing / Placing the physics bird
- physics bird, shooting / Shooting the physics bird
- ApplyForce method
- ApplyImpulse method
B
- b2Body
- about / Creating a fixture
- b2BodyDef / Your first simulation – a ball falling on the floor
- b2CircleShape
- about / Creating a circular shape
- b2ContactEdge
- b2Contact object
- b2DebugDraw
- b2DistanceJointDef / Keeping bodies at a given distance – distance joints
- b2MouseJointDef object / Picking and dragging bodies – mouse joints
- b2PolygonShape class
- about / Creating a box shape
- b2PolygonShape method
- about / Creating an oriented box shape
- b2Vec2 object
- about / Creating an oriented box shape
- Begin Contact Event
- BeginContact function
- birdRelease function
- bodies
- picking and dragging / Picking and dragging bodies – mouse joints
- setting, as bullets / Preventing tunneling – setting bodies as bullets
- body attributes
- density / Density, friction, and restitution
- friction / Density, friction, and restitution
- restitution / Density, friction, and restitution
- assigning / Density, friction, and restitution
- bodyDef attribute / Creating a fixture
- body properties
- body types
- static body / Different body types – static, dynamic, and kinematic
- dynamic body / Different body types – static, dynamic, and kinematic
- kinematic body / Different body types – static, dynamic, and kinematic
- Box2D
- about / Hello Box2D World
- Box2D body
- simulations / Your first simulation – a ball falling on the floor
- circular shape, creating / Creating a circular shape
- fixture, creating / Creating a fixture
- box shape, creating / Creating a box shape
- body types / Different body types – static, dynamic, and kinematic
- compound bodies, creating / Creating compound bodies
- oriented box shape, creating / Creating an oriented box shape
- convex polygons, creating / Creating any kind of convex polygons
- selecting and destroying, with mouse click / Selecting and destroying bodies with a mouse click
- custom attributes, assigning / Assigning custom attributes to bodies
- looping through, and getting properties / Looping through bodies and getting their properties
- Box2D built-in collision listener
- Box2D for Flash
- downloading / Downloading and installing Box2D for Flash
- download links / Downloading and installing Box2D for Flash
- installing / Downloading and installing Box2D for Flash
- Box2D games, skinning
- debug draw, replacing with custom graphic assets / Replacing debug draw with your own graphic assets
- Box2D World
- defining / Defining the Box2D World
- boxAngle variable
- about / Creating an oriented box shape
- box shape
- creating / Creating a box shape
- bullet
- bodies, setting as / Preventing tunneling – setting bodies as bullets
C
- categoryBits property / Don't let some bodies collide – filtering collisions
- circular shape
- creating / Creating a circular shape
- click listener
- collision filtering / Don't let some bodies collide – filtering collisions
- collisions
- checking / Checking for collisions
- filtering / Don't let some bodies collide – filtering collisions
- collisions management
- collisions, checking for / Checking for collisions
- Box2D built-in collision listener / Box2D built-in collision listener
- Begin Contact Event, tracing / Trace the beginning and the end of a collision
- End Contact Event, tracing / Trace the beginning and the end of a collision
- Pre-Solve Event, tracing / Detect when you are about to solve a collision and when you have solved it
- Post-Solve Event, tracing / Detect when you are about to solve a collision and when you have solved it
- idol hitting ground, detecting / Detecting when the idol falls on the floor in Totem Destroyer
- bricks and killing pigs, destroying in Angry Birds / Destroying bricks and killing pigs in Angry Birds
- compound bodies
- creating / Creating compound bodies
- convex polygons
- creating / Creating any kind of convex polygons
- createJoint callback function / Picking and dragging bodies – mouse joints
- CreateJoint method / Picking and dragging bodies – mouse joints
- custom attributes
- assigning, to bodies / Assigning custom attributes to bodies
- customContact class / Putting it all together
D
- debug draw
- used, for testing simulation / Using debug draw to test your simulation
- about / Using debug draw to test your simulation
- replacing, with custom graphic assets / Replacing debug draw with your own graphic assets
- debugDraw function / Picking and dragging bodies – mouse joints, When Angry Birds meets Crush the Castle
- debugSprite
- density
- DestroyBody method
- destroyBrick function
- DestroyJoint method / Don't let some bodies collide – filtering collisions
- distance joints
- DrawDebugData method / Using debug draw to test your simulation
- dynamic body
E
- enableMotor
- about / Controlling joints with motors
- End Contact Event
- EndContact function
- ENTER_FRAME event / Running the simulation
F
- falling ball, simulation
- creating / Your first simulation – a ball falling on the floor
- gravity, configuring / Your first simulation – a ball falling on the floor
- fixture
- about / Creating a fixture
- creating / Creating a fixture
- floor function / Creating any kind of convex polygons
- force
- object, raising from ground / Falling apples, revamped
- about / Force, impulse, and linear velocity
- applying, to body / Force, impulse, and linear velocity
- applying, to get linear velocity / Applying a force to get a linear velocity
- applying, to real world example / Forces in a real game
- frames per second (fps)
- friction
G
- gameOver variable
- GetAngle method
- GetBodyList method
- GetBody method
- GetLinearVelocity method
- GetPosition method
- GetType method / Picking and dragging bodies – mouse joints
- GetWorldCenter method
- gravity / Defining the Box2D World
- ground body / Picking and dragging bodies – mouse joints
H
- Hello Box2D World
- about / Hello Box2D World
I
- impulse
- about / Force, impulse, and linear velocity
- applying, to get linear velocity / Applying an impulse to get a linear velocity
- inelastic collision
J
- joints
- mouse joints / Picking and dragging bodies – mouse joints
- distance joints / Keeping bodies at a given distance – distance joints
- revolute joints / Making bodies rotate around a point – revolute joints
- controlling, with motors / Controlling joints with motors
K
- keyboard
- motors, controlling with / Controlling motors with keyboard
- keyPressed function / Don't let some bodies collide – filtering collisions
- killJoint function / Picking and dragging bodies – mouse joints
- kinematic body
L
- levelFailed function
- linear velocity
M
- maxMotorTorque property
- about / Controlling joints with motors
- motors
- joints, controlling with / Controlling joints with motors
- controlling, with keyboard / Controlling motors with keyboard
- motorSpeed property
- about / Controlling joints with motors
- mouse joints
- mouseToWorld function / Picking and dragging bodies – mouse joints
O
- oriented box shape
- creating / Creating an oriented box shape
P
- perfectly elastic collision
- physics bird
- placing / Placing the physics bird
- shooting / Shooting the physics bird
- pig function
- pixelsToMeters
- about / Creating a circular shape
- position constraint solver
- about / Running the simulation
- position property / Your first simulation – a ball falling on the floor
- Post-Solve Event
- PostSolve function
- Pre-Solve Event
- PreSolve callback function / Putting it all together
- PreSolve function
Q
- queryCallback function
- about / Selecting and destroying bodies with a mouse click, Replacing debug draw with your own graphic assets
- QueryPoint method
R
- removeChild method
- restitution
- revolute joints
S
- sensors
- used, for allowing bodies overlapping while detecting the collision / Allow bodies to overlap while detecting contacts with sensors
- about / Allow bodies to overlap while detecting contacts with sensors
- used, for allowing bodies overlapping detecting the collision / Allow bodies to overlap while detecting contacts with sensors
- SetAsBox method
- about / Creating a box shape
- SetAsOrientedBox method
- about / Creating an oriented box shape
- SetContactListener method
- SetFillAlpha method
- SetFlags method / Picking and dragging bodies – mouse joints
- SetLinearVelocity method
- SetSprite method
- shape
- about / Creating a circular shape
- shape attribute
- about / Creating a box shape
- siege machine
- building / When Angry Birds meets Crush the Castle
- about / When Angry Birds meets Crush the Castle
- testing / Don't let some bodies collide – filtering collisions
- implementing / Putting it all together
- simulation
- running / Running the simulation
- ball falling on floor / Your first simulation – a ball falling on the floor
- falling ball, creating / Your first simulation – a ball falling on the floor
- testing, debug draw used / Using debug draw to test your simulation
- sleep / Defining the Box2D World
- sphereCenter variable
- static body
- Step method
- about / Running the simulation
- switch statement / Don't let some bodies collide – filtering collisions
T
- textMon
- theBird
- Totem Destroyer level
- creating / Creating a Totem Destroyer level
- tunneling
- experiencing / Experiencing tunneling
- preventing / Preventing tunneling – setting bodies as bullets
U
- updateWorld function / Running the simulation, Using debug draw to test your simulation, When Angry Birds meets Crush the Castle, Putting it all together
V
- velocity constraint solver
- about / Running the simulation
W
- worldScale variable
- about / Creating a circular shape