Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by xiemakeinu

  1. If anyone is searching for the original zip file, I've uploaded a copy of the code to http://www.greatergoodgames.org/CCSpriter.zip
  2. Well, supporting a number of those features actually went by pretty quickly. I don't plan on improving this for the next few weeks/months, except for any bugs that need fixing. The only thing from my list that I haven't implemented is the Plists support, as I'm not going to need that for a while. Here's a list of what I have done: [*:6jyn9yxw]Added support for z index changes [*:6jyn9yxw]Added support for parent changes [*:6jyn9yxw]Added support for default file defined pivots [*:6jyn9yxw]Added support for adding/removing sprites and bones during animation [*:6jyn9yxw]Added support for nodes without animation [*:6jyn9yxw]Added memory cleanup on destroy If you encounter any bugs, please let me know. Also, if you could attach an example SCML file that exemplifies the bug, I'll do my best to fix it quickly. CCSpriter.zip
  3. Hello all. I wanted to implement Spriter into Cocos2d-x 2.2.2, so I scoured these forums and the internet, but wasn't too happy with the results. Generic C++ implementations and old Cocos2d-x implementations that weren't really set up to do things the "Cocos2d-x" way, meaning they weren't fully utilizing the CCNode hierarchy for transforms. I'm still working on this thing, but I wanted to go ahead and share it in its current state. Simple sprite and bone animations are functional: translation, rotation, scale, and colorizing. Please note that some of the files in the attached archive need to be merged into the existing engine code. Also, for some reason unbeknownst to me, Cocos2d-x is set up to use reversed rotations(positive being clockwise), which I decided to change at the core level of the engine. Obviously this could break a lot of the built in tools, so some of you may want to just inverse the rotations in the Spriter implementation instead. You can use this implementation like you do anything else in Cocos2d-x: CCSpriter* spriterTest = CCSpriter::create("anim/player/Player.scml"); spriterTest->setPosition(CCPointMake(512.0f, 384.0f)); addChild(spriterTest, 5); My future plans for this are: [*:1jditbpz]Add support for zindex [*:1jditbpz]Add support for parent swapping [*:1jditbpz]Add support for texture swaps(may already work, needs testing) [*:1jditbpz]Add support for default file defined pivots [*:1jditbpz]Add support for adding/removing sprites and bones during animation [*:1jditbpz]Add support for plists Not sure how much further I'm going to go with it beyond that, but this should lay a good groundwork for someone to make it "fully featured". Because this is loosely based on work done by BruceWang and 568083142 on this forum, which was based on work done by James Hui (a.k.a. Dr.Watson), I've stuck with the BSD License. CCSpriter.zip
  • Create New...