Hey there guys, Help me rank this video higheron You tube,
by simply leaving a dislike or a like.
Don't forget to comment, every interaction helps!
if you are subscribed, smack that bell next to the subscribe button!
okay.
How to import sprites into game maker studio 2.
This is a Drag and drop tutorial.
Here is the game we have been working on.
In the last video we adjusted the frame rate, and the animation speed.
Today, we are going to import animated sprites into game maker studio 2.
For this example, I'm using the main character from under tale.
I found these images on google, so I do not own these images,
and the credit goes to toby fox, and tammy cheng.
We are using them for educational purposes only.
I recommend making your own sprites.
Check out my tutorial on how to create animated sprites.
There is a link down the description below.
so, let's begin by double clicking on our sprite.
Press the edit button.
and Go to image, let's import our first image.
Let's import the second image the same way.
just click image, and select import.
Delete these two here.
Let's see what this looks like.
Okay.
It works, but he walks backwards.
We can fix that.
Let's simply mirror the images,
this option should be called flip horizontally, but anyways.
Try it out.
that works, but maybe the animation runs too fast.
Let's set the animation speed to 1.
that seems a lot better.
Almost like the real game.
After all under tale was made in game maker studio.
Let me rename this to something more appropriate.
I'm going to call this, side animation.
Now, let's create another sprite, for another animation.
let's double click on it, and press on the edit image button.
I'm going to go to images, and I'm going to import the two frames for this animation.
Here is the first frame, let's import the other one.
actually, I'm going to be lazy, and I'm simply going to copy this frame, and mirror
it, meaning: I'm going to flip it horizontally.
That runs a bit too fast, we are going to set the animation speed to 1,
but before that, let's rename this to down animation.
Now, let's change the animation speed to 1.
We need another sprite, so let's create one.
Same thing, let's go to edit image, and let's import our animation.
here is our frame.
Actually, let me simply do the same thing, just copy it and paste it.
Let's flip this horizontally.
just click on mirror current image.
We can call this sprite: Up animation.
Don't forget to set the animation speed to 1.
If you run the game.
You will notice that nothing happens.
The character doesn't change directions automatically.
We have to do that using events.
So let's double click on our object.
Here are the events we are using to move our character.
Let's add a new one.
Select key pressed left, from the list of commands,
let's select: Set Sprite.
Drag it out, and let's select our sprite.
I'm going to select the side animations.
Okay.
Let's add a new event.
select: key pressed right.
And let's select: Set sprite again.
Select the sprite.
I'm going to select the side animation again.
Add a new event.
select key pressed up.
let's add, set sprite again.
Select your sprite. in this case, is going to be the up animation.
Let's add a new event.
Key pressed down.
Set sprite, and select your animation,
which is, the down animation.
let's run the game.
and, it seems to work fine.
Except for the up and down animations need to be center.
No big deal.
Let's fix that.
double click on your sprite and center the animations.
do the same thing for the down animation.
now, let's run the game again.
wow.
Look at this.
he moves just like the real undertale.
How cool is that?
This program is really easy to use.
Okay, guys, if you liked this video,
don't forget to hit the like button.
Drop a comment, let me know what you think.
Share this video, and I will see you in the next episode.
Bye now!

Không có nhận xét nào:
Đăng nhận xét