Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Flash Player can now run C++ code, that is cross complied with the Adobe Flash C++ Compiler. How fast does such code run in comparison to a C++ application running as an EXE, in the context of gaming?

And does GPU rendering performance compare with C++ applications? Or is Flash far behind?

share|improve this question
2  
I'm not sure what you've done here. Did you re-ask a question that someone else asked and you answered? Providing the exact same answer for both? –  Byte56 Dec 21 '12 at 19:42
    
Yes, I did that because my answer was more general and on his page no one would really find it. My answer wasn't about UDK in specific and there was no way I could delete his entire question to broaden the scope. And the answer isn't the "exact same", I modified it for this question. –  Geotarget Dec 22 '12 at 7:44
    
    
Thanks. I thought the questions would be similar enough for them to be closed as a duplicate, instead of providing the same answer. I see that they're different enough now. –  Byte56 Dec 24 '12 at 20:27
add comment

1 Answer

up vote 2 down vote accepted

GPU rendering speed for 3D FlasCC games/apps is likely to be similar to C++ apps for obvious reasons - the actual rendering takes place on the GPU. Flash includes a cross-platfrom shader language (AGAL) to describe GPU kernels (programs run per pixel on the GPU).

CPU/computing speeds however at best reaches 15% the speed of MS VC++ on Windows (tested with a simple encryption function operating on an array of bytes). Some benchmarks for the latest FlasCC are available here, that compare a set of C++ programs running as an EXE and in Flash Player.

This essentially comes down to:

  • Anything you can move to the GPU can possibly be done close to native speeds. This includes rendering, lighting, mip-mapping, and to some extent physics operations (depends on the library)

  • Anything still done on the CPU will be a few times slower than C++, so don't expect to have a million moving objects on screen with full physics even if you can do that with the native (C++) library.

  • Flash vector graphics does not use the GPU and is rendered fully on the CPU. So if you need HUDs (heads up displays) with high-performance 3D vector rendering like what Scaleform provides for C++ apps, don't expect that to be easily possible in Flash Player, unless you're willing to roll your own 3D vector renderer that takes advantage of the GPU to composite vector shapes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.