Wednesday, July 16, 2008

Most impressive Javascript I've ever seen

When I was a kid, I spent lot of time coding on my Amiga 500 visual effects called demos. I had much fun with demos and it was a great way to learn coding. I still spend a bit of my time to look at the actual productions or read technical articles on demo effects.

It's very boring to use a technology to do what it is designed for. Abusing the browsers DOM + Javascript is also something possible but very hard to achieve. Why ? because browsers are designed to display styled boxes and text and nothing else. For instance, drawing a line or a bitmap is very hard to achieve without dirty tricks that are very expensive to perform, think of implementing the Bresenham line algorithm to draw a line using the DOM as a rendering technology.

I found in the past a few abuse of DOM+JS that went in that direction such as "Super Mario" remakes, but I was not much impressed... until today!

The demo is called Neja and it's coded by Ribon and Bomb! Even my Macbookpro finds it impressive because it really excites the laptop's fan :-) . It worked well only in Firefox and in did not work fully in Safari. You can check it online here, enjoy!

2 comments:

Julien Viet said...

Technical note:
+ For most of the effects I "simply" generate some 24bits BMP images in realtime and output them.
+ The textures are stored in fullbright. The shaded/fogged variants are generated during the progress bar,
+ All the 3D effects are made in raytracing/casting which means I can do anything with the rendering and the mapping is perspective correct.

Christophe Laprun said...

All this is already easier to implement using HTML 5 and the canvas element. See http://labs.mininova.org/canvas/ for some demos of what can be achieved. This, of course, does not remove any merit from the demo you posted.