over the last weeks and months, countless optimizations, bugfixes and new features have been added to the Starling development version. It's high time that we create a new stable version, so that all of you can make use of those enhancements!
For this reason, I decided to tag the current version as "1.5 Release Candidate". It would be great if some of you could try it out and test it with your existing games! I don't expect to find any major stumbling blocks, but you never know. If everything goes fine, I can make this the official 1.5 version quickly!
For those who didn't follow development closely over the last months, here is a round-up with the most important changes.
Automatic Profile Selection
Adobe recently introduced the new Stage3D profile "Baseline Extended", which finally allows us to use textures up to 4096x4096 pixels. This is great news, especially for the huge table resolutions that have become standard by now.
However, it also made it difficult to always use the right profile on the right device. For this reason, you can now tell Starling to automatically choose the right profile for the hardware a game is running on.
You can either pass a list of profiles you want to support, e.g.
new Starling(Game, stage, null, null, "auto", ["baseline", "baselineExtended"]);
or you just pick the best of all of them, using
new Starling(Game, stage, null, null, "auto", "auto");
When Starling has been initialized, you can find out which profile was chosen via "starling.profile", and can adapt your game logic accordingly. E.g. you can load the super-uber-HD textures if it's the highest profile.
The default stays at "baselineConstrained", though, to be on the safe side. After all, there's some additional testing required if you support multiple profiles.
Automatic usage of RectangleTextures whenever possible
For some internal / architectural reason, the default "power-of-two" textures of Stage3D always allocate additional memory for mip-maps — no matter if you're actually using them.
Beginning with "baseline" profile, though, Stage3D supports "RectangleTextures". Their main feature is that they don't need to have POT-sidelengths; but what makes them actually even more useful is that they *do not* allocate that mip-map memory.
Thus, Starling now defaults to them wherever possible. To make use of this:
* Start Starling in "baseline" or "baselineExtended"-profile, or — even better: use "auto".
* Pass "false" to any Starling texture / AssetManager argument asking for mip-maps.
When you do that, Starling will use RectangleTextures automatically, and you will save a whopping 33% of texture memory. W00t!
Added support for rotated SubTextures
Some loyal "TexturePacker" user might have already noticed it: when you choose Starling or Sparrow as output format, you can let it rotate your textures in the atlas, for even more efficient texture distribution. This is supported by Starling 1.5!
Perhaps this will allow some of you to save even more memory by reducing the number of atlases altogether.
Added new 'touchGroup' property
This was asked for a long time, and now I finally heard you: display object containers have a new property called 'touchGroup'. If enabled, the container acts as a single touchable object; similar to the 'mouseChildren' property you might know from traditional Flash.
Significantly reduced start-up time
Starling now starts up in no time, because it now creates the AGAL programs on-the-fly, when they are needed. This is much more efficient. (Actually, 🙈 for overlooking this so long ...!)
Many small convenience additions
* You can now use custom settings for individual textures in the AssetManager
* There's a new "SystemUtil" class that contains helpers for multi-platform development, e.g. if you're running on Desktop or Mobile.
* The Juggler contains a new "repeatCall" convenience method
* You can now "mute" MovieClips
Many internal changes that will make your game JUST WORK (tm)
On mobile, you often have to fight with peculiarities that happen just on some device families, but never on your development devices. Starling now works around many of them, so you don't have to care.
* The RectangleTexture limitations (RenderTexture!) on the iPad 1 are avoided
* The AssetManager now supports AIR's new background execution mode
* There are additional checks for context loss, which make handling it more stable
* The AssetManager can now cope with a lost context while it is processing its queue
And on and on and on ...!
As always, the complete changelog can be found on GitHub.
A huge ❗️ THANKS ❗️ to all the developers who supported me with bug reports, feature suggestions and pull requests! Starling wouldn't be where it is today without your help, guys.
Please give the new version a go! I'd be happy about any feedback — just leave your comments below.