JSNES JavaScript NES emulator

Ben Firshman wrote a rather impressive NES emulator. There are already quite a few NES emulators out there already this one impressive is because it’s written in pure JavaScript.

Yet another application of “Atwood’s Law“:

Any application that can be written in JavaScript, will eventually be written in JavaScript.

I should note that I mentioned back in January how someone ported Super Mario brothers to JavaScript. JSNES is different as it is actually emulating and reading ROM’s (looks like they are hex’d), rather than just replicating the game.

Currently it runs in all modern browsers, but only Chrome’s <canvas/> performs well enough at this point to really be playable. With WebGL coming to Firefox and WebKit we’ll hopefully see a lot more of this kind of stuff in the future.

Super Mario Gravity

The other day I mentioned there is a JS implementation of Super Mario brothers. I also mentioned that the physics feel about right compared to the real game.

Apparently someone did some analysis on the series and correctly concluded that the gravity physics are totally not realistic (shocking). The real nuggets are that he can jump 5 times his body height and should be unconscious on the way down since his falls achieve 9.31 g, which should render a human unconscious without a G-Suit. Maybe those are special overalls after all.

Science!

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.