JS Super Mario Brothers

Super Mario Brothers JS

Here’s Super Mario brothers rewritten in JavaScript. It’s remarkably well done, even the physics closely match that of the original game. The only thing I noticed was a slight lag in Firefox 3.0.5 which I suspect might be due to the speed of the events rather than the actual game.

There have been several attempts to port the classic game to the web including this one which is fairly complete for 14kB of JavaScript and uses <canvas/>, though I think the one above is more like the original game.

Google Gears For Safari And Other Browser Addons

Google today released a beta of Google Gears for Safari. Still no iPhone support, but that’s not likely due to Apple’s rather restrictive licensing rather than technical reasons. It’s good to see them keeping true to their original efforts to support all platforms equally. That’s been a gripe of mine recently.

With Google creating Gears for all browsers, Apple creating QuickTime on all browsers, Mozilla creating <canvas /> support for IE, Microsoft creating Silverlight and Windows Media Player for all browsers (though Mac users are through Flip4Mac) it creates an interesting web of technologies. Everyone is starting to fill holes on other platforms. The downside to this is that users need to download multiple components for a good web experience. That is still a major concern for the future of the web. It’s not all about licensing.

Rebreaking The Web

It’s happening again. Once upon a time, browser vendors started adding their own features without consulting with each other and agreeing upon standards. What they created was a giant mess of inconsistencies across browsers and platforms that is still in effect today. Ask any web developer and they can tell you of the pains that they have suffered trying to make seemingly trivial things work everywhere consistently. It’s no easy task. Before IE 7, even an ajax required something along the lines of:

var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, …
    httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
    httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}

That’s right, IE 6 didn’t support the native xmlHttpRequest object (more here). This is just one of many examples in JavaScript and CSS. document.all anyone?

The end result of this problem became to be known as the “Web Standards” movement. Simply put it’s an idea that code should follow a standard that results in consistent output across all browsers on various platforms. Write once, run anywhere. While it’s taken years for this to manifest, it’s slowly become a reality. Firefox, Safari, Opera have fairly consistent rendering (at least in comparison to the mess of just a few years ago on the browser scene. IE 6 was fairly poor in terms of modern web development, but IE 7 made progress, and IE 8 is Microsoft’s greatest effort to date to bring their browser up to speed.

Continue reading