How do I sync complex sprite animations with timelines?

Not favoritedFavorited Favorited 0 favourites
  • 2 posts
From the Asset Store
Cute cartoon girl character with Walk, Jump, and Idle animations for 2D games.
  • Hi all, I'm working on a boss and want to use timelines to map out the movement patterns but also need to synchronize this to fairly strict sprite animation rules (eg they need to play in sequence, previous animation should finish first, if something is looping it needs to hit a specific frame before transitioning to next animation etc).

    I have some animations (like a 19 frame "brace for landing" sequence) that need to hit specific sprite frames at specific positions along the timeline. I know I can use timeline markers to trigger event sheet actions, but calculating the timing on a curved path is getting tricky and I have no idea if I am doing it in a reliable way.

    If the boss is falling along a bezier curve. I need to trigger the brace for landing animation mid-curve so that the final frame of the animation syncs perfectly with the moment the boss hits the ground at the end of the timeline. I can work out how long the animation goes for with the frames and the frame rate and make keyframes for that specific duration, but I don't know if that will be reliable - it doesn't seem to be.

    Does anyone have any tips for cleanly synchronising complex animation frames with timeline curves/movement? Are you calculating time offsets manually, could sprite framerate be locked to timeline? Or would there be another better workflow to acheive this?

    Any advice appreciated!

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That’s a tricky one to give an exact answer since most don’t have such specific requirements.

    That said, it looks like there are expressions to get the current playback time and the time of nodes on the timeline. That combined with the duration of a landing animation you could have an event to check the time to decide when to change the animation.

    Having the requirement of only changing animations on a particular frame can be handled with events too. However combined with that other constraint you may need to adjust the speeds of things.

    For example, say you have a looping running animation you want to jump at a node on the timeline, but you only want it to change on a particular frame you’d want to either pause the timeline at that node and wait till it’s at the right frame or look at the time anticipating the node and speed up/ or slow down the animation speed so that the frame is where you want it to be at that node.

    There’s probably a system you could make to do that in a general way. Like you’d have the list of animations you know you need to move through and a list of the nodes on the timeline where you what the transitions to be. Then it would adjust either the speed on the path or the speed of the animations so that the transitions are at the exact time and frame you want.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)