Complex 2d animation

  • #1, by morgana-a-tSunday, 01. August 2021, 18:33 2 years ago
    Hello everyone smile

    I'm new to game development and animation. I want to ask about the animation of the interaction of several characters at once. How do you implement this on the engine?
    Let's say I need to make an animation where two characters are hugging. Do I need to make an animation for each separately and then play them on the engine at the same time? Or is there some other way? Because I tried to do this and it turns out badly (one character sprite completely overlaps the other).

    Thank you and have a good day!

    Newbie

    8 Posts


  • #2, by NigecMonday, 02. August 2021, 11:19 2 years ago
    I'd get the characters to a given point then hide them and run an animation, or have a custom animation on the main character with the sequence, it would be a lot easier 

    Key Killer

    627 Posts

  • #3, by morgana-a-tMonday, 02. August 2021, 15:07 2 years ago
    I'd get the characters to a given point then hide them and run an animation, or have a custom animation on the main character with the sequence, it would be a lot easier 

    Thank you for the idea smile

    Newbie

    8 Posts

  • #4, by MachtnixMonday, 02. August 2021, 19:15 2 years ago
    I'm afraid you need an extra animation for each interaction. Two individual animations - as you have noticed - often lead to strange overlaps. 

    That means, as was said above: you need an animation that consists of the greeting. Either you cross-fade the animation of the figures as they run towards each other, which almost always leads to interruptions (or the positions are not congruent), or you start with a single overall animation that consists of both figures running towards each other, embracing and then moving apart again. I think the second one is easier - ONE big animation. 

    Let's say you click on the secondary figure. He stands at a certain start position - at the beginning of the scene, for example. This starts the sequence. After clicking, you direct the game character to a fixed position and direction so that the following cross-fade can start from there without a gap. Otherwise the character "beams" somewhere.The character and the NPC are now hidden, at the same time the new animation appears, in which both characters must of course be standing in the same place and meet each other. It's a bit tricky. 

    Translated with www.DeepL.com/Translator (free version)

    Thread Captain

    1097 Posts

  • #5, by morgana-a-tTuesday, 03. August 2021, 19:41 2 years ago
    I'm afraid you need an extra animation for each interaction. Two individual animations - as you have noticed - often lead to strange overlaps. 

    That means, as was said above: you need an animation that consists of the greeting. Either you cross-fade the animation of the figures as they run towards each other, which almost always leads to interruptions (or the positions are not congruent), or you start with a single overall animation that consists of both figures running towards each other, embracing and then moving apart again. I think the second one is easier - ONE big animation. 

    Let's say you click on the secondary figure. He stands at a certain start position - at the beginning of the scene, for example. This starts the sequence. After clicking, you direct the game character to a fixed position and direction so that the following cross-fade can start from there without a gap. Otherwise the character "beams" somewhere.The character and the NPC are now hidden, at the same time the new animation appears, in which both characters must of course be standing in the same place and meet each other. It's a bit tricky. 

    Translated with www.DeepL.com/Translator (free version)
    Thank you, I chose this approach smile

    Newbie

    8 Posts