Flash Rendering Library

ScreenCompare
Screen comparison of the Flash library render in 3D (left) and the Flash player render (right), as well as a debug view of the Flash library render (center). It should be noted that the graphics are being rendered in 3D on parallel planar surfaces with a Z-axis offset. The scaling is a bit off in the images, however, this is due to the fact that the model in the background is being rendered in 3D and was therefore screen captures and superimposed on the actual Flash player render to show correct Blending. There is an issue with the opacity in the buttons on the Flash library render, which I think is due to the way that images are stored in the .swf file. In practical applications (i.e. a game engine), the user would want to externally link any textures and would not have to worry about this problem.

Flash Rendering Library for a C++ Game Engine
This project involved the development of a C++ library for a game engine which could read, render, and animate a flash .swf file for a user interface or random artwork. There currently exists two such libraries that are well known: 1) GameSWF, and 2) ScaleformGFX. Most game engines use ScaleformGFX which is a proprietary library owned by Autodesk, and is not available to the general public. GameSWF was the precursor to ScaleformGFX but contains performance drawbacks, and obsolete code that does not always work. As a result, I began cannibalizing the GameSWF code, and rewriting it myself to meet a general renderer (one can plug DirectX into it), and use better tessellation algorithms. Additionally, my library implements Actionscript 3.0 (the Adobe Flash scripting language) as opposed to Actionscript 2.0 which is required by GameSWF and ScaleformGFX. Furthermore, my library will implement “advanced” shader effects (as of SWF 10.0) which neither library does – most likely due to performance issues. Not only did this project involve implementing several computational geometry algorithms and software design patterns, but it also involved working with OpenGL shaders, and learning about the construction and operation of a virtual machine for Actionscript. Things that are left to do: finalize the API for the library, link the Actionscript 3.0 functions with their C++ calls, Implement a MSAA anti-aliasing algorithm to clean up edges, Implement font rendering, Add interactive features such as text boxes, Implement the shader effects, and finally, optimize the library – especially to work with a game engine memory manager.

Image demonstrating the libraries ability to perform shader effects (drop shadow, glow, blur, and blend modes). Additionally, the right hand side demonstrates the greedy packing algorithm used to accelerate special effect performance.
Image demonstrating the libraries ability to perform shader effects (drop shadow, glow, blur, and blend modes). Additionally, the right hand side demonstrates the greedy packing algorithm used to accelerate special effect performance.