Wednesday, July 11, 2012

Frame.flipX()

If you look closely at the animation in last week's post, you'll note that there's something slightly odd with Dumblador's turn back. He's not doing a mirrored animation: position of the "body" against feet has changed, feet order isn't the same, and so on. That's because I just flipped the body and kept the feet animation identical from "walk left" to "walk right". Not out of laziness, but out of proper tool to do that.

It's now an experimental feature: holding (L) while touching the "flip horizontally" button doesn't flip the current limb, but the whole frame. Press UP/DOWN and apply it again on the next frame until you've flipped the whole animation, and dumblador will now walk the other way with a convincing animation.


Quelques ajustements, un petit mode "shift-click" supplémentaire sur un bouton, et me voilà (enfin) capable de retourner toute une animation dans AnimEDS ... et donc de faire marcher Bilou aussi bien vers la gauche que vers la droite. Ça n'aura pas été sans mal de tout peaufiner, notamment la position du "rectangle de collision" qui provoquait des plantages sans appels ici et là >_<

I'll still have to think about the appropriate way to do that with the interface, and then automate the process of flipping a whole animation... for instance through those "apply to this..last" or "apply to first..this" buttons.

What's funny about it is that I started an over-complicated version, and then squeezed it into a much simpler approach because I had forgot that the TIFrame (in-editor) use center-relative coordinates of limbs-center ... so most of my +width/2 additional stuff were useless and wrong. Maybe ohloh is right and maybe my code lacks documentation ^^"

edit: flipped some animations on the real hardware yesterday and experienced several guru meditation screens again ... I'm not yet done with that memory bug, or I've introduced a new one. I wish I could nail it down to a single, reproductible action sequence it appears when you switch from AnimWindow to FileWindow with Boxwidget displayed, and then back to AnimWindow.
edit+: it even happens in the emulator. "good". Now all I need to fix it is some spare time.
edit++: fixed

No comments:

Post a Comment

this is the right place for quickstuff