Yea um, so... I added sound to YUI Tetris
Thanks to Scott Schiller and his dandy Sound Manager (from ages ago) which allows you to embed audio into your webpage and fire them at will with JavaScript. Sounded simple enough so I dropped in the soundmanager.js file, a .swf, and then an xml file to define my sounds... then Voila! it was a piece of cake. It was as easy as dropping in the appropriate triggers in particular points of my tetris script such asmoveLeft, moveRight, drop, nukeLines or rotate. I experienced first hand the benefits of writing in Object Notation when I had to go back and do some editing...
So really, you added sound!!??
Before I get hosh posh from the purist who will have liked it better without the cheesy sound effects, I just want to let everyone know... I was just having fun. And for those who barked and moaned the first time about my choice of keys to use for controlling the blocks; I had a perfectly good explanation of those, and that is that it is a mirror of the original Nintendo layout. Left hand on the directional pad (s | d | f). And your right hand on the A & B buttons (for rotating (and yes, you can rotate both directions in the original tetris!!)). In all seriousness, please don't continue to comment on the keys. It's literally a matter of changing like 3 lines of code.One final sidenote
This is NOT Ajax. Sorry to disappoint. It's a video game with animation and sounds. There is not a single instance ofxmlHttpRequest in all of the code.
recent
- Matador: The Obvious MVC Framework for Node
- Sandboxing JavaScript
- Crouching Ender, hidden command
- Ender.js - The open submodule library
- Qwery - The Tiny Selector Engine
- Klass
- Smallest DOMReady code, ever.
- $script.js - Another JavaScript loader
- About that slowness on Twitter...
- Autocomplete Fuzzy Matching
- JavaScript Cache Provider
- JavaScript Animate
- Asynchronous method queue chaining in JavaScript
- Something changed
- Unofficial Twitter Widget Documentation
i am dustin diaz

