5 ms·
WebGL + Node.js + WebSockets = A Web Technology Perfect Storm
- dshankar 16y agohttp://labs.travisglines.com/ http://labs.travisglines.com/ Very cool demo built by Travis, 3D WebGL chat
- bad_user 16y agoOn the latest version of Chrome / Ubuntu Linux, doesn't work for me.
- btmorex 16y agoWorks for me on the same (64 bit though). That said, there's horrible tearing and it's also really slow when you are near another box and looking at it.
- krat0sprakhar 16y agoWindows XP/ Latest google chrome/ Firefox 4.0 .... Doesn't work for me either.
- mcantelon 16y agoDid you run Chrome with "–enable-webg" flags set (don't know if they are default on Ubuntu/Linux?
- nkassis 16y agoThat should no longer be required. Some cards are blacklisted due to older drivers. Try updating your drivers to the lastest ones from NVIDIA or ATI. If that doesn't --ignore-gpu-blacklist might work but if your card is blacklisted it might crash your browser.
- travisglines 16y agoShould now fall back to canvas rendering when webgl isn't supported.
- JoshCole 16y agoClose your browser. Open the console. Open your browser with: google-chrome --enable-webgl --ignore-gpu-blacklist
- drdaeman 16y agoThis does not work on Chromium 12.0.712.0 (79102) on Ubuntu 10.10. Everything just silently fails with "Error creating WebGL context." in JS console.
- JoshCole 16y agoI'm not really sure what is wrong, but it might be that you lack OpenGL libraries. You might want to check out this page: http://learningwebgl.com/blog/?p=11 http://learningwebgl.com/blog/?p=11 I figure I might as well let you know what you're missing. The guy coded up a 3D world in which you walked around as a square with text floating above your head. It reminded me of World of Warcraft and other MMOs, despite its graphics being far below those of Minecraft.
- nkassis 16y agoYeah I tend to agree that the in the last year and half web technologies have exploded in capabilities. And looking at what was traditionally only possible on the desktop, that category is slowly starting to dwindle. Part of my job has been to remake visualization software (for brain imaging research) on the web and aside from some really heavy stuff, WebGL has served me well. Javascript engines are getting so fast, I haven't had problem computation heavy tasks that much. Most of the time it's my code that's shitty. Now my most limiting factor is the damn slow upload speeds I get in canada. If only I could get 2-3 Mbps up, I could do some great stuff.
- lux 16y agoThat demo is good fun!
- wh-uws 16y agoGreat demo but you should have a warning because of that one color shifting block in the middle http://webaim.org/articles/seizure/ http://webaim.org/articles/seizure/ or make it not do that
- travisglines 16y agoI should make people spawn in random places instead off all at the same spot to change that (what you're seeing is like 100 overlapped blocks).
- wh-uws 16y agojust recognized that. But yeah do that, to avoid that affect
- sthatipamala 16y agoWhat is the purpose of the large black Kaabah structure in the middle?
- travisglines 16y agoIt can be really hard to get your bearings sometimes if things are all the same shape/size, especially if there isn't many people in the app. It needed a central location or gathering point so I figured why not throw a giant obelisk thingy in there? Its fun watching what people say about it. They want to know why its there, why its black and if its real.
- demallien 16y agoI was just disappointed that the ratios don't appear to be 1:4:9
- jessedhillon 16y agoOne of these is not like the others: node.js is a nice, progressive step forward, not a leap that is discontinuous with what preceded it like WebGL and WebSockets. And certainly, node.js did not enable this chat example to happen -- not in the same way that WebGL or WebSockets did. <rant>I am getting a little tired with the node.js cheerleading on HN. I've tried it and I don't see it as a huge leap forward from what can be done with Twisted + Python, or Go, or many other solutions. The major drawback is that you're writing in Javascript -- and maybe I have been doing something wrong, but any sufficiently complex JS app tends towards callback spaghetti, in my experience. (And I do like writing JS)</rant>
- deleted 16y ago[deleted]
- jessedhillon 16y ago> You could have done with AJAX what WebSockets does If you consider long-polling (the nearest approximation you can do with AJAX) the same as true bi-directional communication.
- deleted 16y ago[deleted]
- jessedhillon 16y agoPlease show me how a server can send two consecutive messages to a long-polling client without requiring the client to make a request between the receipt of message 1 and message 2.
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- 16y ago
- mcantelon 16y agoI love the demo. Reminds me of Swarmation... people dropped into a new world there they have to figure out the rules and how to interact.
- c00p3r 16y agoWhy node.js?
- daveelkan 16y agoI love the demo for it's thought provoking stab in the brain. I love three.js and can't wait to tie it into my own app. re: WebGL games. The clients will all be "open source" (as they're javascript). What effect do you all think that'll have on the future web-based gaming industry?
- anty 16y agoThe most obvious problem is probably that it's way easier to develop bots/cheats for those games. Since I'm currently developing a WebGL game I'm actively searching for ideas to detect that behavior. The only solution I can think of is, to capture any data with timestamp coming from the client and applying some tests to it like "is the client sending more messages than a normal client" or more advanced: sending the input through a statistical filter to detect possible cheating and investigate from there on.
- daveelkan 16y agoSounds bloody hard! It might be an idea to think about the actual mechanics of the game once you've come up with a possible solution so that the game itself doesn't invite cheating behaviour or at least makes it easier to detect. i.e. Making it physically impossible to shoot faster than a specified rate or move too quickly/accurately, etc. Good luck!
- drivebyacct2 16y agoThat was far too amusing. I found it interesting that we grouped on one spot on the monolith. I ventured out away from everyone twice, once apparently with the same person.
- rachelbythebay 16y agoThis turns my laptop into a space heater. Nice, but not the sort of thing I'd want to run for extended periods of time.
- bensummers 16y agoIs there a secure version of WebSockets yet? http://hacks.mozilla.org/2010/12/websockets-disabled-in-firefox-4/ http://hacks.mozilla.org/2010/12/websockets-disabled-in-fire...
- wmf 16y agoYes: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06 http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketproto... Hopefully it will be re-enabled in Firefox 5.
- kaib 16y agoWebSockets are really cool but we found the browser implementations unstable enough that we switched back to XHR for Tinkercad. Especially since the secure implementations were super shaky and we run all our traffic over SSL. We also use Go and not Node.js for the backend so the only thing qualifying us for this perfect storm is WebGL.. :-)
- deleted 16y ago[deleted]
- pauldix 16y agoTotally agree with this. We were using WebSockets initially and it worked great in Chrome and not too well everywhere else. We got the exact same user experience/effect by switching over to XHR with a fairly frequent polling interval. It's much more reliable and we found it easier to program, test, and debug.
- MatthewPhillips 16y agoI'd love to see a blog about your experience with using Go as your web server. Did you use the standard library, Web.go, or something else? There have only been a few deploy production web apps with Go so far, so the knowledge needs to spread.
- kaib 16y agoFor Tinkercad the http server is just a relatively simple transport layer, the magic happens with how the computation is distributed in the cluster. We'll blog about it once things settle down a bit, at this point we are just trying to soldier ahead with the beta. :-)
- msy 16y agoThis is awesome but it does seem a touch depressing we've taken 15 years to incompletely replicate VRML. In the bleeding edge of one browser engine.
- Fester 16y agoHow can you compare OpenGL with XML?
- Aetius 16y ago<trivial app> in <less than 100LOC> with <new tech>. Old meme is old! Writing a chat app is one thing. Writing a node.js 3D MMO is quite another.