I loaded it in Firefox 3.6.13 (on a 64 bit quad core desktop with 6G RAM running Windows 7 Ultimate) and my CPU usage went from 1% to 25%. Closed it and usage dropped to 1% again. Loaded it in Chrome and there was no appreciable increase in usage. WTF?
I don't know what could cause that but i'm suspecting that hardware acceleration has a lot to do with it. It seems that javascript is one of the things that is fully output with software only. If there was hardware acceleration then it would be blazing fast.
It's like trying to render out a 3d game with software (ie. CPU only). It doesn't matter what computer you use, it's going to get crushed trying to spit out those polygons. But on hardware acceleration it's all offloaded onto the GPU which is specially designed to handle just such things, which is how we enjoy things like that these days.
I was forced to register because of this thread and some comments in it. The Chrome fanboys here are quite ridiculous.
Chrome does not have hardware-accelerated javascript. Hardware-accelerated javascript does not exist. You are mistaking it with WebGL which is present in Safari, Firefox (3 and 4) and Chrome. WebGL has nothing to do with javascript, it is a hardware accelerated <canvas> element (HTML5). Chrome has barely any more hardware acceleration than Microsoft Powerpoint.
Furthermore, the Christmas tree is not rendered with polygons, it is rendered with sprites. It says so right on the front page.
Yeah, thanks for the comment. I know that you can hardware-accelerate sprites by turning them into a textured polygon. Hardware accelerated sprites seem to be both common and rare. The only example I can think of is the mouse pointer.
It's just that usually when you see a game or something that uses sprites, it's not 3D accelerated. Even more so the older it is.
Perhaps someone can write a WebGL canvas version of this toy. It'll probably be faster >_>
Actually, the vast majority of modern 2d games are hardware-accelerated. Software rendering is long since dead. I'd say you've got a 95%+ chance of any 2d game in the last five years being hardware-accelerated.
The vast majority of what you think are modern 2D games are not 2D. They are rendered in a 3D environment with a fixed camera perspective using 3D textured polygons (again, not sprites); not because it's easier to do it that way but because it's much, much faster. The rest of them use non-hardware accelerated java or non-hardware accelerated flash. Which use sprites. Which use the CPU.
So what exactly is the difference between a 2D game and a game "rendered in a 3D environment with a fixed camera perspective using 3D textured polygons"?
If it looks like a duck and quacks like a duck, it's a duck. I'd call that a 2D game.
At this point, I suspect you're just being deliberately dense, but to help other redditors who might be confused:
It's a 3D game if it uses 3D rendering APIs such as Direct3D (a part of DirectX) or OpenGL and the accelerated 3D rendering pathways in the GPU for its rendering engine.
Real 2D games usually are stuff like solitaire and Linux games that use GTK and QT.
42
u/ImTheGuyWithTheGun Dec 20 '10 edited Dec 20 '10
Amazing how much smoother this runs in Chrome compared to Firefox. And IE8 - forget about it.
EDIT: Safari 5 seems even worse than Firefox. My system is a core-i5 w/ 6GB on Win7 - should be plenty of horsepower.