Generic question: setting up events for correct animations.

For questions about using Classic.

Post » Sun Jun 21, 2009 10:02 pm

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:

[color=#00BF00:2g36ul6v]running
standing
crouching[/color:2g36ul6v]
[color=#000000:2g36ul6v]crouching walking[/color:2g36ul6v]
[color=#00BF00:2g36ul6v]jumping
falling[/color:2g36ul6v]

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

[color=#000000:2g36ul6v]shoot while running[/color:2g36ul6v]
[color=#00BF00:2g36ul6v]shoot while standing[/color:2g36ul6v]
[color=#00BF00:2g36ul6v]shoot while crouching[/color:2g36ul6v]
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 [color=#00BF00:2g36ul6v]GREEN [/color:2g36ul6v](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.
B
1
G
3
Posts: 5
Reputation: 835

Post » Mon Jun 22, 2009 1:29 am

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.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Jun 22, 2009 2:28 am

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:



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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jun 22, 2009 6:26 am

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:
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Jun 22, 2009 6:59 am

[quote="deadeye":26xzayx7]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:



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.[/quote:26xzayx7]
hmm, how did you do say crouching? or any part where player changes height? you move head sprite down?
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Mon Jun 22, 2009 7:21 am

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jun 22, 2009 7:29 am

[quote="deadeye":2559x9s9].

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.[/quote:2559x9s9]
I'm not thread starter, :mrgreen:
I just liked the technique and wanted to know if it would work on crouching/height changing character. :mrgreen:
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Mon Jun 22, 2009 8:53 am

[quote="hellwalker":64owbl17]I'm not thread starter, :mrgreen: [/quote:64owbl17]

Oh hehe, whoopsie :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jun 22, 2009 10:37 am

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
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Jun 22, 2009 2:56 pm

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". Ill try that too.

And yes, Deadeye, my test character doesnt 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 ur 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 :))
B
1
G
3
Posts: 5
Reputation: 835

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests