Cocos2d-x homemade tool 05: cocos2d-x runtime for Spriter animation Editor

Source: Internet
Author: User

Spriter animation editor is a good editor that emerged last year. It is written using Qt and cross-platform. However, the post-project update speed is not very fast, and the bone system always has some problems. It was surpassed by Spine at the end of last year and at the beginning of this year.


In all fairness, the Spriter editor is a very good tool with unique features and interfaces. Through understanding with colleagues who use Spine, the Spine skeleton is still good, but it is not very convenient to do slice animation. In fact, most of the animations are slice.


I did this library before, but it has never been released. I was planning to create a comprehensive animation library to support all the animation data in the editor. Later I found that the workload was unexpected, so I gave up. It is provided here for your reference. Spriter should be free of charge till now. For common users, it is good to use this editor for slicing. Bone needs people with animation basics to be able to play well.


Using the MIT protocol, you can freely use it. This database has previously referred to the dr_watson database, but has undergone large-scale reconstruction and the architecture has completely changed, adding a large number of interfaces.


This library has the following features:

1. Supports plist text output by texturepacker

2. runAction running mode, supporting complex CCSequence CCRepeatForever

3. Custom running time, supporting CCSpawn

4. Supports frame lock to save CPU usage

5. Separated animation data from playback data, supporting animation data caching

6. You need to control the texture cache by yourself. The file name interface is provided.


In addition, I use pugixml in the Code. This is a very good xml parsing library with very friendly interfaces and good speed.


I would like to express my gratitude to several authors.


Below are various tests in VS2010


Monster animation test:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224VE2-0.jpg "style =" float: none; "title =" 1 "/>


Main Character Animation test:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224U094-1.jpg "title =" 6 "style =" float: none; "/>


CCSequence test: 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224S029-2.jpg "style =" float: none; "title =" 2 "/>


CCSpawn test:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224WT8-3.jpg "title =" 7 "style =" float: none; "/>


60 frame playback efficiency test:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224T041-4.jpg "style =" float: none; "title =" 3 "/>


Test the playback efficiency of locking at 24 frames:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224R948-5.jpg "style =" float: none; "title =" 4 "/>


Comparison and test of 60-frame playback and 24-frame playback:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/06224S144-6.jpg "style =" float: none; "title =" 5 "/>


You have time to complete the code. In fact, the example is clearly written.








This article is from the "Old G hut" blog, please be sure to keep this source http://4137613.blog.51cto.com/4127613/1285978

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.