Question For AS3/Flash Gurus...
I've been fascinated with a few addons like 3d engines, particle systems, etc. I'm wondering...are they also using the built in render pipeline like we all use or is there a low level way to interface with Flash and create your own render routines in C,C++, etc? Papervision3d for instance, is that just a collection of source code you can add to your app or is it adding something to the flash kernal at runtime? Thanks for the tech info. ;)
You can - if you write in haxe
Hi,
I have done some work along these lines - but you need to write in haxe, rather than as3 (they are very similar). So you first write your program in haxe, using the flash API that you know and love (very easy to move between as3 and haxe). You can compile your SWF and run it as normal. Then with a few addional lines, you can compile to c++, which you then compile with a normal c++ compiler. Given that you then have c++ code, you can extend it however you like. Pragmatically, you would probably use the standard haxe c API to write additional routines that you can call from from your haxe code - possibly as replacements for your slower as3 code.
The rendering engine is build on top os SDL, and has opengl support.
Checkout the demos and code sample at:
http://gamehaxe.com/2008/12/23/hxcpp-03-released/
This is currenly not production quality, but is in active development.
There are mosly 1-to-1 replacements for the flash api, but significant (huge) gains could be made if you ported a whole library, say papervision, so when you ran in flash, it would use the standard stuff, but if you ran in c++, it would swap the whole library for an opengl one, while keeping the same interface.