Lesson 4 - Physics Simulation [June 30, 2011, 2:09 p.m.]
Physics!
4.1 - Physics intro - Velocity, Acceleration, Forces
4.2 - Gravity and Friction
- Example HTML - Run and jump!
- Example JS - Especially look at RunningHuman.onGround(), update(), jump(), and idle().
- Video Explanation
4.3 - Collision Detection
- Example HTML - Dodge the falling blocks
- Example JS - Especially look at Player.isTouching() and TheWorld.updateAll()
- Video Explanation
4.4 - Finding the Intercept Points of Moving Objects
- Example HTML: Walls and platforms
- Example JS: - Especially look at Platform.detectIntercept() and TheWorld.touchingPlatform()
- Video Explanation