Archive for the ‘ActionScript’ Category

PixelBlitz engine v1.0

Saturday, August 23rd, 2008

The PixelBlitz engine is a bitmap blit engine API that aims to be easy to use and very extendable.

“So what exactly is a bitmap blit engine?”

Bitmap blitting is the process of drawing everything to offscreen bitmaps and then rendering one bitmap to display the visual elements. The end result of this is speed. It is much faster than using the traditional display List approach, when doing anything that is graphically heavy.

Features

  • Pixel-level collision detection
  • Layer effects
  • Horizontal and vertical scrolling
  • Parallax scrolling
  • Virtual timeline nearly identical to the MovieClip
  • Memory efficient
  • Fast, fast, fast

Demo

Press any key to switch to the next demo.

PixelBlitz Demo

Project Home

I have created full documentation using ASDoc as well as several examples to get you started quickly. The project is located on GoogleCode at the link below.

PixelBlitz Project home

The project is licensed under the MIT license. That means you can use it for commercial purposes as well as non-commercial. I am hoping that many other developers will find this project useful.

- Norm

Pixel Displacer Experiment

Wednesday, August 20th, 2008

I have been playing around with image based particles. That is, particles based on the color values of a source image. Along the way I came across something interesting. I mapped the speed of the particles to the white value of another image. Which causes the pixels to move in a cool 3D-like way. The part I dig the most is that there is no 3D code at all. I think I will be doing more with this in the future, as it has a lot of potential. I have posted a demo as well as the source of this below. 

- Norm

 Source

Move the mouse to move the object around. Change the fill and bump values with combo buttons at the top of the demo.

<p>Pixel Displacement Demo</p>

Name that DisplayObject

Wednesday, August 13th, 2008

I recently discovered something interesting with using FlexBuilder for Actionscript projects. I would embed a MovieClip symbol from a swf, but I would get compiler errors when using MovieClip methods on the symbol. Very frustrated, I tried everything I could think of, but no luck. Finally, I started tracing out the symbols type using the is keyword and found out FlexBuilder is converting the MovieClip into a Sprite. It would appear that if there is only one frame in the symbol it becomes a Sprite, otherwise it will remain a MovieClip. In short, make sure you check the symbols type before calling MovieClip methods on an embedded symbol.

One last strange thing I noticed is that inside of FlexBuilder embedded MovieClips are sealed unlike within the Flash IDE. The only fix I have found for this is to add the embedded clip as a child of a new MovieClip. I think that is kind of ugly, but it works.

- Norm