ActionScript Native Stage Support?

262 views
Skip to first unread message

Clayton Grey

unread,
Apr 6, 2013, 5:08:46 AM4/6/13
to plays...@googlegroups.com
This looks really cool, and I'm excited to check this out. Seems a little more friendly and put-together than Haxe.

I see you've got Starling and Away3D squared away, but can anyone speak to the implementation/performance of ActionScript native Stage rendering?

Ben Cooley

unread,
Apr 6, 2013, 3:04:57 PM4/6/13
to plays...@googlegroups.com
We have no plans to support native stage at this time.   Zynga's games have not used native stage for quite a while, and the native stage API's are generally overly cpu intensive on mobile devices.  However if you have a native stage app, it is really not too difficult to port it to Starling.  

If you have a large number of resources in the SWF format, there is another group at Zynga will shortly be releasing a tool which directly exports SWF assets including the full skeletal hierarchy to both Cocos2D format and Starling asset format.  This is the tool we are presently using at Zynga to deliver 2D animated assets to our primary dev platforms.

Clayton Grey

unread,
Apr 6, 2013, 9:18:14 PM4/6/13
to plays...@googlegroups.com
Hey Ben,

Thanks for the response. That makes total sense, we've been trying to get away from it, but we really don't want to lose the power of Flash Pro's animation capabilities.

Can you speak to that tool more? That sounds like it could be really useful. If there's any way to see a basic read-me on that, that would be rad.

We have a problem with maintaining the animation pipeline of Flash in Starling projects. I started working on a tool-chain to export transform data, but for a small team like ours it's a lot of work that we don't want to do unless we have to. 

The problem with the native SpriteSheet export from Flash Pro is that it converts every minute change in an asset into a totally unique image rather than dumping individual parts and translation data, which is a huge headache if you're doing a game with a lot of animation. :) So I'm hoping that's what you're getting at!

-Clayton

Ben Cooley

unread,
Apr 7, 2013, 3:32:56 AM4/7/13
to plays...@googlegroups.com
Yes, that is what I'm getting at.  This tool is built to generate both Starling and Cocos animation with animation timelines, not sprite sheets.  We've extended Starling with an Asset class which works more or less like a SWF file, so it makes it pretty easy to work with. 

Likewise with Cocos2D.. we export to CocosBuilder format for that framework.

Clayton Grey

unread,
Apr 7, 2013, 3:53:51 PM4/7/13
to plays...@googlegroups.com
Awesome. Is "shortly" days, weeks or months?

IngweLand

unread,
Apr 15, 2013, 6:19:40 PM4/15/13
to plays...@googlegroups.com
Ben, have you ever considered implementing native flash Display List or it never was on your to-do list. If former, did you find it just not worth the efforts? Maybe you can share some possible problems, just in case someone decides to contribute to the project in this direction. :)

Ben Cooley

unread,
Apr 16, 2013, 11:50:05 PM4/16/13
to plays...@googlegroups.com
Zynga's games have not used "display" for a while, both for 2D and for 3D, so it was really never on our radar.  We wrote the current copyPixel() based renderer (BRO) a while ago, and newer games just used Starling instead of display.

Display is a complex beast, full of lots of very cool features that are extremely difficult to implement.  The guys at Scaleform have been working on it for years and still haven't gotten everything perfect.   Since display is generally very slow on mobile, and it's features are more or less completely subsumed by Starling, yeah it just didn't seem to be worth the effort.

The only thing that Starling really doesn't do well is handle articulated animated resources as a single compact asset, and we've added that to our version of Starling.  We will be open sourcing that extension to Starling in the near future along with the converter tool that converts SWF's to animated starling assets.

Ben Cooley

unread,
Apr 16, 2013, 11:51:17 PM4/16/13
to plays...@googlegroups.com
We started the discussion with Daniel last week.  We can open source our patch probably very quickly, but I think people will generally want it integrated in a reasonable way with the core Starling libs.

Clayton Grey

unread,
Apr 24, 2013, 7:26:53 PM4/24/13
to plays...@googlegroups.com
Just wondering if there's any more news on this. :) Excited to try it out.

Ben Cooley

unread,
Apr 25, 2013, 12:06:03 AM4/25/13
to plays...@googlegroups.com
It is currently in the pipeline.  Don't know how long the approval process takes, but it's usually a couple of days.

Ric Moore

unread,
Apr 30, 2013, 3:38:49 AM4/30/13
to plays...@googlegroups.com
What's the best way to deal with input text then? The Starling book recommends using flash.display.TextField but that is not an option now.

Ben Cooley

unread,
May 1, 2013, 6:21:16 AM5/1/13
to plays...@googlegroups.com
A UIEditText control or an android text widget will do the trick.

We might wrap this with the AIR NativeText widget, but for now you should probably just use the native API's

Clayton Grey

unread,
Jun 4, 2013, 6:01:24 PM6/4/13
to plays...@googlegroups.com
Any news on this?

Ben Cooley

unread,
Jun 8, 2013, 1:43:03 PM6/8/13
to plays...@googlegroups.com
Sorry Clayton, I believe this tool was released to the Zynga open source github repo two weeks ago.

The github repo is here: https://github.com/zynga/swf2ccb

This repo contains a flash Starling project which includes the extended version of Starling with "Asset" support, and the exporter which exports SWF files to either Starling or to Cocos2D (C++).

We use this tool internally at Zynga on a couple of projects to author content in Flash, and use it on the GPU in both startling and Cocos2D.

Ben Cooley

unread,
Jun 8, 2013, 1:46:56 PM6/8/13
to plays...@googlegroups.com
One note, Edison Tung (the author of this tool) lost his job in the force reduction at Zynga last week.  If you have any questions please send them to me.
Reply all
Reply to author
Forward
0 new messages