esotericsoftware / spine-runtimes Goto Github PK
View Code? Open in Web Editor NEW2D skeletal animation runtimes for Spine.
Home Page: http://esotericsoftware.com/
License: Other
2D skeletal animation runtimes for Spine.
Home Page: http://esotericsoftware.com/
License: Other
Howdy,
I just updated to the new run-time and am having rendering issues on one of my Android devices. I should mention I've seen this happen before, but now it happens all the time.
The issue:
Most textures don't render. The ones that do seem to be running a very sluggish animation. On my LG, this happens all the time. On my Droid, it happens occasionally, so I'm wondering if there's some sort of synchronization or threading issue. I've also tested on a Kindle Fire and on Linux but haven't been able to reproduce it there.
See attached image showing the problem while running spineboy on LG with the following specs:
04-19 18:18:38.510: D/cocos2d-x debug info(28505): cocos2d: cocos2d-2.1rc0-x-2.1.2
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL_VENDOR: Qualcomm
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL_RENDERER: Adreno (TM) 200
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL_VERSION: OpenGL ES 2.0 1566933
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL_MAX_TEXTURE_SIZE: 4096
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL_MAX_TEXTURE_UNITS: 20
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL supports PVRTC: NO
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL supports BGRA8888 textures: NO
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL supports NPOT textures: YES
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL supports discard_framebuffer: NO
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: GL supports shareable VAO: NO
04-19 18:18:39.490: D/cocos2d-x debug info(28505): cocos2d: compiled with Profiling Support: NO
spine-as3\src\spine\animation\AttachmentTimeline.as(38): col: 29 Error: Call to a possibly undefined method setAttachment through a reference with static type spine:Slot.
I'm compiling with FlashDevelop for Flash Player 11.7 against Flex 4.6.0 and AIR 3.7
I get it when I do this call (I gotta say that I don't know if I'm doing it right, an example implementation would really help):
[Embed(source = "../spineboy.json", mimeType = "application/octet-stream")]
static public const SpineboyJson:Class;
var skeletonData:SkeletonData = new SkeletonJson().readSkeletonData(new SpineboyJson(), "spineboy");
Looks like Skeleton has the setAttachment method but Slot doesn't. Changing "setAttachment" to "attachment" as I thought you may have intended causes a different compiler error:
AttachmentTimeline.as(38): col: 29 Error: Attempted access of inaccessible method attachment through a reference with static type spine:Slot.
I would greatly appreciate if you could look into it 👍
hey guys,
I can't find any feature like this in Spine.
like spine-cpp/data/spineboy.atlas.
thx.
Hey Nate,
Forked the project and I am having the clock_gettime error discribed here:
http://esotericsoftware.com/forum/viewtopic.php?f=3&t=224&p=1112#p1112
Further more my Fork has the AnimationState working with the Example..
This was made possible by going back to LWJGL..but by removing the libjgfw the .project has changed.
please refer to my github for a review of the changes.
https://github.com/Disk1of5/spine-runtimes
Thanks!
Hi,
Problem Overview
We're doing stress testing with spine-tk2d. We are having difficulty hitting at least 30 fps on mobile devices with 100 spine animations running on spine-tk2d. Each animation has 46 quads/bones/segments.
Problem Specifics
We have a budget of 33ms per frame. According to the Unity profiler, the 100 spine animations consume more than this budget. The highest consuming function call is tk2dSpineSkeleton.Update(). See screenshot below:
This is a screenshot taken while testing with an iPod Touch 5th Gen. We get similar results with a Galaxy Nexus on Android. I am unable to run 25 animations to run on at least 30 fps on an HTC Desire HD. An iPad 2 can run 75 animations just fine (it can run 100 with just skeletons and no animations).
In this example, we have animations enabled. However, we noticed that even without animation, tk2dSpineSkeleton.Update gets called anyway, and consumes 1/3rd of a millisecond per object which is kind of large. tk2dSpineAnimation.Update by itself does not consume much.
Note: spine-unity has the same symptoms but with SkeletonComponent.Update
Optimization
There are two things we are looking into optimizing:
I am hoping that you can somehow help me with item 2, which is optimizing tk2dSpineSkeleton. Is there anything in the runtime that can use optimization, or is it already as optimized as it can get? I am not familiar with the innards of the runtime, so it would help a great deal if you can point me in the right direction.
I am also wondering if there it is possible to optimize spine animations themselves to make them easier for the runtime to play.
My objective here is to allow us to have more of the same animation without consuming the entirety of our 33ms/frame budget.
Thanks,
Justin
Im using c runtime,
if TexturePacker "Allow rotation" is used(and some images rotated), the image offset will be calculated wrong.
Since is one of the best android game development sdk, and it already supports texturepacker I think support for it should be added.
Thanks
I feel like everything was correct before this commit.
64fd34b
See: http://www.esotericsoftware.com/forum/viewtopic.php?f=3&t=624
tl;dr
Since the root bone is basically the origin of the skeleton, everything should flip around the root bone. I feel like 'flipping the root bone' doesn't really make sense. What are you flipping the root bone around? If you flip the root bone around the origin of the world (as it currently is), you mess up the positioning of the skeleton (as shown by SkeletonTest being broken).
I noticed that the Corona runtime doesn't declare self.boneIndex in any of the timelines.
Apparently Lua is forgiving of this? It seems like setting that property on the class is perfectly fine with it not defined?
I think the code would be a little bit easier for someone to follow if this were defined in the classes, even if it's not strictly necessary... thoughts?
Brighid:spine-corona terry$ grep -r boneIndex *
spine/Animation.lua: local bone = skeleton.bones[self.boneIndex]
spine/Animation.lua: local bone = skeleton.bones[self.boneIndex]
spine/Animation.lua: local bone = skeleton.bones[self.boneIndex]
spine/SkeletonJson.lua: local boneIndex = skeletonData:findBoneIndex(boneName)
spine/SkeletonJson.lua: if boneIndex == -1 then error("Bone not found: " .. boneName) end
spine/SkeletonJson.lua: timeline.boneIndex = boneIndex
spine/SkeletonJson.lua: timeline.boneIndex = boneIndex
Everything gets erased on Device Loss
Nothing changes if to change color of clots for spine-as3
In MixTest.java, line 54 and 55, I set scaleX and scaleY to 0.5f then run the application.
I expected the spineboy walk and jump at scale of 50%, however when he starts jump, he scales back to 100%.
Visual Studio compiles C files as C code, so we can't put C declarations in the middle of code block (for example line char* data = MALLOC(char, *length);
in file extensions.c
). We can explicitly specify to compile such files as C++ code and it resolves the problem, but this is little wrong.
I'm integrating the c++ runtime in my engine, and I've hit a problem when compiling for OS X.
The error looks like this:
/Users/gabo/slave/osx108/build/tmp/osx/ignifuga/cython_src/spine+json+json_writer.cpp:717: instantiated from here
/Users/gabo/slave/osx108/build/tmp/osx/ignifuga/cython_src/spine+json+json_writer.cpp:717: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]' but no definition available
/Users/gabo/slave/osx108/build/tmp/osx/ignifuga/cython_src/spine+json+json_writer.cpp: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]':
I've seen the issue mentioned on a few places (it seems to have happened with the QT code), I solved it with this patch: gabomdq@165b00f
Not sure if it's the optimal solution but at least it now compiles.
Using the Unity 3.5 runtime I get this message, and it seems that there is a missing Spince.cs file, instead there is the Place spine-csharp here.txt file.
in Atlas.c static int readLine(const char *begin, const char *end, Str *str);
do {
nextStart++;
} while (nextStart != end && *nextStart != '\n');
should be
while (nextStart != end && *nextStart != '\n')
{
nextStart++;
}
or it can't detect an empty line.
in spine-cocos2dx.cpp _Cocos2dxRegionAttachment_draw function
if (self->textureAtlas->getCapacity() <= skeleton->node->quadCount) {
if (!self->textureAtlas->resizeCapacity(self->textureAtlas->getCapacity() * 2)) return;
}
should be:
while (self->textureAtlas->getCapacity() <= skeleton->node->quadCount) {
if (!self->textureAtlas->resizeCapacity(self->textureAtlas->getCapacity() * 2)) return;
}
or the program crash when:
self->textureAtlas->getCapacity() -> 4
skeleton->node->quadCount -> 9
the runtimes can't handle more than 1 texture declare in *.atlas file
for example:
if there are two texture:
dragon.png
dragon2.png
declare in *.atlas
only the first one can be draw
Encounter error on vanilla run:
Runtime error: ...na\spine-runtimes-master\spine-corona\spine\Slot.lua:50: attempt to call method 'getAttachment' (a nil value)stack traceback:
[C]: in function 'getAttachment'
...na\spine-runtimes-master\spine-corona\spine\Slot.lua:50: in function'setToBindPose'
Is resolved by moving the getAttachment function in Skeleton.lua higher in the file so that it is defined when the skeleton is passed into Slot's constructor. (Not sure if this is the proper way to suggest a solution, still new to Github)
Hi there
Low priority but it is a nice way to manage dependencies
Only for C# and XNA runtimes
If anyone can verify this I can update with new version
<version>1.0.0</version>
<authors>Essoteric Software</authors>
<owners>Essoteric Software</owners>
<licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
<projectUrl>http://esotericsoftware.com/</projectUrl>
<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
I have the package ready to go with that info not sure if submitting (since I am not you ) is a good idea. and you cant remove the package...
Let me know
Any possibility of a runtime for easelJS / createJS?
I just started using Spine and ran into a few issues. I'm using cocos2d as my game engine.
There is a bug in SkeletonJson class toColor() method in AS3 runtimes.
The second parameter of substring() method is end symbol, not count of symbols:
function substring (start:Number=0, end:Number=2147483647) : String;
That's why, the toColor() method must return:
return parseInt(hexString.substring(colorIndex * 2, colorIndex * 2 + 2), 16) / 255;
istead of:
return parseInt(hexString.substring(colorIndex * 2, 2), 16) / 255;
and the same in starling runtime
When I include the libGDX runtimes in my project I receive 47 warnings about non-parameterized Array and ObjectMap calls, unused imports, leaks and non-used variables which are all easily fixable.
And hence cannot use CCAction such as CCFadeOut, CCBlink, CCTint... with CCSkeleton
SkeletornRenderer.cs line 77
Attachment attachment = slot.Attachment;
if (attachment is RegionAttachment) {
RegionAttachment regionAttachment = (RegionAttachment)attachment;
Would be better as...
RegionAttachment regionAttachment = slot.Attachment as RegionAttachment;
if (regionAttachment != null)
{
when you use the 'is' keyword under the covers the CLR is doing the same thing as the 'as' keyword then returning the bool of whether it is null. So by doing 'as' straight away you get rid of some redundant type conversions as well as the extra attachment variable.
Hi,
The animator of my team made an animation in which he used multiple skinAttachment and keyframes to switch between them. In the editor the animation play just fine but when launched in Starling there is no skinAttachment switches, slots images stay the same during the whole animation.
While looking through the SkeletonComponent class, I found something weird.
What is the float[] vertexPositions member for?
https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-unity/Assets/Plugins/Spine/SkeletonComponent.cs#L44
Hi there!
First off we love Spine! I am currently integrating the spine.js runtime in to our engine pixi.js and things seem to be going quite well! (http://www.goodboydigital.com/pixijs/examples/12/)
I came across a small bug when importing the dragon. It seems that the duration was coming out as NaN when being parsed.
I have narrowed it down to timeline.getFrameCount() returning a half value when the timeline name if "attachment"
else if (timelineName == "attachment") {
var timeline = new spine.AttachmentTimeline(values.length);
timeline.slotIndex = slotIndex;
var frameIndex = 0;
for (var i = 0, n = values.length; i < n; i++) {
var valueMap = values[i];
timeline.setFrame(frameIndex++, valueMap["time"], valueMap["name"]);
}
timelines.push(timeline);
console.log(timeline.getFrameCount()) /* returns 9.5 causing the next line to make duration a NaN */
duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);
}
I Fixed it by rounding the number but thought ou should be aware.
Keep up the great work!
_bones = new List(skeleton._bones.Count);
foreach (Bone bone in skeleton._bones) {
Bone parent = _bones[skeleton._bones.IndexOf(bone.Parent)];
_bones.Add(new Bone(bone, parent));
}
In some case: skeleton._bones.IndexOf(bone.Parent) return -1 so the _bones[skeleton._bones.IndexOf(bone.Parent)]; will throw System.ArgumentOutOfRangeException
My solution is just add some conditional, I tested it and it work :D
_bones = new List(skeleton._bones.Count);
foreach (Bone bone in skeleton._bones) {
if (bone.Parent == null) {
_bones.Add(new Bone(bone, null));
continue;
}
Bone parent = _bones[skeleton._bones.IndexOf(bone.Parent)];
_bones.Add(new Bone(bone, parent));
}
Thanks For Reading :D
in skeleton.c all find functions use == for comparing the strings, use strcmp(...,...)==0
Hi,
In BaseSkeleton.cpp on I'm a bit confused about this for statement:
for (int ii = 0; ii < boneCount; ii++) {
if (data->bones[ii] == slotData->boneData) {
bone = bones[ii];
break;
}
}
Specifically, It's not clear to me why you're assigning bones[ii] to bone here.
It seems like this should be data->bones[ii]... unless you're really doubling up and using ii to index into this->bones in the class?
Is this a bug, or am I just not understanding what you're doing here?
Thanks,
While testing the C/C++/SFML runtime I noticed that it runs fine on Win32 and my MacPro desktop but the graphics are corrupted on the MacBook Air with Intel integrated graphics. I'll append exact specs when I get on the laptop a bit later. I know SFML itself works and texturing does usually work so I suspect this is a GL flag issue I've run into in the past, a couple odd combinations seem to cause trashed texture data. I'll see if I can track it down a bit later when I get back onto the laptop.
Well, digging into the code, obviously your code doesn't fiddle with GL states directly. Hmph, strange. I wonder if it is some difference between tga and png though that doesn't make much sense since my other code uses both.
Getting warnings from unity on the "Animation" class name:
Script 'Animation' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.
maybe worth changing to SpineAnimation?
I'm trying to use boundingBox().containsPoint on ccskeleton except it doesn't work?
It seems at though the box has no area
the variable m_tContentSize that belongs to CCNode has to be set in CCSkeleton.cpp
I'm guessing you'll have to grab all the different parts and get the overall area.
As far as I know m_tContentSize increases with the Nodes scale aswell.
Hope you can help :)
Many Thanks
Martell
I think there's a possible memory bug in BaseAtlas::load:
The "page" variable is created uninitialized, and then we later check to see if it's non-NULL before ever touching it... seems like this could be a potential hazard.
void BaseAtlas::load (const char *current, const char *end) {
if (!current) throw invalid_argument("current cannot be null.");
if (!end) throw invalid_argument("end cannot be null.");
string value;
string tuple[4];
BaseAtlasPage *page;
while (current != end) {
readLine(current, end, value);
trim(value);
if (value.length() == 0) {
page = 0;
} else if (!page) {
Hi Guys I have put your SFML sample into a cmake project
making this repo a submodule along with SFML.
So that everyone can see the sample running
http://github.com/martell/SpineSFMLSample
Hope you like (PS I only wrote the cmake script)
Many Thanks
Martell Malone
CTO Atom Split Games
There are some problems (with premultipliedAlpha i think). For the same atlas the view differs for as3-starling and c#-unity runtimes. It's correct probably for c# runtime.
And one more thing, as I understood, if to load texture from bitmap, the premultipliedAlpha is always true for it. Why is it so?
I put up an demonstration of the problem here: http://gonzogamesdev.com/tk2d_spine_bug/ with spine-unity and spine-tk2d runtimes rendering the same animated skeleton side-by-side.
The vertices of the quad for the wings (an attachment) on spine-tk2d do not animate:
I tried out the runtime for LÖVE, and got the following error message when running the included example file:
Error: spine-love/spine.lua:86: attempt to index local 'image' (a userdata value)
stack traceback:
spine-love/spine.lua:86: in function 'draw'
main.lua:55: in function 'draw'
[string "boot.lua"]:410: in function <[string "boot.lua"]:373>
Quick notes: I did put the spine-lua folder inside the spine-love folder, and I'm using the 64 bit windows version of LÖVE 0.8.0
When calling skeleton:findSlot("slotname") I get an error for attempting to index a nil value. I'm not sure if this is just me being me and calling it wrongly or something that is not supposed to happen.
Hi Nate,
In QT the words signals and slots are reserved but you are slots in.
SkeletonData.h in the SkeletonData typedef on line 43
SlotData** slots;
Suggestions or Compromises on a name?
Many Thanks Martell
Hi,
There seems to be a segfault in Atlas.c in Atlas_dispose (running in cocos2d-x). Here's the backtrace:
0x00000000004976f0 in Atlas_dispose (self=0x227b3a226e696b73) at ../../../libraries/spine-runtimes/spine-c/src/spine/Atlas.c:300
300 AtlasPage* page = self->pages;
(gdb) backtrace
#0 0x00000000004976f0 in Atlas_dispose (self=0x227b3a226e696b73) at ../../../libraries/spine-runtimes/spine-c/src/spine/Atlas.c:300
#1 0x000000000049c64f in spine::CCSkeleton::~CCSkeleton (this=0x11a4530, __in_chrg=<optimized out>) at ../../../libraries/spine-runtimes/spine-cocos2dx/src/spine/spine-cocos2dx.cpp:129
#2 0x000000000049c6c2 in spine::CCSkeleton::~CCSkeleton (this=0x11a4530, __in_chrg=<optimized out>) at ../../../libraries/spine-runtimes/spine-cocos2dx/src/spine/spine-cocos2dx.cpp:131
#3 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x11a4530) at ../cocoa/CCObject.cpp:86
#4 0x00007ffff79d2bbc in cocos2d::ccArrayRemoveAllObjects (arr=0x128c7f0) at ../support/data_support/ccCArray.cpp:186
#5 0x00007ffff79d25a2 in cocos2d::ccArrayFree (arr=@0x12ab148: 0x128c7f0) at ../support/data_support/ccCArray.cpp:52
#6 0x00007ffff795be31 in cocos2d::CCArray::~CCArray (this=0x12ab130, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:379
#7 0x00007ffff795be90 in cocos2d::CCArray::~CCArray (this=0x12ab130, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:380
#8 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x12ab130) at ../cocoa/CCObject.cpp:86
#9 0x00007ffff7951c7d in cocos2d::CCNode::~CCNode (this=0x12ad690, __in_chrg=<optimized out>) at ../base_nodes/CCNode.cpp:136
#10 0x00007ffff7955271 in cocos2d::CCNodeRGBA::~CCNodeRGBA (this=0x12ad690, __in_chrg=<optimized out>) at ../base_nodes/CCNode.cpp:1278
#11 0x00007ffff79b4952 in cocos2d::CCSprite::~CCSprite (this=0x12ad690, __in_chrg=<optimized out>) at ../sprite_nodes/CCSprite.cpp:302
#12 0x00007ffff79b49a6 in cocos2d::CCSprite::~CCSprite (this=0x12ad690, __in_chrg=<optimized out>) at ../sprite_nodes/CCSprite.cpp:305
#13 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x12ad690) at ../cocoa/CCObject.cpp:86
#14 0x00007ffff79d2bbc in cocos2d::ccArrayRemoveAllObjects (arr=0x105a880) at ../support/data_support/ccCArray.cpp:186
#15 0x00007ffff79d25a2 in cocos2d::ccArrayFree (arr=@0x11a6d88: 0x105a880) at ../support/data_support/ccCArray.cpp:52
#16 0x00007ffff795be31 in cocos2d::CCArray::~CCArray (this=0x11a6d70, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:379
#17 0x00007ffff795be90 in cocos2d::CCArray::~CCArray (this=0x11a6d70, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:380
#18 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x11a6d70) at ../cocoa/CCObject.cpp:86
#19 0x00007ffff7951c7d in cocos2d::CCNode::~CCNode (this=0x11a6c10, __in_chrg=<optimized out>) at ../base_nodes/CCNode.cpp:136
#20 0x00007ffff79e0a62 in cocos2d::CCParallaxNode::~CCParallaxNode (this=0x11a6c10, __in_chrg=<optimized out>) at ../tilemap_parallax_nodes/CCParallaxNode.cpp:59
#21 0x00007ffff79e0ab6 in cocos2d::CCParallaxNode::~CCParallaxNode (this=0x11a6c10, __in_chrg=<optimized out>) at ../tilemap_parallax_nodes/CCParallaxNode.cpp:66
#22 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x11a6c10) at ../cocoa/CCObject.cpp:86
#23 0x00007ffff79d2bbc in cocos2d::ccArrayRemoveAllObjects (arr=0xb545b0) at ../support/data_support/ccCArray.cpp:186
#24 0x00007ffff79d25a2 in cocos2d::ccArrayFree (arr=@0x12949e8: 0xb545b0) at ../support/data_support/ccCArray.cpp:52
#25 0x00007ffff795be31 in cocos2d::CCArray::~CCArray (this=0x12949d0, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:379
#26 0x00007ffff795be90 in cocos2d::CCArray::~CCArray (this=0x12949d0, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:380
#27 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x12949d0) at ../cocoa/CCObject.cpp:86
#28 0x00007ffff7951c7d in cocos2d::CCNode::~CCNode (this=0x128d360, __in_chrg=<optimized out>) at ../base_nodes/CCNode.cpp:136
#29 0x00007ffff797569c in cocos2d::CCLayer::~CCLayer (this=0x128d360, __in_chrg=<optimized out>) at ../layers_scenes_transitions_nodes/CCLayer.cpp:59
#30 0x00007ffff7976660 in cocos2d::CCLayerRGBA::~CCLayerRGBA (this=0x128d360, __in_chrg=<optimized out>) at ../layers_scenes_transitions_nodes/CCLayer.cpp:501
#31 0x00007ffff7976f95 in cocos2d::CCLayerColor::~CCLayerColor (this=0x128d360, __in_chrg=<optimized out>) at ../layers_scenes_transitions_nodes/CCLayer.cpp:641
#32 0x000000000049f313 in Evolution::~Evolution (this=0x128d360, __in_chrg=<optimized out>) at ../Classes/Evolution.h:9
#33 0x000000000049f350 in Evolution::~Evolution (this=0x128d360, __in_chrg=<optimized out>) at ../Classes/Evolution.h:9
#34 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x128d360) at ../cocoa/CCObject.cpp:86
#35 0x00007ffff79d2bbc in cocos2d::ccArrayRemoveAllObjects (arr=0x117a2f0) at ../support/data_support/ccCArray.cpp:186
#36 0x00007ffff79d25a2 in cocos2d::ccArrayFree (arr=@0x117ac58: 0x117a2f0) at ../support/data_support/ccCArray.cpp:52
#37 0x00007ffff795be31 in cocos2d::CCArray::~CCArray (this=0x117ac40, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:379
#38 0x00007ffff795be90 in cocos2d::CCArray::~CCArray (this=0x117ac40, __in_chrg=<optimized out>) at ../cocoa/CCArray.cpp:380
#39 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x117ac40) at ../cocoa/CCObject.cpp:86
#40 0x00007ffff7951c7d in cocos2d::CCNode::~CCNode (this=0x128a810, __in_chrg=<optimized out>) at ../base_nodes/CCNode.cpp:136
#41 0x00007ffff79795e6 in cocos2d::CCScene::~CCScene (this=0x128a810, __in_chrg=<optimized out>) at ../layers_scenes_transitions_nodes/CCScene.cpp:39
#42 0x00007ffff7979618 in cocos2d::CCScene::~CCScene (this=0x128a810, __in_chrg=<optimized out>) at ../layers_scenes_transitions_nodes/CCScene.cpp:41
#43 0x00007ffff7958f3d in cocos2d::CCObject::release (this=0x128a810) at ../cocoa/CCObject.cpp:86
#44 0x00007ffff79d2bbc in cocos2d::ccArrayRemoveAllObjects (arr=0x8253f0) at ../support/data_support/ccCArray.cpp:186
#45 0x00007ffff795bbf4 in cocos2d::CCArray::removeAllObjects (this=0xb568e0) at ../cocoa/CCArray.cpp:315
#46 0x00007ffff79fc4fa in cocos2d::CCDirector::purgeDirector (this=0xb3b9a0) at ../CCDirector.cpp:637
#47 0x00007ffff79fd526 in cocos2d::CCDisplayLinkDirector::mainLoop (this=0xb3b9a0) at ../CCDirector.cpp:959
#48 0x00007ffff79a9127 in cocos2d::CCApplication::run (this=0x7fffffffde80) at ../platform/linux/CCApplication.cpp:53
To reproduce, here's some of my code:
...
Atlas* atlas = Atlas_readAtlasFile("bird_all.atlas");
SkeletonJson* skeletonJson = SkeletonJson_create( atlas );
SkeletonData* skeletonData = SkeletonJson_readSkeletonDataFile(skeletonJson, "skeleton.json");
AnimationStateData* animationStateData = AnimationStateData_create( skeletonData );
CCSkeleton* skeletonNode;
for( int i = 0; i < 1; ++i )
{
skeletonNode = CCSkeleton::create(skeletonData, animationStateData );
skeletonNode->setSkin( "bird_red" );
skeletonNode->setSlotsToBindPose();
skeletonNode->setAnimation("animation_test_0", true);
skeletonNode->timeScale = 0.8f;
skeletonNode->setPosition(ccp(windowSize.width / 3 * 2, parentNode->getContentSize().height/2 + i*5));
parentNode->addChild(skeletonNode);
skeletonNode = CCSkeleton::CCSkeleton::create(skeletonData, animationStateData );
skeletonNode->setSkin( "bird_orange" );
skeletonNode->setSlotsToBindPose();
skeletonNode->setAnimation("animation_test_0", true);
skeletonNode->timeScale = 0.5f;
skeletonNode->setPosition(ccp(windowSize.width / 3, parentNode->getContentSize().height/2 - 20 + i*5));
parentNode->addChild(skeletonNode);
}
....
The segfault happens when closing the application, causing the destructors to be issued. I'm testing in linux and simply closing the window. I imagine this will be a more a significant bug on mobile when the background process decides to shutdown the app - potentially popping up an error message, etc.
Thanks!
Hi,
I notice the latest code for libgdx, when I call .setFlipX(true), it doesn't show up the skeleton/sprite.
I managed to the issue, could someone take a look and verify the following workaround ?
Edit the file libgdx/src/com/esotericsoftware/spine/Bone.java
(line number 81)
Change :-
worldX = flipX ? -x : x;
worldY = flipY ? -y : y;
to :-
worldX = x;
worldY = y;
There is a bug in SkeletonJson class readAnimation() method. When trying to read timeline color.
for each (var valueMap2:Object in values2) {
var color:String = valueMap["color"];
var r:Number = toColor(color, 0);
var g:Number = toColor(color, 1);
var b:Number = toColor(color, 2);
var a:Number = toColor(color, 3);
timeline2.setFrame(frameIndex2, valueMap2["time"], r, g, b, a);
readCurve(timeline2, frameIndex2, valueMap);
frameIndex2++;
}
Instead of:
var color:String = valueMap["color"];
must be:
var color:String = valueMap2["color"];
I'm trying to learn more about how the runtimes work (with a view to writing a c# MonoGame runtime). As such I'm looking closely at the libgdx implementation and I see what looks like a bug. Both switch statements are returning the same thing. Is this a bug, or is it that the regionSequence is to be implemented in the future?
switch (type) {
case region:
attachment = new RegionAttachment(name);
break;
case regionSequence:
attachment = new RegionAttachment(name);
break;
I've been doing some tests with retina support and the cocos2d-iphone lib. I renamed the "spineboy.png" and "spineboy.atlas" to "spineboy-ipadhd.png" and "spineboy-ipadhd.atlas" and ran it on a retina iPad. It worked, but it looks exactly the same - but not 50% of the size as I expected.
Does this have to do with the height/widths defined in "spineboy.json"?
Assuming you aren't planning on having a retina version of "spineboy.json", should the bones be automatically scaled as they are added when running on a retina device (and retina textures are available).
The C++ runtime is missing a variable name in the BaseAtlas header... not a huge deal, but I had to go hunting for it while building my Python runtime.
includes/spine/BaseAtlas.h: virtual BaseAtlasRegion* newAtlasRegion (BaseAtlasPage*) = 0;
This looks like it should be "BaseAtlasPage* page".
Hi Nate, I posted this in the Starling forum, but I just realized that this was probably the proper place to post. Sorry!
Anyhow, the summary of the problem I've encountered is that if I don't trim the sprites in texture packer, everything works fine but if I trim them, they get shifted wildly out place.
I dug into the Starling runtime classes a bit and if you set
attachment.regionOffsetX = 0;
attachment.regionOffsetY = 0;
in StarlingAtlasAttachmentLoader.newAttachment()
everything works except flipped images which get stretched out shape.
I can't figure out why the images would get stretched out of shape though because all your logic looks sound.
Right now, it looks like the SFML API uses the generic C runtime. Is there a reason for this? Is there a possibility of porting it to the generic C++ runtime?
Issue:
ARC disallows the use of id types in structs. This can not be circumvented by disabling ARC for just the spine files (via -fno-objc-arc) because the structs are declared in the spine-cocos2d-iphone.h header.
Simple fix:
Move the 3 structs (Cocos2dAtlasPage, Cocos2dSkeleton, Cocos2dRegionAttachment) to the implementation file (spine-cocos2d-iphone.m) since the structs aren't references in the header. Then at least you can compile the runtime with -fno-objc-arc
This is what my .m file now looks like:
#include <spine/spine-cocos2d-iphone.h>
#include <spine/extension.h>
#ifdef __cplusplus
namespace spine {
extern "C" {
#endif
typedef struct {
AtlasPage super;
CCTexture2D* texture;
CCTextureAtlas* atlas;
} Cocos2dAtlasPage;
/**/
@class CCSkeleton;
typedef struct {
Skeleton super;
CCSkeleton* node;
} Cocos2dSkeleton;
/**/
typedef struct {
RegionAttachment super;
ccV3F_C4B_T2F_Quad quad;
CCTextureAtlas* atlas;
} Cocos2dRegionAttachment;
#ifdef __cplusplus
}
#endif
void _Cocos2dAtlasPage_dispose (AtlasPage* page) {
….
Currently enabling and disabling certain gameObjects at runtime so they don't do anything unnecessary like respond to the engine's Update() calls when not in use.
Based on the error log, I'm getting an array size mismatch with the mesh vertices and the color/uv arrays. This happens a lot.
I don't fully understand how the new optimizations work or if that has anything to do with this at all (I have a suspicion it doesn't), so I can't really tell what's happening right now. Here's a stack trace thing:
Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_uv(Vector2[])
SkeletonComponent:Update() (at Assets/Plugins/Spine/SkeletonComponent.cs:167)
SkeletonComponent:OnEnable() (at Assets/Plugins/Spine/SkeletonComponent.cs:172)
UnityEngine.GameObject:SetActive(Boolean)
TrailPiece:SpawnNew(Vector3, SkeletonAnimation, Vector3) (at Assets/objects/Zero/Scripts/TrailPiece.cs:29)
It really only seems to happen when an object with a SkeletonComponent gets enabled from the disabled state.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.