Flixel was developed in a time when Flash capabilities were solely based on CPU. In order to display all those sprites and effects on the screen, developers had to manipulate bitmaps, copying pixels from one place to another. Usually the pixels from each game asset are copied to a bitmap representing the screen, pretty much like a drawing buffer. That process is known as blitting.

Even thought Flash is really fast at copying pixels around, blitting has lost its meaning when game engines started to use the GPU to draw assets on the screen. A GPU is power friendly, which makes it a better fit for mobile development, not mentioning that it is way faster than the CPU to draw things.

Lately we have been hard at work to bring Flixel Community to the GPU world, leaving the good old days of blitting behind. The current implementation, tracked under issue #90 on Github, is more of a prototype than a final version, since no big optimizations were performed yet. Despite of that, the results are outstanding so far.

Below is a chart showing the Bunnymark benchmark running the latest dev version of Flixel Community, using a blitting and a GPU render (powered by Genome2D): Bunnymark - Flixel Community v2.57-dev As demonstrated the blitting render was able to draw between 500 and 1000 sprites simultaneously before dropping the FPS rate. The GPU render, on the other hand, was able to draw up to 2500 sprites before dropping the 30 FPS mark. Using the amount of 2500 bunnies as a parameter, the GPU render performed 428% better than the blitting one. That is a huge performance gain!

Here’s an image of Bunnymark using the GPU render: flixe_community_gpu_bunnymark And here is the same benchmark using the blitting render: flixe_community_blitting_bunnymark The new GPU render is being developed to be a drop in replacement for the current blitting render. If everything goes as planned, developers will just recompile their projects using the upcoming Flixel Community version and the result should be GPU accelerated, no significant code modifications will be required regarding the drawing process.

Making Flixel Community GPU accelerated will be a huge boost for several developers. I hope you like this new feature as much as we do :)

AS3 Game Gears Blog , , , . URL.