Lesson 3 - Scrolling and Animation [May 14, 2011, 12:11 a.m.]
Lesson 3 - Scrolling and Animation
-
3.1 - Math!!!
- Video explanation
- Helpful functions for angles, distances, and random numbers
-
3.2 - Scrolling
- Sample Code - HTML
- Sample Code - JS -- Take a look at functions TheWorld.draw(), TheWorld.scrollIfNeeded, and TheWorld.drawIfOnScreen().
- Video explanation
-
3.3 - Animating a Sprite
- Sample Code - HTML
- Sample Code - JS -- Take a look at the RunningHuman.draw() function.
- Sample Code - The image file containing frames of animation
- Video explanation
-
3.4 - Controlling Flicker and Animation Speed
- Sample Code - HTML
- Sample Code - JS
- Video explanation