3 ms·
Now we are getting somewhere ;) Graphics are not an issue, physics may be. Still, you would be surprised how fast compiled JS can be. It requires some disciplin
by fridek 15y ago
Now we are getting somewhere ;) Graphics are not an issue, physics may be. Still, you would be surprised how fast compiled JS can be. It requires some discipline but if your code is good, performance is not that bad. And some data structures are actually waaay easier and smaller in JS (e.g. graphs). These are pros and cons of high level language.
By the way, there are also typed arrays which are translated directly to native code and were designed with WebGL in mind. I'd say that garbage collector is now the biggest issue of JS games. But it's improving, don't be skeptic.
EDIT:
Actually, I did a small lecture a week ago, about performance tips. It's probably far from perfect as I don't work on browser engines, but it may give you some hints about making JS performance C++-like.
http://www.smashinglabs.pl/lectures/js-performance/ http://www.smashinglabs.pl/lectures/js-performance/
- hastur 15y agoGraphics is very much an issue. Look at the web demos of the Irrlicht guys: http://www.ambiera.com/copperlicht/demos.html http://www.ambiera.com/copperlicht/demos.html I'd say that's an absolute minimum in terms of sophistication. And yet, some of it barely runs on a modest hardware setting. (Core2duo 2.5GHz, GF 8600GT.) [EDIT: Well, OK, in Chrome it runs OK, but still, these are tiny windows. Full-screen wouldn't be so nice.] Now, imagine that you want to write an MMORPG. You make it just a little prettier than those demos, but more importantly - expand the world and add many more characters. It would bring _any_ gaming rig to a halt. (And yes, I realize that you don't display the whole world at once. But still, you need much more than there is on these demos.) I dzięki za linka, fajne rzeczy na SmashingLabs i AiGameDev. :]
- fridek 15y agoThese demos run perfectly well on my Intel card. There are also interactive music videos like http://www.ro.me/ http://www.ro.me/ or http://lights.elliegoulding.com/ http://lights.elliegoulding.com/ which are running fast enough. OpenGL ES is almost the same as OpenGL, the only feature I've found missing so far was geometry shader. What in my opinion stops graphics from being better is model size that has to be transferred. You wouldn't wait 2 hours for game to load, would you?