A series of example programs to teach JavaScript video game concepts to beginners. I wrote these for the students in my Video Game Design course in 2014.
- BouncingRect.html - basics of drawing to the canvas and animation
- CollisionBox.html - basic collision detection
- EtchASketch.html - basic keyboard input
- EtchASketchSmooth.html - better keyboard input
- Barricades.html - using JS objects
- MouseDemo.html - basic mouse input
- TrafficLight.html - better mouse input
- CookieClicker.html - the worst clicker ever made
- CollectFruit.html - drawing an image to the canvas, mouse offset
- GameState2.html - handling game states - menu, game, game over
- ManyRectangles.html - arrays of objects
- DataFile.html with rectangles.json - getting objects from an external file. Requires a webserver
- CatchEmAll.html - putting it all together in a very simple game
- SnakeBasic.html - basic Snake
- WormBasic.html - snake with a twist
- Shooting.html - demo showing how to fire projectiles from a single point
- MovingShooting.html - same but the barrel can move
- Turret.html - I hope you remember your trigonometry!
- WalkPath.html - shows how a guard could pace around a predetermined path
- LocalStorage.html - shows how to save info to HTML LocalStorage
- Worm Advanced - an actual complete, semi-fun game