Animation origin points not being respected

Spiderguts

  • Posts: 38
When changing the origin point of an animation, whether custom or otherwise, the expected behaviour is that it makes a difference to where the animation is being drawn.  The actual behaviour is, sometimes it does, sometimes it doesn't.  Even if it does, it's never to the extent expected; i.e. changing the origin point from 'top left' to 'top right' only move the animation a few pixels over, as opposed to the width of the animation frame.

The fix is of course to have all animation frames the same size. That's only practical for games done in an 8bit style, where pixellation is expected.


Spiderguts

  • Posts: 38
EDIT:

I've managed to cobble together something that works, though requires a lot of brute force trial-and-error, and identified a couple of key issues that make it difficult, that hopefully might help others out:

1. It's difficult to visualize the effect of moving a centerpoint. Because we're moving the centerpoint of an actor relative to its screen position, adding to the x axis will make the actor appear to move to the left, while subtracting from the x axis will make it appear to move to the right. Conversely, adding to y moves it up, subtracting from y moves it down.

2. The larger the animation frame size, the more difficult it is to line up different animations by manipulating their centerpoints. In a 32x32 sprite it's easy; but on full iPad3 retina resolution, sprites can be hundreds of pixels wide. It requires a lot of trial and error as there is no way to visualize the relative positions of the animations.

3. Stencyl will allow a user to input a negative value into the x and y fields, but it will treat this value as 0. So, if you need to move an animation to, say,  -100 on the x-axis, you'll need to enter 0 instead, and add 100 to x on all the other animations.

So, the as it turns out, the only real bug here is #3: a user should not be permitted to enter a value that isn't going to be recognized.

I'd prefer to present this as a feature request instead: for games with large numbers of animations, a way to visualize or at least preview relative animation offsets would be EXTREMELY useful, in my case saving literally days of work (not an exaggeration, we have a lot of animations for multiple characters). A system where the user can view the first frame of every animation layered on top of one another, then instead of tweaking centerpoint values, just moves the images until they appear to line up.

Mods, please feel free to move this post from the bugs section into the suggestion box!