Angry Marbles physics of the Angry Birds Games Fundamentals © by Jarek Francik Kingston University,...
-
Upload
brittany-walton -
Category
Documents
-
view
217 -
download
1
Transcript of Angry Marbles physics of the Angry Birds Games Fundamentals © by Jarek Francik Kingston University,...
Angry Marblesphysics of the Angry Birds
Games Fundamentals© by Jarek FrancikKingston University, London
2013
Using Engines
For a Game Developer:
• There is no escape from programming– games don’t write themselves
• There is no escape from maths– engines can’t solve all problems!
• There is a kind of escape from physicsbut ...
Physics Engine
• You can easily do simple stuff• Physics engines are still complex
and your knowledge in physics will helpto master them
• You can hardly reach the full potential of the physics engine unless you understand physics
• Many less-trivial physical effects require significant additional effort from the developer and therefore – good understanding of physics
Physics and Employability
• Serious games companies are looking fordevelopers who can build sophisticatedphysical models!
• Understanding physicsenhances youremployability
Box2D
• Open source• 2D physics engine• written by Erin Catto• zlib license• Productions:– Angry Birds, Crayon Physics, Limbo, Rolando
Tiny Wings, Happy Wheels, Little Cavemanand many more...
Box2D
• World• Body• Shape• Fixture• Joint
Box2D
• World– creates and destroys physical bodies– performs the simulation steps– provides gravitational field
• Body• Shape• Fixture• Joint
Box2D
• World• Body– physical entity, subjects to simulation– detects collisions– responses to forces, impulses, torques etc.– provides position and rotation data
• Shape• Fixture• Joint
Box2D
• World• Body• Shape– geometry provider:• polygons (incl. rectangles)• circles• edges and chains
• Fixture• Joint
Box2D
• World• Body• Shape• Fixture– attaches a shape to a body– provides physical attributes:• density (necessary to calculate mass and inertia)• friction• restitution
• Joint
Box2D
• World• Body• Shape• Fixture• Joint– provides joined or chained objects
like ragdolls, teeters and pulleys
Box2D
• Units:– meter– kilogram– second
• GFC implementation: 1 meter = 100 pixels• Scale matters!
Demo:
Angry Marbles!