Can I generate a FirefoxOS App from game written using starling framework? - actionscript-3

A friend of mine has developed an excellent game using the starling framework. He is now wondering if he could port the game to FirefoxOS before he launches. The game is written in actionscript 3 and the starling framework project can build mobile packages for android and ios. It also can generate the flash file for the web (using flash player). Are there any paths for porting the game to FirefoxOS?
Someone suggested using shumway. If you know about this way, or any other path, please give a bief account of advantages/disadvantages. I am specially concerned about the performance, since the game in question has very high quality graphics. I think it needs to run in a GPU accelerated environment.

EaselJS uses a similar syntax to ActionScript; it has a Display List, Stage, Graphics and even Filters, this will make working with the canvas easier for us Flash developers.
I suggest you to port that game to EaselJS and TweenJS (both from CreateJS), I have used it to develop games for Firefox OS and worked quite well.
An advantage is that CreateJS now uses a WebGL renderer, but it also has a fall back to Context2D rendering if WebGL is not available. That would make your device more widely supported.
You will find all its features very explained in the following post from Mozilla Hacks. It has also some cool benchmarks to try it.
WebGL and CreateJS for FirefoxOS

Related

Is ActionScript a more secure alternative to Flash Player?

With all the security issues with Flash lately I am looking at alternatives for if/when Flash is retired at my work. We use strictly IE 11 and IE11 seems to be very finicky about css3 animations. I see the new Flash has the ability to publish the file as embeddable actionscript files instead of a swf file. Is this a viable alternative to Flash or is this vulnerable to the same security issues Flash has? My assumption is the vulnerabilities exist in the Flash players but I want to be certain.
No. Apples and Oranges, really.
The Flash Player is a runtime environment of the Flash platform (AIR being another). It "plays" .swf files.
ActionScript is the scripting language that an apropriate compiler (mxmlc, for example) compiles into .swf files.
I see the new Flash has the ability to publish the file as embeddable ActionScript files instead of a swf file.
You can embed any file, but guess where you embed it into? Into the swf file.
Again, ActionScript is the programing/scripting language and an swf file is the compiled result.
Flash CC can also export to JavaScript/HTML/CSS. That means that instead of creating a .swf file, a bunch of JavaScript/HTML/CSS files are created.
As you can see in the link you provided, the feature sets are not equivalent.
Note: The 3D Rotation tool in the toolbar of the Flash Professional CC workspace is disabled when creating HTML5 Canvas documents because it is specific to SWF projects and not supported in the HTML5 specification (see Figure 3).
There's a whole bunch of other things not supported
Recommendation
If one comes to the conclusion that the Flash platform is not an appropriate publishing platform any more, why bother sticking to the Adobe Flash program?
It appears to be disadvantageous to cling to the program, just for the sake of keep on using it.
Why not use the CreateJS library on its own? Or any of the other dozens of great JS libraries? There's a lot to explore in the post-Flash era and it is very exiting. It's not a good idea to stay behind, still coding in dead languages, hoping that there's a translator to communicate with the Present. Try to order a pizza in Latin and you know what I mean.
If the goal is to target multiple different platforms, there are alternative tools to do this like defrac or Haxe that allow you to compile from one languages to many platforms.
The answer to the question if compiling ActionScript to JavaScript/HTML/CSS is a reasonable workflow for the future is no. It might be a good tool to port existing projects, but not to neglect the current developments in the JavaScript/HTML/CSS realm.
I seem to get almost weekly Java updates. All these technologies can have security issues, it's just that Adobe react quickly, and release a fix as soon as possible. That does come with a certain amount of publicity.
About using CreateJS on its own, you could do that, and come up with your own libraries to create hierarchy, synchronizing sound to visual events, asset management, etc. You could also do everything purely in code, if your imagination is good enough to do that. Or, you could just use Flash Pro, and get all of those things for free.

Choice for multi-platform application development

I like actionscript very much and did a project with Apache Flex 4.12. Originally my mobile application was built in mxml and the performance was awful. Then I rewrite the application with single line mxml file and the rest of the project in pure as3, the performance is much better.
Now I have another project, it is an multi-platform informational application with some e-commerce capabilities target on both desktop and mobile platform and need to decide, on performance/flexibility/scalability wise, should I stick with Flex (mxml) / Flex (pure as3) / or Pure AS3 with Starling+FeathersUI+as3-signal?
I was thinking to shift into the Starling approach, however I see improvements from the Flex 4.14 release, anyone can give me a direction that which approach is more promising in long term?
Sorry for my bad English as I am not a native user. Thanks.
Please look into Haxe (www.haxe.org) and OpenFL (www.openfl.org) as an alternative to Starling.
Haxe is a programming language that is very similar to action script 3.
OpenFL - open flash library is a framework for Haxe programming language.
The benefit: of Haxe + OpenFL are:
Astounding performance
Fast and easy development
Non-existing learning curve for AS3 programmer ( you might need to spend 10 min learning about loops and casting though )
99% same API as the Flash API
I don't recommend Starling because: it's still AIR and you won't want it, the performance is below average, you'll need to re-write your whole code-base for Starling, you won't be able to port your game outside of Starling without rewriting it again and the fact that you won't be able to compile to many different platforms other than the currently supported ones.

Adobe Flash Builder

Is there any way which can be adopted, to create cross platform responsive mobile apps using Flash Builder ?
We are using our custom written Resigning Engine for this purpose right now, but we tend to replace it with any generic Resigning tool or to cater responsiveness for all kind of devices/platforms.
Being on the same cross platform development, i.e. Flex, Action Script and MXML, is there any solution for this?
Thanks
It's possible deploy Flex-apps on Mobile devices, see Mobile app development
at Adobe Devnet more details
You definitely can develop Android and iOS apps using Adobe Air, Flex, AS3, MXML and publish them on Apple App Store and Google Play Store. But it's limited to these platforms, and Adobe is very unlikely to add any new platform to this list.
Pros:
it's really cross-platform. Once your application works on one, it's really easy to get it working on the other; so the development cost compared to native applications is much lower;
you may have some OS specific features/design; using by example OS specific CSS directives;
You perfectly may create an app with a responsive design, all tools are provided, but like for HTML/CSS, it requires a lot of work;
you may access all phone features (sensors, camera, etc...) using Adobe Native Extensions
Cons:
the size of the generated application: as it includes the AIR runtime, even a very simple app will weight around 12 Mb (9 for the runtime + 2.5 for Flex);
the performances are correct but not as good as those of native apps; one of the reasons is that Flex does not allow to use GPU for rendering (but Flex is not a framework for creating games);
it would be costly to get an app looking like a native one, as you would have to mimic all of native components. There was a project to do this (Eskimo), but it looks dead, and the components were not polished enough to be used in production when they stopped the development;
Adobe Native Extensions offer is rather limited, and they are quite tricky to write; (these drawbacks are not strong ones: you can write extensions, assuming you know to write native code; and most of the common features are available as ANE);
like with any other cross-platform technology, there are a few issues that you can't fix by yourself; you just can wait for Adobe to fix them when it's a problem in the compiler or the AIR runtime; hopefully they follow a 3 months release cycle since they launched AIR on mobile;
it runs on Android 2.3+ devices only; and only devices that are matching the minimal requirements defined for the AIR runtime; that is to say, most of the smartphones and tablets, except cheap ones like ZTE products. When a device is not considered as powerful enough by adobe, the AIR based apps are not displayed in the stores.
Some recommendations:
The best way to organize your code is to create a project for each OS, with specifics assets (icons by example) and a specific manifest file (app.xml), and put all of your application code in a library used by these two projects. It will allow you to test your code (Flex mobile project can't be unit tested), and will avoid you permanent modifications of the manifest.
Worflow: it's usually faster to develop for Android, and then adapt you app for iOS, because it's faster to deploy and test on Android device (although you may use the Adobe Simulator most of the time).
Use the latest release of Apache Flex; it handles the high resolution devices. Forget Adobe's release (4.7 and lower)
Test quickly and often on mobile, especially for the responsive aspects.
Use FXG instead of bitmap graphics each time it's possible (i.e. if they arent animated); it's lighter and very easy to scale.
Mad Components
Alternatively, you may consider using Mad Components instead of Flex.
Flex was not designed for mobile at first; MC was. So it's faster (looks like native), and much lighter (although you still need the embedded AIR runtime which weights 9 Mb).

Best Flash Engine for Vector Graphics?

Hi can anyone give me a link to a flash library that can use vector images or merge with flash profressional cs6 movieclips?
Vector images made in Illustrator or Flash Pro CS6?
Would cs6 profressional native be enough to make a 'optimized' game? using less memory etc.
I'm looking for a flash game engine that I can still code for like FlashDevelop and Flashpunk but can do vector graphics as well.
First of all, a few things to be aware of:
Flash supports vector graphics. This is implemented in the base code of the language, and thus you will be able to use vector graphics no matter what you are doing (though some prebuilt engines will require raster images instead for various reasons)
FlashDevelop is in IDE, or Integrated Development Environment, which means that it is a tool, like notepad or microsoft word, but in which you type your code. It is not a game engine.
As it seems you've discovered, Flashpunk is designed for raster graphics, not vector graphics.
How "optomized" your game ultimately turns out is a result of you, not the tools you are using. If you use art assets with thousands of vertices in your vector graphics there is no code base in the world that will save your game from being unoptimized. So yes, you can make a fully optimized game using just Flash CS6
Flash CS6 is really two things in one: Content creation tool (for making or grouping art assets) and an Actionscript Integrated Development Environment.
Keeping all this in mind, you can indeed develop content in flash, then export that content from flash to FlashDevelop. The prefered way to do this is SWC importing. Basically, you build a .fla file in Flash with all your graphics and sound, assign a class name to each flash DisplayObject in your library you want to use in FlashDevelop, go into publish settings in flash and enable .swc output, and publish. Then import it in FlashBuilder and you can simply call
this.addChild(new graphic001())
Within a class you have written in flash builder (one that extends DisplayObjectContainer, of course).
A good example tutorial can be found: Here
To answer your original question though, just in case I'm wrong and you are ready for this (or the next guy to view this question is), I'd recommend using the Citrus Engine. Nape physics engine is pretty easy to work with and once you're feeling confident with the traditional displayList format you can begin using the starling framework without having to switch to a different engine. However I would like to point out that I really don't think you're quite ready to do this quite yet. It may be best for you to work through a couple of "make a game" flash tutorials first, such as this one.

Migrate from Flash AS3 to AIR

I've been developing a project in AS3 but decided to switch to AIR instead, as I found out it's impossible to save files on user's hard drive without prompt appearing. My question is, what changes do I have to expect? is the code written in same AS3 syntax/style? Did instantiating objects / drawing shapes / positioning system / stage change in AIR? thanks.
Everything is the same from a code perspective, except that the AIR SDK includes quite a number of new APIs that are less restrictive and geared toward application development since the deployment target is no longer a web browser.
If you can, you should take a day or 2 and read thru the documentation so you will know what's available to you. Make sure to select the most recent versions of AIR and Flash Player under Packages and Class Filters: Runtimes so the docs are populated with what you need.