Sep 26, 2020
Animation with Dragon Bones —
There are many variants to create a skeletal animation but almost all of them are paid and so not available for educational purposes. In this article we’ll work with Dragon Bones, that’s a free, but a bit weird tool.
The Dragon Bones has decent functionality and it’s free. To be presise the editor itself is free as in beer (closed sources) but the code for integrating models into cocos2d-x is distributed under MIT license.
…
Sep 25, 2020
Animation —
There are two kinds of animation:
- frame (spreadsheet) animation: the graphical designers create a series of frames and Cocos2d draws them one by one using Animation and Animate classes. The Animate is a subclass of Action, so it will be easy to use.
- Skeletal animation: a model of the character is created with some special programs and then gets imported to Cocos2d. There is another post about it.
…
Sep 25, 2020
How to remove objects —
Since we already know about actions and other basic things, now we can think about correct memory usage.
To illustrate it we’ll create a simple scene with one sprite and one button. After pressing the button the sprite will out of the scene and then it should be removed somehow.
…
Sep 25, 2020
Advanced usage of CC_CALLBACK —
In the previous article about callbacks I’ve said that the number in the CC_CALLBACK_* macro means the amount of parameters need for called function. That wasn’t exactly true because the C++ magic allows to do a one more trick here.
…
Sep 25, 2020
Advanced actions —
The previous article described how to use Action to move the objects. Now we’ll learn how to do more complicated stuff.
…