background preloader

Js

Facebook Twitter

Command and Conquer - Tiberian Dawn - HTML5. This is a recreation of the original Command and Conquer RTS game, entirely in HTML5 and JavaScript. The current version includes several levels in the single player campaign and multiplayer support using Node.js. If you are interested in game programming, you can read more about the development of this game and some of my game programming articles on my website. Interested in learning how to write your own RTS game in HTML5?

Check out my book Pro HTML5 Games. Go to the C&C - HTML5 Facebook Page for news, updates and other cool stuff. Check out the Learning Forums to talk about my book, learn game programming, or sign up for Beta releases. If you like this project, you can show your support by donating via Paypal or Flattr using the buttons below. Your donations help me pay for hosting (which I currently pay for out of my own pocket) and for Redbull (to keep me going)...

Thank you for all your support. This game works only on HTML5 compatible browsers. Bugs and Feedback: I need your help. Vapor.js | The World's Smallest & Fastest JavaScript Library. The Difference Between jQuery’s .bind(), .live(), and .delegate() - Alfa Jango Blog. 01 February 2011 The difference between .bind(), .live(), and .delegate() is not always apparent. Having a clear understanding of all the differences, though, will help us write more concise code and prevent bugs from popping up in our interactive applications. The jQuery team have announced in v1.7 a new method for binding events called on. This method combines the functionality of live, bind, and delegate described below, allowing you to specify the binding method based the arguments passed rather than by using different function names.

The basics The DOM tree First, it helps to visualize the DOM tree of an HTML document. Event bubbling (aka event propagation) When we click a link, it fires the click event on the link element, which triggers any functions we bound to that element's click event. $('a').bind('click', function() { alert("That tickles!

") So a click will trigger the alert. In the context of manipulating the DOM, document is the root node. .bind() .live() .delegate() Speed. JavaScript dependency management and concatenation: Sprockets. JSMIN, The JavaScript Minifier. The JavaScript Minifier Douglas Crockfordwww.crockford.com JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation. What JSMin Does JSMin is a filter that omits or modifies some characters. JSMin first replaces carriage returns ('\r') with linefeeds ('\n').

It omits spaces except when a space is preceded and followed by a non-ASCII character or by an ASCII letter or digit, or by one of these characters: It is more conservative in omitting linefeeds, because linefeeds are sometimes treated as semicolons. And if it follows a non-ASCII character or an ASCII letter or digit or one of these characters: No other characters are omitted or modified. JSMin knows to not modify quoted strings and regular expression literals.

JSMin does not obfuscate, but it does uglify.