April 17, 2010
Tutorial: Cannon Game
The code uses a bit of trigonometry to aim the cannon and a bit of physics to provide gravity. It introduces the idea of using timers for animation and hit-testing for collisions. The gameplay is governed by a three-state state machine with an explicit state variable.
I am still looking for more ideas. Let me know if you think of any good beginner-programmer exercises that might be able to distilled down to about 80 lines of HTML.Posted by David at April 17, 2010 07:59 AM
|Copyright 2010 © David Bau. All Rights Reserved.|