Building Brickslayer: Game Programming with Prototype but not the iPhone
Written by on July 23rd, 2007 in Ajax News.
I know it isn’t Friday, but this is a fun tutorial for any JavaScripter. Michal Wallace has written up a thorough step by step tutorial that walks you through the creation of Brickslayer using Prototype.
- Setting Up Shop: Tools you will need and initial versions of the source files.
- The Paddle: Our First Sprite: Creating a sprite and moving it manually with firebug.
- Keyboard Control: Prototype’s Cross-Browser Event System.
- Animating the Paddle: Smooth animation with setInterval
- Building the World: Walls, the ball, and a ton of bricks.
- Collision Detection: Ball Physics. Unit Tests and the Math Object.
- Keeping Score: Winning, Losing, and Slaying Bricks.
- Adding Sound: Audio feedback with soundManager.
- Those Other Screens: Pause. Game Over. Level Clear. The Title Screen.
- The High Score List: Talking to a PHP Script with Prototype’s AJAX support.
- Potential Enhancements: Ideas for making this game your own.
To contrast this tutorial, Mihai Parparita detailed his tale of failure at developing a game for the iPhone, and the frustration with the events, and the messing with setTimeout/Interval.
Source: Ajaxian
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/136376633/building-brickslayer-game-programming-with-prototype-but-not-the-iphone
