

Is WebGL the future? - irrlichthn
http://www.irrlicht3d.org/pivot/entry.php?id=1255

======
danbmil99
I agree with OP. The fact that a native app is 10X or more "better" is simply
dwarfed by the low friction of full immersive 3D casual games right in the
browser.

The question is not "how many polygons can you render?" but rather, "how many
polygons do you _need_ to render to provide the desired experience?"

So it's a threshold question, not a contest where the winner is determined by
benchmarks.

~~~
tjoff
Why should there be less friction to go to a web page rather than install a
game?

I think a more honest comparison (in _theory_ ) would be to compare a site
used to serve music with spotify. For those that use spotify a link that opens
up spotify is probably vastly superior to anything a site can do, that's not
to say that the site itself doesn't have any value. But the act of playing
music is something spotify better at - and that mainly is just because (if you
use spotify) you have your music collection in one place. That's where you go
to play music.

Playing a game locally doesn't have to be more than pressing an hyperlink.
Steam is probably the, currently, best place for this but, I know, relying on
something such as spotify, steam or flash sucks. But there is nothing to say
that we can't have an _open_ android/iOS-market-like place for doing this.
Apple and Microsoft will push their own markets and I'm surprised that the
notion of a third party market hasn't come any longer than steam. I guess
people are just too greedy.

There really shouldn't be _any_ reason for why running it in the browser
should be any better than running it locally. Have sandboxing as an option (or
requirement), similar to what apple does, and go nuts.

I miss the days when running low-level code in an all-purpose browser was
something that was considered _moronic_.

~~~
ehsanu1
_Why should there be less friction to go to a web page rather than install a
game?_

Perhaps there _shouldn't_ be as much friction to install a game as going to a
web page, but you can't deny that installing a game is currently not nearly as
streamlined and easy as clicking a link. Even though it _could_ be, or even
_should_ be. The main issue is that you have to wait to install the full game.
A WebGL game would instead just download the minimum required to play the
first level, and get you started playing the game ASAP.

The other thing though about a game being tied to a link is that it becomes a
part of the web. Others will link directly to the actual game, rather than a
page that lets you download/install the game natively. This ease of sharing is
what makes it really powerful to have an in-browser game. The web is simply
the ultimate form of distribution. It also seems less invasive compared to
installing - you are not making any changes to your computer. Just close the
web page, and it's gone (ignoring cookies/cached files). Whereas a native game
will create all sorts of shortcuts and basically embed itself into your
system. This is more of a perception problem with "installing" in the eyes of
the average consumer.

~~~
tjoff
I agree. But currently WebGL doesn't exist (in practice) either.

And nothing you said has anything to do with WebGL. See android market where
you can install apps from a web page. See Origin, launch games from the
browser. Installing, running an native game doesn't have to be more than
answering "yes" to the question "do you want to play this game?". And I have a
hard time seeing how it should be harder to uninstall than a game utilizing
WebGL and local storage...

Keeping the game sandboxed and basically treating everything that is
downloaded as a cache - no problem.

And streaming content to a native-game isn't exactly rocket science either,
there just haven't been a need for it when you still have this cumbersome
install process that you have today.

Do this and you would get an awesome separation of performance critical low
level code and the web resulting in a vastly reduced attack vector (basically
going from push to pull). As a bonus you would get much better performance.

------
hastur
Definitely not. The performance is pathetic, the feature set is pretty basic.

WebGL is where compiled 3d apps/games were, like, 20 years ago. Yes, I know it
will improve, but so will compiled products. The sheer fact that WebGL is
interpreted and is a poor-man's subset of OpenGL, puts it at permanent
disadvantage.

Of course, you could have some trick allowing for compiled graphics code to be
run within the browser, analogous to the Chrome Native Client, and with all
the DirectX/OpenGL features. But that's no longer WebGL, that's just a smart
trick to run old-school code within the confines of a browser environment. You
might just as well write a stand-alone app.

~~~
gacek
WebGL is not a poor-man's subset of OpenGL, its the same subset that is
supported by most mobile devices (OpenGL ES2.0). What are you missing? Quads?
3D textures? NURBS?

And yes, we know that JS is interpreted and that it's no use for building
anything more than a clock on your webpage, right?

~~~
hastur
Could you write (graphically) Battlefield 3 in WebGL, assuming you'd be able
to compile it to run efficiently?

As for your second question, JS is very useful, I love JS, I write 90% of my
code in JS. But we're talking sophisticated 3d apps here, not whether it's
useful at all.

~~~
fridek
Yes you can. Have you seen Team Fortress 2 in WebGL?

<http://www.youtube.com/watch?v=DQrC5YLKFUY>

<http://www.youtube.com/watch?v=Lmvj6-CFbbA>

JS is not very pleasant to code with, so writing an actual game logic could be
a bit painful, but so is development for PS3 and it's done somehow. It's not a
question of performance, rather about workflow and structures provided by
language.

~~~
ehsanu1
JS has gotchas and some really bad parts, but if you know the language well
and know what you're doing, I think it's quite pleasant actually for many
problems. Have you done much programming with JS, and if so, what was so
unpleasant about it?

Though, I think I've heard pretty much all the complaints against JavaScript,
many of which are addressed by using something like CoffeeScript.

~~~
fridek
I'm using Google Closure to get rid of the bad parts, but still it's not very
good. I did some testing with game AI, graphics and so on - JS is far from
perfect for such things. Maybe it's a lack of tools, maybe of some features I
was used to in C++ or maybe it's that all the books and tutorials are targeted
for C++.

It doesn't really matter, browser games are the future and no matter how
complicated it's going to be, somebody will be good enough to write them. We
already passed "demo era" and some games are really good, like
[https://chrome.google.com/webstore/detail/bhoaojooagiaaiidln...](https://chrome.google.com/webstore/detail/bhoaojooagiaaiidlnfhkkafjpbbnnno)

------
Geee
Future of what? I don't know any use case where I would want 3D graphics on my
web pages.

Running games in a browser? That's a stupid idea to begin with. Browser should
be just a document reader, and games are not documents.

Why are we reinventing wheel again? Games used to be crappy, and now we want
crappy games again? Why is it so amazing if something runs in a browser? Why
don't we think about other solutions like making native apps more web-like?

~~~
gcp
_Why is it so amazing if something runs in a browser? Why don't we think about
other solutions like making native apps more web-like?_

What's amazing is that something that runs in the browser will run on every
platform where there is a browser (with some proper care of the inevitable
small standard deviations). No such luck with native apps.

~~~
tjoff
Yeah, with native apps you have to run a script that compiles it for all
platforms.

~~~
Klinky
What magic script lets you natively compile OpenGL code for Mac, Linux,
Windows & portable platforms without having to write any platform specific
code?

~~~
tjoff
Who said anything about not having to write any platform specific code?

"with some proper care of the inevitable small standard deviations" Is exactly
what I would say is required to make a game run on different platforms. It of
course depends on what you want to do, but if you limit yourself to the subset
that is the browser there shouldn't be any real problems at all.

