What's up Game Developers? CouchFerret here,
and today I'll show you how to draw top down running and walking animations for Unity in Aseprite.
If it sounds fun,
then stay with me,
and consider subscribing so you won't miss any future videos of this game.
Cool, let's begin!
I use Aseprite for my pixel art.
It's a fully featured pixel art editor with a simple and intuitive interface.
The animation tools in it are superb and make the whole process fast.
The software itself is 15 bucks,
however, it's open-source so you can compile a copy for yourself.
There are other free alternatives for you to try pixel art out.
One that I've started with is Piskel.
It's a free online editor with animation tools in it.
But that's enough talk, let's move forward!
The first step is to figure out the size of the character in pixels.
It depends on the space you need in your game.
In my case, I wanted a space big enough to have 4 players shoot each other with arrows.
But your game could be fine with less space like in The Binding of Isaac,
where there is 1 player with a close combat gameplay.
There are two things you can tinker with to define the size of your space:
The first thing is the size of your character.
In other words, how many pixels you want to use to draw your character.
It also depends on the style you use.
In my case, the character is around 10x20 pixels,
but in Isaac it is around 30x30.
The second is your art actual resolution,
specifically the size of a pixel in your art.
For example, if my game is played in 1920x1080 resolution,
then one pixel in my art ends up being a 3x3 square on the screen.
But for example in The Binding of Isaac Rebirth it would be around 4x4.
Both two things in my case are smaller
so I will end up with a much larger gameplay area, which suits my game's mechanics.
Okay, we've got the size,
its around 10x20 pixels.
Let's draw the character!
It's easier to start with a silhouette.
Let's add a few details to him, like a belt and a quiver.
Okay, we got our character, but he is looking flat and boring.
Let's shade him to have a bit of depth.
We need to decide the light direction which will determine the highlights and shadows.
Let's have our light source in the top left corner,
which will put highlights on the left side and shadows on the right side of the character.
He looks nice, we can start animating him.
To make the animation process faster and to avoid spending a lot of time on details,
we will make a base animation.
When we have a strong base for the animation,
then we can draw out the real animation on top of that easily.
A base animation's character is similar to a character silhouette,
but we use different colors for different body parts to make it readable.
Basically, we create another character without shading and details,
we animate it,
and then we can draw out the detailed good looking character on top of the base.
We only need the necessary pixels and not more.
I use green for the body, purple for the head,
and the limbs are color coded to represent the left and right sides.
To give the character a sense of direction,
we can trim the head and erase the pixels where the eyes should be.
Okay, I think it looks good,
let's move forward with animation.
To have some guidance on a running animation,
let's search for references.
I use Google Image search or www.spriters-resources.com for animation resources
and Pinterest for everything else.
Let's start animating our first animation which is the RunLeft animation.
Playing the animation back continuously,
I try a few variations to figure out the rhythm of the animation.
That is, how many frames long will the animation be and where will it repeat itself.
I've got one step done.
Now, I need to copy the standing pose to the end and draw the next step with the other leg.
The two steps are similar so I can use the first one as a baseline for the second step.
It's enough to copy the legs, then do a slight modification.
Basically, I draw two halves,
one when the right foot is at front and one when the left is.
I've settled on 6 frames for the length.
It fits our game's style and it is enough to demonstrate a running movement.
When drawing the arms, if the right foot is at the front,
then the left arm comes to the front with it, and the right arm is behind the body.
For the other half of the animation,
I will copy the arm to the opposite side,
slightly change it and draw the other one.
Now we've got the RunLeft animation, and it looks marvelous.
There is one problem,
it starts with the standing pose at the first frame.
We need to offset the whole animation to the left by one,
otherwise the animation in Unity would start at a standing pose,
and not where the character moves his right leg.
It would feel like the animation is lagging.
When I'm done refining the animation,
I copy and mirror it to get the RunRight version.
You might ask why I don't just copy and mirror the detailed character at the end.
Well, the end result will have highlights and shadows in it,
so copying it would change the light direction of our animations.
Because our game will be in a top down perspective and not in a 2d side view,
we need additional directions.
We need at least two additional directions to move up and down.
That's a total of 4.
However, I prefer the 8 directional animations,
but that almost doubles the hassle, so I'm settling on 6.
The 4 diagonal directions and the 2 horizontals which we already have.
I'm cheating off on the straight vertical ones
because there are not enough pixels to make a different one from the diagonal ones.
After a bit of tweaking, I ended up with our animations.
Drawing the rest of the 4 animations,
I really struggled with the absence of pixels.
It's hard to draw depth with this few pixels,
but I'm satisfied with the results.
The 4 vertical directions almost look like 2,
because the ones that face similar directions are mirrored.
It's realistic that if you move forward and slightly right,
you would use your right leg for the first step and vice versa.
So I mirrored them with this in mind.
To have a bit of variety in our game
I copied all 6 existing animations and used it as a base for walking animations.
It's a good base,
and I just slightly altered them to look a bit slower and relaxed.
Now we've got all the base animations,
the last and least creative step is to draw out the concept on the base animations.
With the arms,
I'm using a lighter shade of green when overlapping with the body,
so the arms won't just disappear.
I skipped the process because it's a bit tedious.
For the final touch, I'm drawing shadows for our character on the ground.
It's important that the shadows have low opacity so we can partially see through them.
When everything is finished,
I export it as a Sprite Sheet so we can use it later in Unity.
We are done. Isn't it nice?
That's it for today folks!
Wednesday, we will move our archer with an Xbox Controller,
so be sure to subscribe and leave a thumbs up!
If you have any questions from today,
feel free to ask and I'll try to answer all of them.
See you next time!
Không có nhận xét nào:
Đăng nhận xét