Return to Starling Playback Library

Starling Library v3.0

Questions related to Starling playback library should be asked here.

Starling Library v3.0

Postby Sergei Sorokin » April 11th, 2014, 12:19 am

Hello everyone.

Today we've updated our Starling Playback library.

We are now using Binary File for storing animation config and that is the biggest update since the first release of the library. This means that from now on your files will weight much less and will be parsed much faster!

The new release also features other useful perks:

- zLib Compression feature for reducing file size to the maximum
- “Smoothing” property added to the GAFMovieClip which enables switching texture smoothing in runtime

We have discontinued the use of JSON files, but GAFmedia Starling library supports the playback of the animations created with the older versions of converter.

Don't forget to grab latest version from our github repository and take it for a spin: https://github.com/CatalystApps/StarlingGAFPlayer.
User avatar
Sergei Sorokin
 
Posts: 39
Joined: December 18th, 2013, 11:46 am

Re: Starling Library v3.0

Postby Ivan Shaban » May 28th, 2014, 1:30 am

Hi, do you have any plans to support ATF?
User avatar
Ivan Shaban
 
Posts: 9
Joined: April 1st, 2014, 2:02 am

Re: Starling Library v3.0

Postby Sergei Sorokin » May 30th, 2014, 12:52 pm

Ivan Shaban wrote:Hi, do you have any plans to support ATF?

Hello, It's not in priority right now, but it's on our list.
User avatar
Sergei Sorokin
 
Posts: 39
Joined: December 18th, 2013, 11:46 am

Re: Starling Library v3.0

Postby Jakub Bladek » January 21st, 2015, 6:47 am

ATF would be great!!!
User avatar
Jakub Bladek
 
Posts: 1
Joined: May 22nd, 2014, 4:33 am

Re: Starling Library v3.0

Postby vadym.mitin » January 21st, 2015, 7:48 am

You can convert PNG atlases to ATF by yourself and use them instead of PNG atlases. Follow the following rules:

1) convert PNG texture atlases to ATF by some PNG to ATF converter.
2) replace PNG atlases with ATF atlases in your sources. Please note that the name of the atlases should be the same. Example: atlas.png -> atlas.atf
3) set up ZipToGAFAssetConverter to work with ATF textures using the following code:
Code: Select all
var converter: ZipToGAFAssetConverter = new ZipToGAFAssetConverter();
converter.textureFormat = GAFGFXData.ATF;

4) the other code is absolutely the same as for PNG atlases

You can automate conversion if you will use Standalone GAF Converter CLI. More information about CLI you can find in this article http://gafmedia.com/blog/gaf-converter-cli-command-line-interface
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Re: Starling Library v3.0

Postby Konstantin Serov » January 25th, 2016, 11:47 pm

This lib doesn't work.
I wanted to try and use it instead of Dragon Bones, but when I created a testbed to see what it's like, It always crashes with error: Error #3605: Sampler 0 binds an invalid texture. It happens right after I add the GAFMovieClip to display list.
And I have no idea of why it happens. The same file worked in gaf player after conversion. But does not want to do it in starling player. I think there's something wrong with renderSupport inside this movieclip.

Here's the code:
Code: Select all
import com.catalystapps.gaf.core.ZipToGAFAssetConverter;
import com.catalystapps.gaf.data.GAFBundle;
import com.catalystapps.gaf.data.GAFTimeline;
import com.catalystapps.gaf.display.GAFMovieClip;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.utils.ByteArray;
import starling.display.Sprite;


internal class GafMap extends Sprite {
   
   
   [Embed(source="gaf_map.zip", mimeType="application/octet-stream")]
   private static const GafMapZip:Class;
   
   public function GafMap() {
      var zip:       ByteArray             = new GafMapZip();
      var converter:    ZipToGAFAssetConverter    = new ZipToGAFAssetConverter();
      converter.addEventListener(Event.COMPLETE, onConverted);
      converter.addEventListener(ErrorEvent.ERROR, onError);
      converter.convert(zip);
   }
   
   private function onConverted(e:Event):void {
      trace("GAF CONVERTED");
      var gafBundle:       GAFBundle       = (e.target as ZipToGAFAssetConverter).gafBundle;
      var gafTimeline:    GAFTimeline    = gafBundle.getGAFTimeline("gaf_map"); // gaf_map is really the name of swf file, and the timelime is rootTimeline, as it was in gaf player
      var mc:          GAFMovieClip    = new GAFMovieClip(gafTimeline);
      addChild(mc); // It crashes here
      mc.play();
   }
   
   private function onError(e:Event):void {
      trace("GAF ERROR");
   }
}


I tied it with other files too. The same.
User avatar
Konstantin Serov
 
Posts: 2
Joined: January 25th, 2016, 11:41 pm

Re: Starling Library v3.0

Postby vadym.mitin » January 26th, 2016, 1:52 am

What version of the library do you use? From the master branch or some else?

Please check the requirments https://github.com/CatalystApps/Starlin ... af-library

Do you initialize Starling before initializing GAF? Like this https://github.com/CatalystApps/Starlin ... manMain.as

Try to run one of the our demos with your GAF animation. All demos you can find here https://github.com/CatalystApps/Starlin ... aster/demo

If you still can't fix the issue please send a complete demo that we can use to recreate the issue. Because your problem is a very strange.
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Re: Starling Library v3.0

Postby Konstantin Serov » January 27th, 2016, 8:06 pm

All the latest versions from your website from master branch. I even updated starling from 1.6.1 to 2.0. To no avail.
Of course starling is initialized when I try to run gaf player. To say more, it's an active game project with a lot of Dragon Bones characters and other animations in it. Everything works fine except for GAF. And actually, even gaf starts to work if I put a try catch block inside starling code which constructs an Image. But it's not a solution.

I wanted to test with this file https://github.com/CatalystApps/Starlin ... n_swap/bin
It doesn't even convert it. It converts my files but does not wanna do it with this demo one. How come?
I can't use demo fla files because I have flash cs6, and they're created in cc. cs6 doesn't publish them for some reason

I'll ask our artist to create some test character to upload here because I cannot share our real game assets
But I can't believe all our assets can be of that 1% which GAF does't support :mrgreen:
User avatar
Konstantin Serov
 
Posts: 2
Joined: January 25th, 2016, 11:41 pm

Re: Starling Library v3.0

Postby vadym.mitin » January 28th, 2016, 9:11 am

Konstantin,

The problem somewhere inside of your project. Without a demo it's hard to say where exactly the problem is (may be incompatible version of the Starling or Feathers, conflict with some other libraries included in the project, AIR SDK version older than 15 etc.). So if you want us to help - we need a complete demo that we can use to recreate it.

The latest version of GAF library (from master) should work with the latest Starling officially released version 1.7. We can't guarantee compatibility with Starling 2.0 because it is not released yet.

Also please try to create a new test project based on one of our demos. I'm sure that it will work. And this will help you to find a difference between your real project and test project. And when you'll find a difference - you'll find the reason of the problem.

I wanted to test with this file https://github.com/CatalystApps/Starlin ... n_swap/bin
It doesn't even convert it. It converts my files but does not wanna do it with this demo one. How come?


This is a complete demo game. It can't be converted. The source SWF file that is used in this demo is located in "design" directory https://github.com/CatalystApps/Starlin ... wap/design
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Return to Starling Playback Library

Who is online

Users browsing this forum: No registered users and 1 guest