Blue Lava is a small demo showing the node-webgl library we wrote the first half of node knockout. We showed up at 5pm sharp Friday evening and coded till about 5pm Saturday night till we had enough of the webGL API implemented in nodeJS to render a slightly modified version of “Traveling Wavefronts” by “Felix Woitzel”.
The entry is not the visualization itself, but the library we wrote that allows it to run on node directly without the help of a browser. We specifically targeted the HP TouchPad, but it runs on other platforms as well.
The visualization is a fairly simple OpenGL scene with fairly complex GLSL shaders that push most the computation on the GPU. The animation is 100% procedural and rendered in real-time.
You can see a demo here: http://creationix.com/minimason.m4v
Using this library, a developer can create very advanced video games for just about any modern platform and use node to write it.
The library can be found at https://github.com/creationix/node-webgl and will be licensed under MIT as soon as we get a chance to sleep and clean things up after the contest. It’s published to npm under “webgl”. Patches are welcome after the contest to keep this alive and well.
The actual entry is the node bindings to OpenGL which obviously can’t run in the browser. So to make it easier to see something and show that the JavaScript we implemented is in fact webGL, you can run the demo app in your browser if it’s webGL enabled.
Simply go to the website in a webGL enabled browser. (We tested in Chrome) and view the exact code that runs in node also running in your browser.
To get the real deal, You’ll need the hard-to-get HP TouchPad. They are on sale the next while for $99 at various retailers as they get new shipments. I will bring some to the meet and greet on Wednesday for personal demos if desired.
The webgl bindings also are easy to build on Linux if you want to try them out on your machine. See my twitter account for gists I’ve been posting about how to test using desktop node.
If you are lucky enough to have a touchpad, simply follow the link on the website to download the ipk and side-load it to your device. The easiest way is to probably install preware and then simply click on the link in the tablets browser. The next is to install the app via USB with developer mode enabled and either the official SDK or the homebrew quick install app installed on your computer/laptop.
For the nodeJS powered HTTP server for the website and to serve the browser based version of the app, we used the following open-source libraries:
For the actual node powered version of the app, we used and slightly modified both:
And the main component we wrote on-site during the competition and is now free for anyone to use:
Voting is now closed.










































(43)
jimpickI don’t have a touchpad here to test, but this is good stuff! I’ve wished for this to exist, and now it does! :–) So I’m going to give it some high marks. It’s more a library than an app, so I can’t really give it many marks for design though, by the contest criteria. | |||
emckeansaw this in person and was really impressed. | |||
mnshahWorks great in firefox. I didnt notice any significant jump in CPU while running the demo which seems to indicate good use of gpu + webgl which seems to be the intention. | |||
Thank you for pushing the boundaries of where Node is running and what we can do with it. | |||
Gotta admit, hard to grasp, but after seeing some of the possibilities of webgl, could really see the possibilities! | |||
this opens up a lot for game developers! | |||
therazorbladeThe low design scope is for confusing everyone on what this is supposed to be :–), otherwise, well done! | |||
Agreed. We had to change our scope after the webgl bindings taking longer than anticipated. originally we were going to implement webgl in about 6 hours and then spend the rest of the competition of writing a real-time game that spanned mobile devices, laptops, and browsers. About 16 hours in we still didn’t have a single pixel on the screen so we made the decision to just get the blue webgl running on touchpad and call it done.
therazorbladeAdded another utility star after reviewing everything else.
I thought this was pretty cool…and then I saw what WebGL is capable of here and now you have me incredibly excited. | |||
Good to mention that I already seen this demo before the contest somewhere. | |||
You’re probably thinking of http://www.chromeexperiments.com/detail/traveling-wavefronts/?f=webgl
That’s not what my entry is. I simply used the “Traveling Wavefronts” demo to test my webgl implementation. The entry is adding support to node to render webgl without using a browser and to prove it I ran it on the TouchPad (which does NOT have webgl in it’s browser yet)
The definition on the judging page for innovation is “How original is the idea and execution?” If there had already been webgl for node using GLES 2.0 I wouldn’t have taken the time to write this.
No there was not any webgl for node before. But I didn’t think it is an innovation unless I read your reply to @jamesaduncan “ It’s actual OpenGL bindings for node itself. Node is the client and renders to the CPU directly,…”.
Edit: WebGL bindings, cant wait for the how-to-node on this. | |||
Just curious, but why only 3 on innovation? That was the category I was going for and I thought that using node for GPU accelerated desktop and mobile games is something that’s not been done much before.
I marked it three before i made my edit, why? I read this “You’ll need the hard-to-get HP TouchPad. They are on sale the next while for $99” && “Simply go to the website in a webGL enabled browser.” Then I made an edit after reading the code, adding a complement but forgetting to bump the stars.
Thanks for voting! it was fun to finally get this built so I can make desktop games with nodejs that use my machine’s video hardware.
csanzawesome app | |||
Thanks!
Outstanding. Especially since node-webgl now exists. | |||
I’ve wanted to make this for a long time, now it’s finally here.
This is awesome! Would love to see some of this incorporated into games and immersive sites!! | |||
Me too. I’ll probably next make a simple game engine to go along with it. WebGL directly is a royal pain to develop in, but the abilities and performance are awesome.
mattpodwysockiThe effects of what you were able to accomplish here. It’s early to say where this could go, whether it integrates with other inputs, but I’d love to see this keep going. | |||
I’m hoping that some fun games written in node result from this. I’m always thinking of the budding programmer, and game programming is often how people gain a passion for programming. NodeJS is easy and fun, and so it making games, let’s combine those.
mranneyThis is a really unique and hard to understand entry. I like that it makes pretty pictures smoothly animate in my web browser, but the utility of having OpenGL bindings in node still seems a bit low. The demo video is pretty cool. Cross-platform development is tricky. | |||
The utility is to write indie games in a nice scripting language while at the same time leveraging the networking power of nodejs. Imagine peer-to-peer, realtime games using the GPU and network stack to the fullest!
So who is gonna port angry birds and quake to node? Huh? I heard doom 3 is getting open sourced, just sayin… | |||
Indeed, I’d like to see that too. I’m hoping to enable a new indie game developer community around nodejs.
pfinetteNice demo. Interesting tech – not sure if this will be super-relevant for the future as we’ll surely have WebGL on mobile devices soon. | |||
How will mobile devices get webgl soon? Last I heard, it’s looking like it will never make it. Of course, I guess Mozilla has a different perspective with your mobile browser.
Anyway, I’m not just targeting mobile, this works for “native” desktop games too where I’d likely use it most.
Thanks for voting.
Also, just a heads up. I noticed that I got one of the higher scores out of the apps you voted on, but by far the lowest score I got from any judge.
Remember that judges count extra and you’re supposed to curve your scores to provide fair scoring.
Otherwise everyone you vote on gets negatively impacted and doesn’t have a chance to win even though you thought it was one of the better entries.
The other option is to vote for all the top entries and use the same metric on them.
Awesome! I didn’t know that browser can do that! | |||
The webOS browser can’t (not yet at least) I implemented webGL for node and am running it as a PDK app no webOS. It also runs on desktop node and desktop chrome if you have the right video card.
slightlylateThe visualization is beautiful. In terms of completeness, it’s hard to judge, but I do feel as though there could be integration with audio API and other sources of input to help make it more environmental, but that’s not a ding on the app. Also, I love that it’s a Node app and not Yet Another Web Service. Well played! | |||
Thanks!
slightlylateI’m a big fan of having bindings like this for folks who are doing embedded work. Seems like the sort of thing that’s going to be a big shot in the arm for game devs!
For some reason it didn’t work on Chrome here, but in Firefox it looks nice. Great work, I’ll give you guys that. But webOS, really? :) | |||
If you haven’t noticed webOS is now the #2 most popular tablet platform in the world. Besides this code runs on desktop/laptop systems as well. It’s not tied to webOS in any shape or form.
hunedomg rad, thx @creationix! i will probably end up using this. | |||
jamesaduncanNot arguing, but just curious why you gave it a higher completeness score than innovation. I would have given myself the reverse. Thanks for voting though!
jamesaduncanWell, if I’m understanding correctly, you’ve written a library that allows you to render WebGL on the server rather than the client, which is kinda cool, and hence the 4/5 on that – the -1 is mainly because server side rendering isn’t exactly new, but using the same APIs on the server as the client has available is.
Very cool stuff.
It seems that your goal was to duplicate those APIs, which you appear to have done, so it’s complete ;)
Unless I’m missing something – in which case I’ll happily reverse those votes ;)
Ahh, that explains a lot. Perhaps I didn’t explain well, but the main entry, the node-webgl one isn’t a server at all. It’s actual OpenGL bindings for node itself. Node is the client and renders to the CPU directly, and as a bonus, I’ve packaged an existing webgl demo as a webOS PDK app. The version that renders in the browser is a normal webgl rendering in the client program. It does technically use node to serve the static resources and implement node’s require in the browser, but that part is hardly innovative.
I just show the browser version to prove the same API exists on both the node client and the browser client.
Make that “renders to the GPU”
Wow wow, pretty impressive! WebGL bindings for node.js, written in 24 hours! This is great: The game development community might one day use Node.js as actively as the Web development community. The demo is also pretty trippy. | |||
WebGL is one of the most exciting thing in those last times … Thanks to you to bring it on node (especially for WebOS but I’m sure we’ll find other use cases !) | |||
Great stuff. I’d like to see more OpenGL/WebGL related pieces available to Node as it can be extremely powerful for real games. Plus, if these work cross platform then you can truly build a game once and have it work across the different OS’s and devices. That is something that keeps me from gaming in Linux. Awesome job! | |||
Very nice technical project and I like how you got this running on webOS :). | |||
Saw you demo it on the Touchpad at Joyent. Awesome work. I should sync up with you sometime. I was working on basically the same thing about a year ago, just in pure V8/C++. Had full OpenGL 2.0 implemented, along with OpenAL and most of SDL. :D | |||
It didn’t work on Windows XP with Chrome. Turned out my computer was too old. Then I tried it on Macbook Air and it worked nicely. Love the effect. | |||
I don’t have the touch pad, but it’s still a great innovative entry, not done before, and well executed, and that only in 24 hours :)
But as it can only do one thing… 3 stars for design and fun.. Big 5 for the rest