Playing With Particles Part 2
In part 1, we used a DisplayObject (a Shape) for our particles. Now let’s get into single pixel particles; and go from 300 particles to 10,000 or more.
Read more…
In part 1, we used a DisplayObject (a Shape) for our particles. Now let’s get into single pixel particles; and go from 300 particles to 10,000 or more.
Read more…
Or, to put it another way, how to get a groovy sixties effect.
Read more…
Firstly, as i realise that i haven’t actually mentioned it yet and it’s a rather important point, PixelBender filters are quick! Much quicker than ActionScript and they can also run asynchronously in a separate thread. So bear that in mind when you find out further down the page that you can’t even loop in PixelBender!
If you’ve read part one and part two, it’s time to look at what we can do in a PixelBender kernel (filter).
Read more…
In part 1 we used PixelBender to create a custom filter. Now we can use it in Flash in the same way as any of the built-in filters.
Here is our custom filter in action:
The built-in filters provided by the BitmapFilters API (blur, glow, dropshadow, bevel etc) are very useful but sometimes our imagination exceeds their capabilities. Wouldn’t it be nice if we could create our own? Yes it would, and it is; we can build our own filters with a free bit of software called PixelBender and use a ShaderFilter filter to implement them.
Before i go any further, here’s a simple example to show you how much further we can go with custom filters:
Read more…
As i stated in part 1, encoding a large image can take a few seconds – especially if it’s a high quality jpeg. While the encoding is running, flash player is unable to advance to the next frame so the FPS drops to zero until the encoding has finished; this means that all animations will pause and keyboard and mouse actions will be ignored – not a great user experience.
What we need to do is spread the encoding over multiple frames (known as threading), ie: enough frames so that the user doesn’t notice any slow-down.
Read more…
Since Flash Player 10, we have been able to save files directly to the users system (you could do it before, but annoyingly you had to send the file to the server and then get the server to send it back to the user – a real pain!).
Now, it couldn’t be simpler:
var file:FileReference = new FileReference(); file.save(myData, "myFileName.ext");
This is part 2 of my summary of the flash.display.BitmapData object. If you haven’t yet, you may want to read part 1 first.
Before we get on to what i consider to be the most exciting stuff – filters – lets play with colours.
Read more…
In my previous post Bitmap Basics, i discussed creating bitmaps. This time i will go through some of the methods available to manipulate bitmap images.
Read more…
After i posted my last item on Perlin Noise in bitmaps, i realised that it wasn’t much help if you don’t know much about bitmaps, so here’s an introduction…
Why use Bitmap? Well for starters, Bitmaps render a lot quicker than Sprites, Shapes etc – not a problem if you only have 10 items on the stage but a big issue if you have hundreds or thousands of objects all moving around. Thats not to say you should always use bitmaps – they usually look awful when scaled for instance – but they definitely have their moments.
Read more…