Today’s award for the most unlikely, probably pointless, but simply stunning use of JavaScript goes to Ben Firshman and his Nintendo Entertainment System emulator, JSNES.
The emulator is port of the Java-based vNES project. It uses the HTML canvas element for screen rendering (sorry Internet Explorer users) although sound is not supported yet.
There are 17 working games to try. Most will run in Firefox 3.5 or Safari 4, but neither browser offers a playable gaming experience. You’ll be lucky to achieve 10 frames per second on the highest-specification liquid-nitrogen-cooled ninja PC.
The real revelation, however, is Google Chrome — it runs the emulator at full speed (50-60 fps) on a modest PC. Google’s canvas performance optimization appears to be out-pacing the competition by a considerable margin. Both Mozilla and WebKit have raised bugs to investigate why there is such a noticeable speed difference.
Although JSNES is little more than an interesting experiment, it illustrates what can be achieved with modern JavaScript engines, some ingenuity, and lots of caffeine. Ben Firshman — you are a genius. My only question is … why?!!
See also: SitePoint’s Exclusive Interview With Ben Firshman, Creator of JSNES
Related posts:
- Exclusive Interview With Ben Firshman, Creator of JSNES Craig interviews Ben Firshman, developer of the JavaScript-based NES emulator...
- Opera Fights Back: Announces Next Gen JavaScript Engine At one time, Opera had the fastest ECMAScript / JavaScript...
- Google Closure: How not to write JavaScript What if Google released a JavaScript library that sucked, and...
- Implementing Event Latency in JavaScript Craig provides some useful JavaScript code to slow down event...
- Google Chrome Frame: the Technical Details Google's Chrome Frame announcement has been surrounded by hype, fabrication,...







I believe the answer is, “because he can”. Very, very cool!
September 27th, 2009 at 4:42 am
Why? Why not?
September 27th, 2009 at 5:49 am
“My only question is … why?!!”
Simple.. It’s nostalgic. I grew up on that stuff. Brings back good memories. :)
September 27th, 2009 at 9:05 am
Maybe Craig is too old to understand why ;)
Anyone that can hum the music to the original super mario brothers (and occasionally does out of the blue) understands “why”.
September 27th, 2009 at 1:49 pm
I tried the Javascript NES emulator, with Chrome 4 on Ubuntu, and it works great!
Anyone interested in checking out HTML5 sites & demos can try some of these:
http://www.youtube.com/html5
http://demo.sproutcore.com/video/
http://www.rgraph.net/
http://html5gallery.com/
http://tinyvid.tv/
I’m not sure, if the people who installed Google Chrome Frame need to prefix the URLs with “cf:” or not.
This stuff is really cool!
September 27th, 2009 at 6:40 pm
Nostalgia plus technical challenge, i guess.
Now we have a new JavaScript and Canvas performance benchmark. :D
September 27th, 2009 at 10:15 pm
Thats cool.
Gchrome beating even firefox
September 28th, 2009 at 6:06 am
Very cool.
I can’t figure out what to do in Mario Bros! Once he gets to the top, what’s he supposed to do? There seems to be nothing to do except avoid the tortoises!
September 28th, 2009 at 7:33 am
why?
maybe he get bored with c++, or csharp, or java
maybe he loves javascript
maybe he hates IE!!
September 28th, 2009 at 8:28 am
Am I missing something? What are the controls
September 28th, 2009 at 6:55 pm
I can’t seem to play it. The controls aren’t doing anything in google chrome (or firefox for that matter). It’s like the game is in demo mode (like the computers playing).
September 28th, 2009 at 7:26 pm
Cool, it runs perfect.
September 29th, 2009 at 12:14 pm
Good work!
September 30th, 2009 at 9:03 am
Am I the only one thinking we need a “Doom” port to test browser performance? :D
October 9th, 2009 at 6:16 am
I can now help answer “why” Ben wrote it…
SitePoint’s Exclusive Interview With Ben Firshman, Creator of JSNES
October 16th, 2009 at 3:46 am