Using Scaleform for a game asset, not just the user interface

Someone tried to use Scaleform to actually render game assets in an iOS game, and not just for the user interface. The goal is to use vector swf, which will be converted to polygons via Scaleform, but has C ++ code that controls the game (without AS3). If you tried this, how did you feel about the results? Can it do it fast enough?

+4
source share
2 answers
0
source

You can use Scaleform for this purpose. Scaleform includes a Direct Access API (DAPI), which allows C ++ to manage Flash resources (this includes creating instances of characters at run time and managing their states + lifetime).

The GFx :: Value class is the foundation of DAPI and should provide most, if not all, of the functionality you need. You may still need some AS3 code to glue some things together, but this should be negligible.

The performance of static vector content depends on the complexity of the form (more paths, more styles => more triangles + lots). I would try to limit the number of animations of a temporary animation (form), because changing the form will lead to repeated tessellation. Scaling vector content will also result in re-tessellation, so keep that in mind.

0
source

Source: https://habr.com/ru/post/1412636/


All Articles