Page 1 of 1

Newbie Asks: Best way to create Animation Graphics

PostPosted: Sun Apr 22, 2012 6:47 pm
by ggesterGamePro99
Say i have a standy animation, and a walking one, and then one where the character stretches out and punches.

The size of the images of the puch animation images will be wider ..so when i switch from the standy animation to the punch animation..
there wil be an obvious sudden change of position..
But i want it to look like he starts exactly at the standby position and doesn't suddenly appear at a diffeernt position in the screen.
I will try to illustrante what i mean using keyboard letters.

Say this is the frame for the standy images . THe E represents the character, the dots represent the horizontal space in the images.
..E..

Now the puch one will be this, notice how it's wider and notice how i have to start it close or righrt next to the edge of the frame(the letters represent
the character and the dot is the empty space AND notice how the image is wider than the above image:
paaaaa.


So what will happen is when i execute it, the character will look like it goes back when it punches.
Sure i can say x = x + 10 to try to match it to the character position in E but it'd be hard. i don't know, this is what i mean i have to do:

..E..
paaaaa

Notice how to have the second animation start where the first animation's character is, i have to increase X. is that how to do it?

Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Sun Apr 22, 2012 7:39 pm
by skydereign
The xy position of animated actors is the very center of the actor/animation. So when making animations, as long as you keep the center of the frame be the player, then it will always be aligned. All this means is if you have a stand animation, and you want to create a punch animation, the size of the punch frames will be wider, and the actual animation must be centered in each frame.

Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Wed Apr 25, 2012 1:53 am
by ggesterGamePro99
So, how do i make images for Squatting crouching? Do i still make the character be in the center of the frame...And i mean, croched/squatting right at the center of the frame? or do i make his feet touch the bottom edge of the image frame?

Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Wed Apr 25, 2012 4:04 pm
by skydereign
All it needs to do is be centered. Since you want the actor to be crouching, the head will most likely be around the center of the image, or even lower. Normally the head would be on the top of the image. The center of the image should always be at the same point. The actor's actual animation just needs to be in the correct spot relative to that. So if you wanted an animation where they lean to the right, the animation should be slightly to the right of the center.

This is easy enough to test out, and would be a lot easier for you to learn. Take some single frame animations, and draw a simple actor in different spots, using different sized images. The center of the frame is where the actor's xy is located. So if the image appears to the right of the frame's center, then they will appear to the right of where the actor's actual xy is.

Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Mon Apr 30, 2012 2:31 am
by happyjustbecause
Well, I'm fairly newbish, so I've been having a similar problem. I have a throwing image which has one frame which is taller than the standing animation. The tallest throwing frame is 52 pixels, the standing is 44. So once the throwing animation is done, the player will be 8 pixels higher up from the ground than he should be, because the standing animation is only 44 pixels. I can't remove the pixels from the throwing animation, and I don't think adding 8 pixels to the standing animation is the correct solution. I know you've probably explained what to do to fix this, but I'm a little confused on what exactly to do. I also have to fix the centering of it, but I know how to do that.

Here's a video showing exactly what I mean.


Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Mon Apr 30, 2012 2:48 am
by skydereign
All you need to do is center the throwing version (based off of the feet). So, increase the height of the throwing animation by adding transparency to the bottom of the image.

Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Mon Apr 30, 2012 3:02 am
by happyjustbecause
But won't that mess up the sprite sheet, so then it the animation wouldn't run smoothly?

EDIT* Oh, I just tried it out, I guess not. =D Thanks for the help! :D

Re: Newbie Asks: Best way to create Animation Graphics

PostPosted: Mon Apr 30, 2012 4:23 am
by skydereign
It doesn't mess it up because gE uses the center of the image. You can change the size of the animation, and as long as the center stays the same, the actor won't change position.