• Runtimes
  • How to run Spine 2.1.27 files in latest Spine runtime

I work in a small company that uses Spine software and Spine runtime provided in the cocos2d-x that we utilize.

All Spine files (json, atlas, png) in our app have been prepared using Spine 2.1.27. From the app perspective, we have been using Spine runtime 2.3, till now. Recently we decided to update the cocos2d-x engine and that update introduces an upgrade of old Spine runtime from 2.3 to 3.5.35.

Unfortunately, after the upgrade of the Spine runtime, creating a skeleton objects crashes the app. The Spine object is not able to read Skeleton data - spSkeletonJson_readSkeletonDataFile returns NULL.

I was trying to import the JSON file in Spine software 3.6.48 to re-export it, but the Spine 3.6 can't import it.

So my questions are:

  1. Is it possible to convert Spine files (json, atlas, png) to make them support the latest Spine?
  2. Was there a backward non-compatible Spine upgrade somewhere between 2.3 and 3.5?
  3. What's are best practices for working with Spine files? The idea of recreating all Spine files on every non-compatible backward Spine upgrades doesn't seem to be rational.

Thanks in advance for any hints.

Related Discussions
...
  • Düzenlendi

Exports from Spine 2.1.27 will not work with a runtime other than the one compatible with the 2.x branch of Spine. You will either have to stick to the old runtime, or upgrade your Spine projects to the Spine version of your runtime. We have a guide on Spine editor and runtime version management here Spine editor and runtime version management

  1. Yes, altough some manual intervention may be necessary. E.g. Spine 2.x had a flip x/y feature which was since replaced by non-uniform scaling.
  2. Yes, many in fact.
  3. See Spine editor and runtime version management

Please post the JSON files that fail to import in 3.6.48 (contact@esotericsoftware.com if you can't share them publicly). You may also try to open the original .spine files instead of the .json files in the latest Spine editor.

badlogic yazdı

Please post the JSON files that fail to import in 3.6.48 (contact@esotericsoftware.com if you can't share them publicly).

TBH @badlogic we are going to switch now to 3.5.35, not 3.6.48. We will switch to 3.6.48 in a month or two, I guess (with the next release of the cocos2d-x engine).

Sample files that don't work in Spine runtime 3.5.35:
foreground.json
ch_bagster_character.json
moon_character.json

badlogic yazdı

You may also try to open the original .spine files instead of the .json files in the latest Spine editor.

During opening the .spine file, I get a warning information. We have lots of Spine animations in the app, so we would prefer to automate it (like import&export using Spine command line tool), or hack the assets to make them work with the latest Spine runtime.

badlogic yazdı

altough some manual intervention may be necessary. E.g. Spine 2.x had a flip x/y feature which was since replaced by non-uniform scaling

Is there any topic or wiki page that I can treat as a reference for changes made in consecutive Spine versions. Or maybe some topic/wiki page with guidelines about to converting old spine JSONs to support the latest runtime?

BTW I'm having some issues with Spine on Mac OS Sierra with opening the Spine app, especially after downgrading the engine to the old version. I have to kill the app, clean all Spine config/cache files and then start again with the latest version. Same things seems to work fine on our animator computer running on Windows 10

OK, all your JSON files are for Spine version 2.1.17. There is no way to use them with a runtime version > 2.1.17. You will have to the .spine files into the Spine Editor version you want to use (3.5.35 as I understood), fix up all reported issues (the warnings, e.g. flip x/y does not exist anymore and has to be changed to scaling manually), and re-export.

Importing JSON files into the editor via "Import Data" only works for JSON files that have the same version as the editor. You can not import JSON files with version 2.1.17 into the editor version 3.5.35.

I'm afraid there's no automated way to perform the conversion between versions. I also strongly recommend sticking to one version of Spine for production.