Live data from Hacker News

Why you should use WebGL

codeflow.org

21–30 of 38 posts

Re: Why you should use WebGL

#21
post #15

A grain of salt, cannot fault the article except it skimmed over a couple of areas. Keep these things in mind, especially if 3D graphics is something new for you: Why you shouldn't use WebGL * Performance: This is the big one. In 3D graphics and in particular games performance, both execution speed and memory usage, is everything. You can do some great stuff in WebGL but fitting lots of complex stuff (physics, AI, mo…

Well you don't need a lot of CPU for doing AI and motion. In modern games, game logic like this usually takes not even 1% of the CPU time. And more complex stuff than 90ies demo scene stuff is possible easily. There are lots of sophisticated 3d libraries to choose from, take a look at the demos of CopperLicht for example: http://www.ambiera.com/copperlicht/ But you are right: Physics is a major bottleneck. Fortunatel…

Well you don't need a lot of CPU for doing AI and motion.

Motion means collision detection and keeping the right data structures up to date. AI means things like path finding. Both sets of problems require lots of loops with lots of maths.

I've looked at Copperlicht and it is nice (looks like you work on it?), but still very limited when you compare it to the non-WebGL competition. The demos are all small largely static scenes that can be loaded onto the card and left untouched in memory.

I don't mean to say that WebGL isn't usable or that people shouldn't use it. I was providing a grain of salt to what was a very good write up.

btw. I like the doco for Copperlicht, nice and accessible and the octtree implementation impressed me when I was reviewing Copperlicht last weekend.

Re: Why you should use WebGL

#22
post #15

A grain of salt, cannot fault the article except it skimmed over a couple of areas. Keep these things in mind, especially if 3D graphics is something new for you: Why you shouldn't use WebGL * Performance: This is the big one. In 3D graphics and in particular games performance, both execution speed and memory usage, is everything. You can do some great stuff in WebGL but fitting lots of complex stuff (physics, AI, mo…

A lot of people are underestimating what this stuff can be used for, IMO. It goes far beyond traditional games. I myself have been doing a lot of work with WebGL-driven articles [1]. With nothing more than nginx and Jekyll, I have an incredibly efficient pipeline to get 3D math lectures out to thousands with less than 20KB of JS per graph and 200KB of shared libraries. I can edit the content anytime I want and rsync an update. I got a 100k hits on that article last month, my little linode didn't break a sweat.

I've also been working on setting up GLSL based computational chains easily, allowing me to implement a fluid dynamics solver [2] with a dozen lines of JS and a hundred lines of GLSL [3].

It's not as demoscene-like as it seems, I don't have to work very hard to get it to run well, as JS is rarely the bottleneck.

Dedicated game engines will always be the realm of optimized native code, but there is an entire field outside that of rich 3D content. Between GLSL, Web Workers and fast JITs, there is a lot that can be done here. With JS, you not only get a platform you can deploy easily, but you get live access to a fully introspective VM at the same time. I expose all my JS to the console, and do most of my prototyping in there. All for free.

It's also the only platform that has a chance to be available universally, from pockets to desks to living rooms. I know I'd much rather restrict myself to techniques that are a couple years old, if it means it actually runs well on modest hardware—which a lot of demoscene stuff does not do.

[1] http://acko.net/blog/how-to-fold-a-julia-fractal

[2] http://acko.net/files/never-seen-the-sky/git/

[3] https://github.com/unconed/NeverSeenTheSky/blob/master/js/fl...

Re: Why you should use WebGL

#23
post #21

Earlier quoted context omitted.

Well you don't need a lot of CPU for doing AI and motion. In modern games, game logic like this usually takes not even 1% of the CPU time. And more complex stuff than 90ies demo scene stuff is possible easily. There are lots of sophisticated 3d libraries to choose from, take a look at the demos of CopperLicht for example: http://www.ambiera.com/copperlicht/ But you are right: Physics is a major bottleneck. Fortunatel…

Well you don't need a lot of CPU for doing AI and motion. Motion means collision detection and keeping the right data structures up to date. AI means things like path finding. Both sets of problems require lots of loops with lots of maths. I've looked at Copperlicht and it is nice (looks like you work on it?), but still very limited when you compare it to the non-WebGL competition. The demos are all small largely sta…

>Motion means collision detection AI means things like path finding.

There are many game types/genres which don't require collision detection or realtime AI.

Re: Why you should use WebGL

#24
post #22
post #15

A grain of salt, cannot fault the article except it skimmed over a couple of areas. Keep these things in mind, especially if 3D graphics is something new for you: Why you shouldn't use WebGL * Performance: This is the big one. In 3D graphics and in particular games performance, both execution speed and memory usage, is everything. You can do some great stuff in WebGL but fitting lots of complex stuff (physics, AI, mo…

A lot of people are underestimating what this stuff can be used for, IMO. It goes far beyond traditional games. I myself have been doing a lot of work with WebGL-driven articles [1]. With nothing more than nginx and Jekyll, I have an incredibly efficient pipeline to get 3D math lectures out to thousands with less than 20KB of JS per graph and 200KB of shared libraries. I can edit the content anytime I want and rsync…

Exactly, you need to understand the trade offs, which I don't feel the article touched on.

Re: Why you should use WebGL

#25
post #23
post #21

Earlier quoted context omitted.

Well you don't need a lot of CPU for doing AI and motion. Motion means collision detection and keeping the right data structures up to date. AI means things like path finding. Both sets of problems require lots of loops with lots of maths. I've looked at Copperlicht and it is nice (looks like you work on it?), but still very limited when you compare it to the non-WebGL competition. The demos are all small largely sta…

>Motion means collision detection AI means things like path finding. There are many game types/genres which don't require collision detection or realtime AI.

Yup but people need to be aware of the limitations of the platform, something the article was very light on.

Re: Why you should use WebGL

#26
post #24
post #22

Earlier quoted context omitted.

A lot of people are underestimating what this stuff can be used for, IMO. It goes far beyond traditional games. I myself have been doing a lot of work with WebGL-driven articles [1]. With nothing more than nginx and Jekyll, I have an incredibly efficient pipeline to get 3D math lectures out to thousands with less than 20KB of JS per graph and 200KB of shared libraries. I can edit the content anytime I want and rsync…

Exactly, you need to understand the trade offs, which I don't feel the article touched on.

I did say that I won't talk about the gotchas in this article up front though :)

It's already a wall of text, I think it's better to pick one topic and limit its scope for one post.

Re: Why you should use WebGL

#27

Total lack of IE support is a bit...problematic.

I have no problem dropping IE support for app-like experiences. Honestly, people on IE are mostly at work or don't know much about technology and are less likely to play games. I don't see how asking the user to install another browser is bad compared to having to install steam or be limited to your flavor of mobile OS or console.

> "people on IE are mostly at work or don't know much about technology..."

IE9 is pretty solid in many ways. Runs javascript faster than Firefox. Jquery animated interface effects and so on run noticeably smoother and quicker in IE9. My main browser is Firefox and I like it, but I've noticed IE9's faster performance when testing.

Re: Why you should use WebGL

#28
post #15

A grain of salt, cannot fault the article except it skimmed over a couple of areas. Keep these things in mind, especially if 3D graphics is something new for you: Why you shouldn't use WebGL * Performance: This is the big one. In 3D graphics and in particular games performance, both execution speed and memory usage, is everything. You can do some great stuff in WebGL but fitting lots of complex stuff (physics, AI, mo…

Performance: How fast is fast enough? We may not be able to make Battlefield 3 run in a browser yet, but there is a whole host of games that are possible, and are still a step-change in graphics compared to the 2D flash games.

We've got demos that are full rigid body simulations[1], 3rd-person shooters[2], fun little arcade games[3] and more[4]

Libraries: Three.js is great, but it's not a game engine. For games, the tool chain does exist though! At PlayCanvas[5] we've got a engine, visual editor, asset management, and publishing support. No WebGL knowledge required :-)

And because we're doing everything hosted in the browser, it gives us some cool bonuses, like real-time collaboration, cross-platform/device support, access from any browser.

[1] http://apps.playcanvas.com/will/ammo/vehicle

[2] http://apps.playcanvas.com/playcanvas/scifi/latest

[3] http://apps.playcanvas.com/playcanvas/apocalypse/latest

[4] http://playcanvas.com/demos

[5] http://playcanvas.com

Re: Why you should use WebGL

#30
Am I missing something here? I've been trying to use WebGL for weeks now, based on [unconed's MathBox articles][uc]. For the life of me, I [cannot get this to work][my] on any laptop that uses the Intel HD 4000 graphics card (my samsung series 9) ... which includes nearly all the macbooks, no less. If that pretty common graphics card isn't supported, how can anyone develop WebGL libraries, let alone expect others to use them. Perhaps this will be patched in some (linux?) driver update in the future, but until then....

[uc]: http://news.ycombinator.com/item?id=5158989 [my]: http://news.ycombinator.com/item?id=5088918

EDIT: I clearly don't understand HN's subset of Markdown, either...

Post reply on HN