jeremyjh
-
Posts
6 -
Joined
-
Last visited
Content Type
Forums
Store
Gallery
Downloads
Posts posted by jeremyjh
-
-
7 hours ago, lucid said:
@jeremyjh Does it have no effect at all, or just not the desired effect? If it has no effect, make sure you're setting those values before you initialize the SpriterModel object as it reverses the values upon loading.
I played with it some more. The pivot setting actually does work as expected and I can remove my manipulation. But I get very jumbled output when I change the reverseYOnLoad to false. I do not simply see signs are reversed; I inserted some debug code and I get very different values for y when I change this to false.
These are some values from the first frame when it is true:
QuoteResources/GreyGuy/arms/p_arm_idle_a.png, y:-131.465888
Resources/GreyGuy/arms/p_forarm_walk_a.png, y:-107.752874
Resources/GreyGuy/hands/p_hand_a.png, y:-85.028443
Resources/GreyGuy/legs/p_thigh_a.png, y:-63.344628
Resources/GreyGuy/legs/p_leg_a.png, y:-44.117789And when it is false:
QuoteResources/GreyGuy/arms/p_arm_idle_a.png, y:-47.570174
Resources/GreyGuy/arms/p_forarm_walk_a.png, y:-27.821273
Resources/GreyGuy/hands/p_hand_a.png, y:-4.113247
Resources/GreyGuy/legs/p_thigh_a.png, y:13.048759
Resources/GreyGuy/legs/p_leg_a.png, y:35.245458The animation only looks correct if I set it to true and then reverse the sign in render.
-
I was also not able to get these settings to work, Cocos2d-X also does not call for Y inverted, regardless of how I set those global variables I have to have code like the following to invert the y position and revert the y position on the (Pivot):
sprite->setPosition(float(spriteInfo->getPosition().x), -float(spriteInfo->getPosition().y)); sprite->setAnchorPoint(cc::Vec2(float(spriteInfo->getPivot().x), 1.0f - float(spriteInfo->getPivot().y)));
-
Are triggers a supported feature yet? If so I am kind of confused by them, it seems playEventTriggers() will play the triggers every time its called, regardless of if we've reached that point in the animation. playTrigger() is getting called every tick.
-
-
I've started an integration of SpriterPlusPlus into Cocos2d-X, a new library called Spriter2dX. It does not yet have much platform support (only tested with CMake for Linux) but I will be adding that as I finish integrating this into the game I am developing. I expect to have Android done very soon, other platforms may follow and of course I'll take pull requests for them.
I found this pretty easy to do, I think SpriterPlusPlus has a pretty good design for extension points. Cocos2d-X has a very different rendering system than for example SFML - so the ImageFile override had to work considerably differently. In Cocos2dX we don't just render a sprite to the screen, instead each object on the screen has a persistent object in a scene graph which will get rendered in a batch. So to work in the SpriterPlusPlus model I have each CCImageFile manage a pool of cocos2d::Sprite objects that it will position for a single tick. I have an example where I
portedshamelessly robbed SpriterPlusPlus's example and its able to run 100 Grey Guy animations at about 50 fps on my laptop, haven't tried it with a real GPU.
SpriterPlusPlus - a C++ Spriter implementation
in Spriter Implementations
Posted
Yes if the transformation code implicitly assumes an inverted Y axis. I can't quite think why it would matter. But that seems to be what is happening.