

Show HN: Lets Make a 3D Game: Make It Fullscreen - jerome_etienne
http://learningthreejs.com/blog/2011/11/17/lets-make-a-3d-game-make-it-fullscreen/

======
dkersten
Before I start my rant, let me say well done! I enjoyed the game and liked the
deomonstration of fullscreen 3D browser games.

The game itself is pretty cool and demonstrates nicely the possibilities of
browser-based gaming, though I get the impression that Javascript and WebGL
aren't really going to displace native games anytime soon.

It runs at a very acceptable framerate of ~35 fps on my computer. This sounds
good until you realise that I can run Skyrim on medium-to-high settings and
get a similar (and sometimes higher) framerate. This game only uses 30 to 40%
of my gpu, but the graphics are very simple. Skyrim uses 20 to 100% depending
on the scene complexity, but even its simplest (20% cpu usage) scenes are more
complex than this one. I've also tried lots of other WebGL demos and the
common theme was usually low framerate but with low GPU usage, so my
conclusion is that its not WebGL thats at fault , but Javascript - that is,
the GPU renders what its given blazingly fast, and its the JS game logic and
physics that caps the performance. I imagine most internet users won't have an
expensive gaming graphics card like I do too, so my performance is probably
even at the higher end of the spectrum, rather than representative...

I've played witht the ImpactJS game engine (not webgl, but 2d canvas drawing)
and the performance analysis tool shows that rendering is always a tiny tiny
portion of the frame time. Logic isn't all that much more (but I never had
anything terribly complex either) and "system overhead" (stuff like garbage
collection) was where most of the frames processing time was spent. I imagine
that JS is also forced to give up cpu time more often than a native game would
be - to keep the browser responsive.

tl;dr - cool game, but I don't believe Javascript performance is even close to
really taking on native games. Yes, its improving, but it will be a few more
years at best before its really good enough to make a difference.

