Sponsored by Backblaze
Backblaze: A Guardian Angel for Your Hard Drive view!
backblaze.com - Find out how to start backing up your data online in a minute flat.
203 Comments
- Lorddias, on 09/17/2009, -2/+175Only 5 fps in firefox :(
- 8bitflu, on 09/17/2009, -1/+121But can it run Contra?
- the8thbit, on 09/17/2009, -4/+82Megaman 2
- Jektal, on 09/17/2009, -0/+75Totally worth the $600 upgrade.
- highdef, on 09/17/2009, -1/+72Runs at .26fps on the iPhone 3G. :(
- peestandingup, on 09/17/2009, -4/+74But but, the internets told me its the bestest.
- kinseyincanada, on 09/18/2009, -2/+69Crysis
- LightningBoltU, on 09/17/2009, -2/+6510 fps in firefox
60 fps in chrome.
Yeah...chrome seems to be slightly better. Also the controlls in Mario 1 is floaty as *****. - morninglorii, on 09/17/2009, -1/+54And I will respond with the fact that integer addition in JavaScript translates to over 100 processor instructions (as opposed to 1 in C, C++, and even Java).
- LightningBoltU, on 09/17/2009, -0/+51Metroid
- swicken, on 09/17/2009, -1/+48Your go to example will be games from the late 80s rendering fast?
You might want to reconsider that.
Javascript IS slow. It's useful, it's just slow. - moocow1452, on 09/17/2009, -1/+45Yes, yes it can.
- moocow1452, on 09/17/2009, -1/+45Kirby's Adventure too. If it can run that, it can do anything.
- bfirsh, on 09/17/2009, -1/+44If you want any games added, reply to this with one game per comment. Most dugg games get added! :)
- moocow1452, on 09/17/2009, -2/+44Should run .39fps on 3GS if the math works out.
- dshigure, on 09/17/2009, -2/+42Battletoads
- Jonatan10, on 09/17/2009, -1/+37yeah i know i was like WTF? really? only 5 fps then i switch to chrome and its running super mario bros at an avg of 35
the only thing i can say is chrome needs an adblock plugin as soon as it adds that i will switch to chrome its the only thing stopping me - SoreThumb, on 09/17/2009, -6/+39Are you serious? Full speed? Google Chrome? Man, Google Chrome is truly the fastest in Javascript. If you can emulate sound next (do you already?), I will love you.
yeah, though.. you would probably need flash for sound. Good luck. :) - parsap, on 09/17/2009, -9/+40Full speed, 60 FPS emulation in Chrome. This will be my go to example when people claim that JavaScript is slow. :)
- Myztry, on 09/17/2009, -0/+28Try pushing the Turbo button on your 386...
- Jektal, on 09/17/2009, -0/+27The code is built into the ROM, not the emulator.
- inactive, on 09/18/2009, -0/+27Super Mario 3
- richbradshaw, on 09/17/2009, -1/+27This is amazing! Just goes to show the efficiency of Chrome's engine - the difference between Safari 4 and Chrome is literally 6 times.
- mrdirectormx, on 09/17/2009, -3/+28River City Ransom
- Gndoab, on 09/17/2009, -3/+25each browser has its benefits and drawbacks, like everything else in life
- nlight, on 09/18/2009, -0/+22Let me.
JavaScript is not a typical programming language like C or Java. It's a scripting language not meant for writing applications rather writing scripts for other applications (think of it as an API to an underlying app written in a full-blown language). It's not compiled, it's interpreted (for non-developers, that means that the source code is read and interpreted by another program. A stand-alone JavaScript source file is useless without an interpreter, which provides a context for the JavaScript program to live and work in.)
Since the beginning of computing interpreted languages were thought to be slow and unpractical for writing non-trivial applications, because of their relatively high run-time complexity relative to compiled languages which run in the native environment of the CPU. Interpreted languages require a much larger speed-memory trade-off which even in a theoretically perfect environment is a huge slow-down. For example, an algorithm which has O(n) complexity (see Big O Notation in wikipedia for details) could reach O(n^2) or even O(!n) due to the inner workings of the interpreter.
That means that interpreted languages aren't getting any faster and would never match a compiled language in both speed and memory consumption.
In reality, modern computers are pushing the limits on technology, so speed and memory are becoming minor concerns and we have no problem giving a program two or three times the CPU share or memory it needs. Less and less programs are pushing a modern dual-core to its limits, which means that we're slowly reaching a point where we don't really care if a program is written in a compiled or an interpreted language. In both cases it would run fine even if the interpreted version is taking several times more processing power and memory.
On the other hand, emulators have been, for a long time, slow (due to their nature) and painful to run just fast enough so you can't tell the difference. 10 years ago it would have been a joke to write an emulator (even for the old NES) in an interpreted language, because there would have been no computer powerful enough to run it at a decent speed.
The achievement here is not that it's hard to write an emulator in JavaScript, it's the same as writing an emulator in any other language. The achievement is that we have computers powerful enough to run it at full-speed in a browser tab, meaning that many more non-trivial applications can be developed in historically slow, but easier to write in and way more portable languages. We're slowly dropping the concept that interpreted languages are inherently slow and anything more complex would require a super-computer to run. The future holds that in a near moment of time we would completely drop compiled languages (which require that the developer cares about memory management and low-level computing) for newer, interpreted ones (like C# or Python), because they are portable, run on all devices which have a functional interpreter and are much easier to write software in. - moocow1452, on 09/17/2009, -2/+22Bubble Bobble.
- TheKitchenSinkX, on 09/18/2009, -1/+21Excitebike
- densetsu23, on 09/17/2009, -0/+20Have to use Google Chrome to get it up to full speed.
- Atario, on 09/18/2009, -0/+19You think that's impressive? Here's Pac-Man and Space Invaders running in, I kid you not, Excel.
http://www.geocities.jp/nchikada/pac/ - d1ckinabox, on 09/17/2009, -1/+20Proof of concept. Just because you found an efficient way of doing something doesn't mean it's that all research in that field should halt. Trying out new things, even if it doesn't make a better product, creates more innovations than improving an existing design.
- swicken, on 09/17/2009, -2/+20Since you edited your reply I'll add to mine.
I know they are notoriously CPU intensive, but NES emulators are not.
When you look at emulators for say, SNES, there are plenty of effects that happen with textures that start shooting processing requirements through the roof. Transparencies and the like.
When you deal with NES emulators you have a very simple low bit graphical display. There have been emulators for it for a LONG time. I know I've been using them since like, 98, on my 486.
Maybe I should use that as proof that my 486 wasn't slow. - lorddazzer, on 09/17/2009, -0/+18Theoretically possible in HTML5, since we have the "audio" tag. One could technically use javascript to trigger html audio elements to play
- the8thbit, on 09/17/2009, -0/+18JavaScript, you dolt.
- swicken, on 09/17/2009, -2/+20I know what an emulator is, but NES requires practically no processing power.
Rendering was the wrong word, but the principal still stands. - AdHaR, on 09/18/2009, -0/+17you're doing it wrong
- ultmast, on 09/18/2009, -0/+1615" MBP 10.6.1
Safari 4 - 16 FPS
Chromium daily - 62 FPS
I'll be damned. - NotShorty, on 09/18/2009, -0/+16Dude, I got a blazing 1.29fps.
- swicken, on 09/18/2009, -1/+16"However, by your own admission, it is at least as fast as hand optimized ASM on a 486."
Nope, because that would assume I was using all of the 486s power to run the emulator.
As this stands, he's pushing javascript to the limits (it won't even run in most browsers).
PEACE BRO - mpchester, on 09/18/2009, -0/+15FINISH HIM!
- brokun, on 09/18/2009, -1/+15Java
SCRIPT
Nintendo
Entertainment
Sheezy - Jektal, on 09/17/2009, -0/+14Bomberman
- SystemicThought, on 09/18/2009, -1/+14↑ ↑ ↓ ↓ ← → ← → B A Start
- sirbeta, on 09/17/2009, -3/+16Fruitless? I think the satisfaction of knowing you wrote an emulator in Javascript that ran full framerate (albeit only in Chrome) would be the only reward you needed.
- Dacvak, on 09/18/2009, -0/+13I think a lot of people are missing the true achievement of this.
- WDM01, on 09/18/2009, -0/+13Tecmo Super Bowl
- swicken, on 09/17/2009, -0/+13Why does the thumbs up only work once :(
- Jones82, on 09/18/2009, -0/+12JSSNES
- UV0001, on 09/18/2009, -1/+13@bonj
None of those ad blockers can rival Adblock Plus. It's just too far ahead already in block lists and features. ABP is the single most influential reason I still use FF. If other browsers can come up with better Adblockers then I'll switch. - seany187, on 09/17/2009, -0/+12Your missing the point, its coded it full javascript, it doesn't use java or flash, or silverlight, pure javascript.
-
Show 51 - 100 of 211 discussions



What is Digg?