This is more of a tech demo than anything else. It’s something that’s in damn near every game they make nowadays, but i still haven’t seen in a 2D game, maybe because nearly no one makes those anymore.
I’ve made bloom. I’ve been wanting to make this ever since bitmap effects were introduced back in Flash player 8, but AS2 is far to slow to pull it of with performance to spare for an actual game.
The following is a bit actionscript focused, so if you just want the pretty pictures feel free to skip ahead.
The way it works is that it, instead of just adding the different sprites to the stage, i have a canvas (essentially a Bitmap) i draw them on. This canvas is then copied into a lower resolution bitmap. It could just aswell be the same size, but I’m running it at a half or a quarter of the original resolution for better performance. This copy is then transformed into a black and white image by lowering the saturation to zero, in this step i also crank up contrast way up to get nice big white fields. Then i apply a simple BlurFilter to get the fuzzy effect.
This is then drawn on top of the canvas with additive blending.
The effect works a lot better if you can do some pseudo (or actual) HDR, since what it does is that it takes the very brightest pixels and makes them glow. This is all fine and dandy, but having variable exposure really makes it pop.
As an added bonus a beta of the Flash Player 10 was released this week, this gives amongst other things, a nice speed boost for blitting. It also supports something called Pixel Bender, which basically is pixel shaders, they run on the graphics card and everything. This demo however, does not use them.
In other news; I attended the Nordic Game Conference this week. The conference itself was so-so, in my opinion a bit too many lectures/panels. I realize that you need the wide appeal for a conference like this, but that can’t be at the expense of quality. It is still nice to have something like that almost on your own doorstep though.
The real highlight of this was however that I got to meet a bunch of indie people. I mostly hung out with Petri Purho of Kloonigames and Erik Svedäng that is making the very interesting looking Blueberry garden. We also did some beer drinking with thewreck and jeb of Oxeye games. Pure gold.
This demo requires the Flash Player 10 Prerelease player. Get it here.
Press the mouse buttonto fly around, if you get stuck in the planet you'll have to reload the page.
The physics are motor2.