
WebGL Dungeon - DanielRibeiro
http://www.ambiera.at/coppercube/demos/version3/dynamiclight/embedwebgl.html
======
CJefferson
I hate to be negative, but I am starting to get tired of WebGL demos appearing
here, and elsewhere.

I think it is now clearly demonstrated that WebGL is indeed a binding of
OpenGL to javascript, for web-browsers. Therefore it is unsuprising, and now
clear, that any openGL which isn't too CPU-intensive can be mapped to
javascript+webGL without too much difficulty.

Come back when someone has either something impressive you couldn't do
offline, or a game of high quality. While I'm sure people have fun porting
off-line demos to javascript, I've seen enough now.

~~~
SolarNet
I agree, at this point, unless it is a demo of a game engine, there isn't much
point of posting it.

Additionally, the lighting algorithm in this demo is horrid, you could never
make a dungeon crawler with any sort of realistic lighting the way it is setup
now. Notice how the light goes through walls if the textured face is facing
the light, but is dark if it is facing away from the light. (Meaning they it
isn't a more complicated algorithm for some sort of radiant lighting)

------
cpfohl
Wow, that's crazy amazing. I've really enjoyed some of the WebGL stuff I've
seen, I only wish there was a more natural way to control the camera
angle...The click and Drag thing drives me nuts.

~~~
Pewpewarrows
Unfortunately there's no easy way to do that with the current state of
JavaScript and WebGL. If you try to just translate raw mouse events into it
you end up with lots of bugs related to the cursor reaching edges of the
rendered area, browser window, or desktop in general.

The ideal solution in my opinion is to just offer mouse capturing as a user-
enabled permission on page load from a domain (kind of how geolocation works
now). The user would see a bar near the top of the browser asking if they want
to give control of their mouse to the website, with the option to always
break-out of that control with some key (such as ESC).

~~~
elisee
Chrome devs are working on such an API.

\- Bug tracker: <http://code.google.com/p/chromium/issues/detail?id=72754>

\- Design doc:
[https://sites.google.com/a/chromium.org/dev/developers/desig...](https://sites.google.com/a/chromium.org/dev/developers/design-
documents/mouse-lock)

------
doomlaser
This is not that impressive when you consider that Unreal Engine 3 runs in
Flash 11 now, and Flash 11 will probably beat WebGL in terms of audience
adoption (if it hasn't already)

~~~
lftl
> and Flash 11 will probably beat WebGL in terms of audience adoption (if it
> hasn't already)

I suppose you could be defining audience to only be talking about the desktop,
and that's probably legitimate when talking about the next 1-2 years. But if
you're talking about longer term then you have to consider the tablet/mobile
market as figuring into a large portion of the audience. Neither flash nor
WebGL is currently really viable there, but I'd definitely bet that WebGL has
a better shot at making inroads than Flash.

~~~
doomlaser
Flash already runs on a host of Android devices as a web plugin. WebGL isn't
available on any mobile browsers yet afaik.

~~~
lftl
It runs pretty horribly though. I like that I have the option of using Flash
if I really need it, but it's never anything close to a pleasant experience.
In it's current form I wouldn't consider building anything in Flash if I
wanted to target mobile devices in any way.

~~~
doomlaser
HTML5's Canvas element runs just a poorly on mobile devices, if not actually
worse.

~~~
lftl
No disagreement there from me. I think the core difference is I have no faith
whatsoever in Adobe ever supporting iOS/Android/Whatever other popular mobile
platforms may arrive adequately with Flash. They've barely managed it well on
the desktop (Flash doesn't work _well_ on OS X or Linux). However, I think
there's a fair chance that at least Apple and Google might end up with good
Canvas or WebGL implementations on some mobile devices. Further if the
platform does gain enough momentum, it's open enough that anyone else
interested in building a mobile platform will be able to build decent support
into devices on their own without having to rely on Adobe (or any other 3rd
party) to get their act together.

------
filiwickers
Tried viewing this in Chrome but it didn't work. The website says it should be
supported. My version is up to date. Any tips?

Firefox worked.

~~~
strmpnk
It works for me using Chrome beta v15 on OS X Lion.

