Generic question: setting up events for correct animations.

This forum is currently in read-only mode.
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Hi all,

    This is kind of a generic question. Are there any generic rules for setting up as much animations as needed for a specific sprite? I mean, the order of the events, the use of sub-events, etc.

    I am doing a test platformer (metal slug - like), and I am focusing first in the range of animations that the player sprite needs. The problem is that I cannot find a way to know the propper order of events. Every time I insert a new animation, it takes me ages to set the events in a way that mahe them behave as I intended.

    The player character is a single sprite of a soldier that needs the following animations:

    running

    standing

    crouching

    crouching walking

    jumping

    falling

    And two more sets of animations for each of those attitudes: one set for shooting, and one set for knife stabbing.

    shoot while running

    shoot while standing

    shoot while crouching

    shoot while crouching walking

    shoot while jumping

    shoot while falling

    knife stab while running

    knife stab while standing

    knife stab while crouching

    knife stab while crouching walking

    knife stab while jumping

    knife stab while falling

    So far, I have only managed to make work the ones I marked in GREEN (the last two with help from Deadeye), but every time I try to add a new one, I end up trying lots of different combinations in order of events, with or without sub-events, etc. It also may happen that I manage to make a new animation right, but it screws up one of the previous ones that worked ok.

    Any advice will be appreciated.

  • The easiest way would be to have 2 sprites, one for the torso and arms, and one for the legs. If you only wish to use a single sprite, (it really doesn't make a difference and won't be noticable) then you must be really careful with your eventing. There is no exact process, just be logical and if something doesn't work, chances are you've made a logic mistake at some point. But yea, the shortcut would be to cut the sprite in two, and separate torso actions from leg actions. I realize this could be impossible for certain character models, but if it's plausible for your character, then that would be the easiest way.

  • Yep, Davio's right. Setting up your character in segments would be the easiest way of getting a full range of motions. Alspal and I are doing this in a little side project we're working on now:

    <img src="http://i40.tinypic.com/jgmruv.png">

    Art by Alspal

    The legs and head are separate from the torso and arms. That way for the head/legs there only has to be one standing animation, one running animation, one jumping animation, etc. And for the torso/arms there only has to be one pistol shooting animation, one grenade animation, one rifle recoil animation, one weapon-switching animation, etc.

    That way you can mix and match the two parts into any action you want and you don't have to worry about making frames for every possible scenario. You can shoot or throw a grenade at any time while running or jumping, it doesn't matter... and it all matches pretty seamlessly. It might seem like more work to set up that way, but it's really not in the long run. It just takes a little planning, and it will save you a ton of sprites.

  • I'm just comparing private variables so it's easy to see the flow and logic, replace those conditions with what you'd need to know to know if your character was doing each of those things:

    <img src="http://files.getdropbox.com/u/1013446/New%20Folder/CustomKeys/New%20folder/Runtime/Capture3.PNG">

  • Yep, Davio's right. Setting up your character in segments would be the easiest way of getting a full range of motions. Alspal and I are doing this in a little side project we're working on now:

    <img src="http://i40.tinypic.com/jgmruv.png">

    Art by Alspal

    The legs and head are separate from the torso and arms. That way for the head/legs there only has to be one standing animation, one running animation, one jumping animation, etc. And for the torso/arms there only has to be one pistol shooting animation, one grenade animation, one rifle recoil animation, one weapon-switching animation, etc.

    That way you can mix and match the two parts into any action you want and you don't have to worry about making frames for every possible scenario. You can shoot or throw a grenade at any time while running or jumping, it doesn't matter... and it all matches pretty seamlessly. It might seem like more work to set up that way, but it's really not in the long run. It just takes a little planning, and it will save you a ton of sprites.

    hmm, how did you do say crouching? or any part where player changes height? you move head sprite down?

  • Well our character doesn't crouch, because he doesn't need to (and there really isn't any room to anyway). But yes, for the head and feet there would be one crouching animation. Just like there's one for running, and one for standing, jumping, falling, getting hurt, whatever. The torso sprite would just follow along. That way you can use the same shooting animations or whatever for crouching.

    I remember when I helped you with your animation your character didn't really change height that much when crouching anyway. Looking at the .cap again I see that standing height is 28px and crouching height is 25px. That's not a very significant change.Are you sure you even need crouching? Is your character really going to be able to duck bullets by only moving down 5px? Are there going to be obstacles that are only 5px lower than other obstacles? It seems to me that with that particular character design it's not really necessary or practical from a gameplay perspective to even have crouching. Just saying.

  • .

    I remember when I helped you with your animation your character didn't really change height that much when crouching anyway. Looking at the .cap again I see that standing height is 28px and crouching height is 25px. That's not a very significant change.Are you sure you even need crouching? Is your character really going to be able to duck bullets by only moving down 5px? Are there going to be obstacles that are only 5px lower than other obstacles? It seems to me that with that particular character design it's not really necessary or practical from a gameplay perspective to even have crouching. Just saying.

    I'm not thread starter,

    I just liked the technique and wanted to know if it would work on crouching/height changing character.

  • I'm not thread starter,

    Oh hehe, whoopsie

  • using the splitup technique you wouldn't need crouching animations for the torso or the head if they were set to 'always' 'set position to' imagepoints that were placed at the connecting points

  • Hey, thank you all for your answers!

    I will give the splitting technique a go; it seems much more reasonable for a big number of animations.

    And Lucid, I can see the point on using variables, it seems more "clean". I�ll try that too.

    And yes, Deadeye, my test character doesn�t crouch so much, I will have that in mind when (if I ever) design my own original character.

    BTW, it is so difficult to be original when u�r working with a black and white 32 x 32 pixels sprite!. If I want to make an american WWII soldier it would most probably end up looking much the same as this one, but never as good!!

    I like tiny black and white sprites, and thats because I grew up playing games on a ZX Spectrum (and yes, I am THAT old )

  • <img src="http://upload.wikimedia.org/wikipedia/commons/a/a1/ZX_Rebelstar_2.png">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ....and thats because I grew up playing games on a ZX Spectrum.

    You're not the only one.

    lol

    Sponge

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