What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
I want to achieve some kind of random slight color change in every single pixel every frame, and also based on how far from the center every pixel is.
What’s the fastest way to generate noise every frame? I know Math.random() is slow so I should not use that. Eventually, is the perlinNoise function able to output a bitmapdata where every pixel is randomized (both in R, G and B)?
I could then blend it using a premade alpha bitmap.
Though I don’t thing perlin noise is fast at all either.
The first thing to do is try [BitmapData.noise()](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#noise%28%29) and see if that’s fast enough.
If it turns out not to be, you can try these pseudorandom number generators instead: (http://gskinner.com/blog/archives/2008/01/source_code_see.html) (http://drawlogic.com/2007/04/30/as3-random-number-generator/) (http://seld.be/code/seededrand).
noise() would have been my first guess as well. If it’s too slow, you could generate a large BitmapData of noise (say 4000×4000 so you don’t exceed the FP10 BitmapData size limits and needlessly crash legacy players) at game start, apply whatever effects you want that do not depend on position, and then copyPixels() a random portion of it every frame on which you apply your radial effects.
Another option is to generate a Perlin noise bitmapdata at game startup and change the offsets of the various harmonics to random stuff at each frame. That would shift the various components, making it _look_ like the noise is different. It’s been used to animate cloud effects, so I know this one’s fast enough to use in a frame renderer.