Looping frames instead of all the animation.

0 favourites
  • 13 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hello Ashley and folks from Scirra xD

    I would like to know if is possible to have a very small addition to the animation editor?

    It's about to set looping for some sprites instead of the whole animation, for example. I imagined something like a small check box, where you can set what sprite will be looping and what will run once.

    This is used on IGM and EGM and by Flash games (Castle Crashers did it, awesome ^^).

    This feature improve the game by cutting of unnecessary repeated animations with little differences, and give you a huge hand when working with animations like jump, for example, where you need transition between the player being jumping and jumping in fact, the same for falling.

    So, on IGM, for example, you can setup a simple animation with all the frames necessary for your player being jump, jump in fact and land. You can uncheck the being jump sprites and the landing sprites and them your player will show them only once, and will loop only the jumping in fact animation, when the software run the jumping animation, it will hit the being jump sprites and play them once, when you set to finish the animation, it will play the lasts unchecked frames once.

    Another situations. Bending and crawling, it's a common pose for Mario type of game. Shooting arrows, you can setup the "arm the bow" once, and put the bow back once too.

    Maybe for the future, but beginners on the engine will feel better with this feature instead of doing 10 events to handle numerous situations where a transitional animation can trigger with another one, instead of checking if a main animation finished..

  • I don't really use C2, but in CC there was an option for 'loop to' ie, when it reaches the end, loop to a certain spot. So if frames 1-3 are the bow being pulled back, then 4-6 are the holding animation, set it to loop back to 4. I use this for my jump animations, in particular, so that they player jumps, but then 'holds' at a certain point.

    If C2 does not have a 'loop to' option, then you could use events like if animation frame reaches x, go to wherever.

    My lack of C2 experience might not work, but I hope it does. Unless it's worlds different   <img src="smileys/smiley22.gif" border="0" align="middle" />

  • Yeah like it was in good old Flash. Not a bad idea at all.

    Flag some key frames in the animations give them a label etc.

    But to be honest it's already here.

    make three animations

    1. start jumping

    2. jump idle (looping)

    3. land

    and you can easily manipulate between them

    if "start jumping" finish play "jump idle", when "jump idle" finish play "land"

    would be the same like one animation frames

    0-10 - start jump

    11-40 - jump idle (marked as loop)

    41-51 - land

    And besides you could do this with one variable. Set frames to variable and you could do anything with the numbers.

    right?

    Edit: One thing i'm really missing with animations is ability to reverse current animation by events.

    Simple example

    Key "space" is down -> play animation "dance baby"

    Key "space" released -> revers animation

  • will setting the animation speed to negative play it backwards in c2?

  • I don't really use C2, but in CC there was an option for 'loop to' ie, when it reaches the end, loop to a certain spot. So if frames 1-3 are the bow being pulled back, then 4-6 are the holding animation, set it to loop back to 4. I use this for my jump animations, in particular, so that they player jumps, but then 'holds' at a certain point.

    If C2 does not have a 'loop to' option, then you could use events like if animation frame reaches x, go to wherever.

    My lack of C2 experience might not work, but I hope it does. Unless it's worlds different   <img src="smileys/smiley22.gif" border="0" align="middle" />

    We know, you can reach everything when using events. But a beginner don't.

    Yeah like it was in good old Flash. Not a bad idea at all.

    Flag some key frames in the animations give them a label etc.

    But to be honest it's already here.

    make three animations

    1. start jumping

    2. jump idle (looping)

    3. land

    and you can easily manipulate between them

    if "start jumping" finish play "jump idle", when "jump idle" finish play "land"

    would be the same like one animation frames

    0-10 - start jump

    11-40 - jump idle (marked as loop)

    41-51 - land

    And besides you could do this with one variable. Set frames to variable and you could do anything with the numbers.

    right?

    Edit: One thing i'm really missing with animations is ability to reverse current animation by events.

    Simple example

    Key "space" is down -> play animation "dance baby"

    Key "space" released -> revers animation

    It's what is on the sandBOX. I'm talking about another thing very different with other reasons instead eventing the transitions. Also, if you have 100kb each frame of your character, you wouldn't repeat animation frames to increase your game size, when you can just create loopings using the animation editor, without the necessity of a new repeated frame..

    You can make exactly what this request is talking about but using events, just make your animation frame by frame in event mode, something like this: every tick: set frame position to frame.position + 1;

    And handle the situations where it loop by looping it, and the transitional animations can be handled by setting limit of the frame position number. That's it, but a beginner who have more skills with drawing will stuck when handling the animations with events.

    So, it's not much intuitive for a beginner think about the pre-jump animation and his involvements with other situations. To be honest, it can frustrate many people who don't care to come here and talk, because they may think "they are not able to use the tool or they are too lazy or they fear of bias".

    Who want make these transitions and learn other features can download tons of samples, but they all still complex for a simple thing improved in the past on other tools such as Flash, IGM, EGM.. did you catches the intuit of this topic? it's not about the possibilities, nor how to do, but a topic to suggest to recover this old feature.

  • C2 has the same animation properties as CC.

    hen selecting an animation, the Properties Bar displays settings for the animation. These are the following:

    "Speed" The number of animation frames shown per second. For example, if set to 5, each animation frame lasts for 1/5th of a second. Set to 0 if you do not want the animation to play (e.g. if a tile set is used with a different tile in each frame).

    "Loop" Restart the animation after it finishes.

    "Repeat count" If not looping, the number of times to repeat the animation.

    "Repeat to" The zero based index of the animation frame to repeat back to if looping or repeating.

    "Ping-pong" Play the animation alternately forwards and backwards.

    http://www.scirra.com/manual/48/image-and-animations-editor

    Say you have a ten frame animation of jumping.

    Frames 0-4 are the warm-up part that we want to be played once.

    Frames 5-9 are the part that we want to loop.

    Then set "Loop" to yes and "Repeat to" to 5.

    Is that the effect you are looking for?

  • Rojo, It's a half way to the complete feature.

    I have written a big post, but decided to clear it. All exposed here is possible to be done using events, but could be more user friendly using flags and labels on the animation editor, as said by

    The best thing to do now is a nice tutorial ^^, maybe later.

  • TELLES0808

    From reading your post I think you are hinting at the following. Correct me if I am wrong:

    Firstly: Yes with the events editor you can do a lot of things with animation.

    Secondly: Beginners are generally not familiar with event programing methods

    Thirdly: Therefore to make C2 user friendly, include visual looping of frame tags in the animation editor. To better control which frames are looped.

    If this is the case, then the solution has already been implemented. Within the sprite animation editor, you are already able to edit and create new animations (to then label) for the same sprite. Its easy to miss this box that allows this, as I have found it hiding under the 'Sprite Editor'.

    You can therefore have 'animation run' frames 1-4, 'animation jump' frames 1-4, 'animation fall' 1-2 etc... Altering between the different lables.

    Is that what you are looking for? If not I apologies.

  • Exactly, can you post a screenshot showing this feature please?

    I was searching and didn't found it.

  • TELLES0808

    I'm not sure if this helps:

    http://www.englishacorn.com/press/wp-content/uploads/2012/08/animation-1024x576.jpg

    I found the box behind the sprite animation editor. From there you can add new animations and rename them. Then in the events sheet you can change between the animations. Each animation has a set of different frames. Each animation can have its own loop, loop speed etc...

    Normally most people stick with the 'default' animation lable, unaware of the ability to add others.

    Let me know if you need another picture.

    All the best,

    -Adam

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks buddy, I already used it on the sandBOX ^^

    Later I'll try to make a Tutorial of how to handle situations of animation transitions, because they are very trick.

    []'s

  • Hi,

    I have 2 different sets of animations in a sprite. How do I call the different animation in the event sheet? The default animation keeps playing and I haven't been able to find any tutorial on how to overcome this. Thanks! :)

  • after the conditional is meet, set the animation to the desired name by using the action menu.

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