I experiment with framework to do skeleton animation recently and finally found a good tool to use which is Spriter (http://www.kickstarter.com/projects/539087245/spriter/posts/335554). In fact I knew this for the time it’s launched but not pay much attention to it back then.
Then I started to look around the web for a framework to be able to work with that tool in cocos2d-x.
First I found this https://github.com/talentless/spriter-cocos2d which the framework is kind of solid in its sense (although the author noted in the source code that it’s kind of dirty of implementation) and think right away that I should port this into c*+ unless no one else already done it.
Fortunately I found that https://github.com/young40/Spriter-Cocos2d-X has done the job. The latest source code used cocos2d-x 2.0.2 and is a port version from spriter-cocos2d project I mentioned.
So enough of the story.
My question is that after tested the framework, I’ve found a problem and in need for ideas or suggestion to make the sprite flip as the implementation should be based from that project itself.
I target to make flipping in x-axis works first as in y-axis is not in priority but if x-axis works y-axis should not be too difficult.
I’ve tested it by adding a setter method to modify the flipping flag of each individual CCSprite inside SpriterNode , but the result is not as expected due to the way each sprite positioned relative to the some point . Thus when you flip, it just positions there but only flip the image. This behavior is correct in the sense of single sprite as we all do most of the time. But when in the situation like this that we have multiple of sprites to represent a character, it’s not the same.
- Any ideas* suggestion on how to implement it would be great.
- Anyone uses this framework + Spriter tool and found any better solution to make it works on cocos2d-x, I would love to hear it as well.