Animation tools for OpenFL?

So I while back I had come across a nice little tool called Spriter that was a wonderful tool for animation using XML files for keyframes. DragonBones was another such tool. I have tried going back to these only to find broken libraries for Spriter and DragonBones seems to have disappeared and no longer available. Are there are tools out there similar to these that are either low cost or free(open source)? Any info appreciated.

What kind of features are important to you in such a tool?

What is broken? It should work with Spriter 1 and Tilemap.

Ran into several issues with TilesetEX no being found, tilemap library threw out multiple errors related to TilesetEX. Not all files loaded. It was numerous errors I gave up trying to make it work. I have latest versions of openFl. This was just on the SpriterHaxeEngine library. There are other libraries that I found that were simply too old and they did not work either.

I didn’t think you would respond or even see my post. I should have saved the error messages.

Mainly looking to for animation tools using keyframes not so much as sprite sheets since there are plenty of tools out there that can do that.

I am thinking animation assistance with menus or for creating interactive/non interactive cut scenes.

Went back to rebuild the example given in the library, this is the error:

/usr/local/lib/haxe/lib/SpriterHaxeEngine/2,2,0/spriter/library/TilemapLibrary.hx:5: characters 8-32 : Type not found : openfl.display.TilesetEx
/usr/local/lib/haxe/lib/SpriterHaxeEngine/2,2,0/spriter/library/TilemapLibrary.hx:22: characters 35-44 : Type not found : TilesetEx

OK I see where my mistake was I had not installed your custom library that contains SpriteTileset openfl-atlas.

Although I created an atlas and sprite sheet nothing renders either with BitmapLibrary or with SpreterTileset. Any pointers?

This is the code I am using to test:

import openfl.display.Sprite;
import starling.core.Starling;
import starling.display.Image;
import starling.textures.Texture;

import spriter.definitions.Quadrilateral;
import spriter.definitions.ScmlObject;
import spriter.definitions.SpatialInfo;
import spriter.engine.Spriter;
import spriter.engine.SpriterEngine;
import spriter.library.BitmapLibrary;
import spriter.library.TilemapLibrary;
import spriter.library.SpriterLibrary;

//import spriter.library.TilelayerLibrary;
import spriter.macros.SpriterMacros;
import spriter.vars.Variable;

import openfl.display.TilesetEx;
import openfl.display.SpriterTileset;


import openfl.Assets;
import openfl.display.Bitmap;
import openfl.display.BitmapData;
import openfl.display.PixelSnapping;
import openfl.display.Tileset;
import openfl.events.Event;


import Constants;

class RosView extends Sprite {
    public static final ROUTE_PATH = "/rosary";
    public var engine:SpriterEngine; 
    
   
    public function new() {
        super();

        var spriterRoot:Sprite = new Sprite();
        addChild(spriterRoot);

        var tileset:TilesetEx = new SpriterTileset(Assets.getBitmapData('assets/tiles/ros2.png'),Assets.getText('assets/tiles/ros2.xml'));
        //choose a rendering method.
        var lib = new TilemapLibrary([tileset], spriterRoot, 414, 736);


        //Create the engine.
        //you can specify a default scml or you can specify it later in addSpriter()
        engine = new SpriterEngine(Assets.getText('assets/ros2.scml'), lib );
                
        //Add a Spriter in the engine. A Spriter contains all data from the scml (all entities, animations, boxes, tags...)
        //By default, it will play the first animation of the first entity of your scml
        engine.addSpriter('rosary', x,  y);

        //Set the "run" animation of the entity
        engine.getSpriter('ros').playAnim('dec', myCallback);

        //Apply the "gun" map of the entity
        engine.getSpriter('rosary').applyCharacterMap('beadMap', true);


        //Update on enter frame to draw all Spriters on screen
        engine.update();
        

Sorry if it wasn’t clear enough to use openfl-atlas for the TilemapLibrary.
If you are using SpriterTileset that means that you have exported from my texturePacker exporter, right? Otherwise maybe SparrowTileset is a better fit.
Looks there is no log when the tileset doesn’t find your tile except when you compile with -Datlas_debug so maybe you can check that.

Well adding the debug helped and it explains why nothing is rendered. The log says that the asset does not exist. I have specified the path in the atlas xml as assets/1x/filename.png and simply 1x/filename.png and both say the file does not exist.

openfl/display/TilesetEx.hx:31: 1x/blueBead.png doesn't exist.

The file is in assets/1x/

I also places it relative to the xml in tiles/1x/*

no go.

Specifying the assets directory in the XML does nothing still says it does not exist. Is there a different place I should be specifying the location?

Eureka I got it to work using by using the changing it to SpriterLibrary like so:

var lib:SpriterLibrary = new SpriterLibrary('assets/',spriterRoot);

No image errors and the Spriter animation renders as expected. Hopefully this helps someone else if they are looking into this neat animation tool and thanks for the help Loudo.

1 Like

I’m glad you fix your issue. But your are using separated bitmaps now instead of Tilemap so it will end up less performant (bc more drawcalls). If you want to use an atlas, you can use the sparrow format or my own Spriter format that you can install on TexturePacker. I think there are free tools for the sparrow format. Just beware of your paths.

Tried using sparrow didn’t work or with any of the atlas files and libraries I tried. Luckily I don’t need high performance since the Spriter elements are mainly going to be used in very static forms as in 1 frame a time so smooth movement is not necessary.

I would like to see an example of what you are talking about however for future reference, specially since I have a dormant project I would like to get back to. I need to convert that project from dragon bones to Spriter using a sprite sheet with bones. Thanks again for the pointers in helping me figure out a way to get this to work!

DragonBones
It’s really weird that you didn’t find it. Have you really google it?

Yep, I was unable to find it. Links to the Mac/Windows application files were missing.

1 Like