*blog... kind of... *rss 

Since the last post about Wonderfl I've added a couple of new snippets. Some of them are forks of old effects and some others are effects I had somewhere on my HD.

Enjoy the sources! ;)

On the linked page for the first effect I got an invalid BitmapData error caused by the creation of "canvas" with a width and height of zero, which was caused by stageWidth and stageHeight not being set to appropriate values by the browser [I'm guessing it's the browser's job to do that]. This happens in certain Mac OS/FireFox combos, and I forked a version that gets around this here -> http://wonderfl.kayac.com/code/c672cf7e1a81bc54cdb952aa72ff0f3772ae16cf/

Awesome effect. It's amazing that such simple code can give such impressive visuals. Very elegant indeed. So many good things came out of the 80's and 90's demoscene days, I wish I had been there.
Interesting. Yeah, I guess it missed the ADDED_TO_STAGE listener. By the time I did that effect I wanted the smaller filesize so I tried to avoid that.

A simpler solution has been to hardcode the width/heights directly because in this case the user can't resize the canvas :)

Hehe, yeah, the XOR effect is awesome, made me learn all about bitwise operations, oh.. and 00's demoscene is still bringing many good things, but flash won't be able to implement them for 10 years I guess :D
Yes, hardcoding sw and sh is definitely the best ;) Good stuff!
My compliments for getting comments module to work. I very much like those Terrain raycasters. You should try to figure out how to get them draw larger, more detailed, faster and fit them into 4kb.
Something like this http://www.pouet.net/prod.php?which=50068 . :)

For that sw&sh problem I wait for 1 framerate in main constructor and then call init function to start things up.
Somehow it can fuckup many classes initializations if flash isn't "ready" yet. (yeah... sounds like bad coding)

Maybe someone knows why flash does that?
Hey Simppa! Hehe, the comments code wasn't to hard, I added a new step for the spammers that seem to be making the whole experience less stressful :D

Making the Raycaster 4kb isn't hard, at the moment it's 2'8kb ;) Making it draw larger stuff, I'm not sure... I actually learnt how to code it from Iq himself. He did an article about it ( http://rgba.scenesp.org/iq/computer/articles/terrainmarching/terrainmarching.htm ). I also implemented some optimisations he suggested, but seems to be the limits of Flash. I guess I can optimise the code, but it will also make it less easy to extend...

The initialization thing, I believe it's just a matter that your code is not going to be added to the stage on frame 1. I always found the safest just to wait for being added to stage, and once it's there you always seem to have the correct infor for the stage width/height. Specially on the linux standalone player that on the first frame it's at 512x512 or something like this, and on the 2nd frame it resizes to the actual window size. Who knows why...