Jump to content

jeremyjh

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jeremyjh's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. 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.
  2. 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: And when it is false: The animation only looks correct if I set it to true and then reverse the sign in render.
  3. 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)));
  4. 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.
  5. I think this is a good idea @lucid - I will give it a try as I think it will be cleaner code and may also make certain features easier should I decide to try to implement them, such as integrating the Cocos2d Physics system.
  6. 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 ported shamelessly 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.
×
×
  • Create New...