GameMaker Studio 2.3 - Beginner Tutorial: How to Import and Animate Sprites

  Рет қаралды 46,491

Let's Learn This Together

Let's Learn This Together

Күн бұрын

How to Import and Animate Sprites in GameMaker Studio 2.3 - Beginner Tutorial
Sprites are the backbone of everything you see in your game. Let's learn the different ways to bring in sprites, how to convert a sprite sheet, trim sprites, and animate them when moving around as a character.
My Exclusive Courses💻🎮:
- Bundle Course Package & More Here! www.letslearnthistogether.com...
Zero To Hero - Game Dev In 30 Days 📖 💻😀
- I'm really excited to announce that I am writing a game development book for beginners!
- I am deeply motivated and invested into making this an awesome fun book for beginners interested in learning game development!
- Click the link to choose your tier on KickStarter and become a part of this new amazing project! www.kickstarter.com/projects/...
Social:
- Connect with me on Twitter @Aaron_LLTT: / aaron_lltt
- Become a valued Patron and receive more exclusive perks @: / letslearnthistogether
- Wanna hear from other developers in the industry? Head on over to my podcast, DevTalk, to listen to engaging conversations I have with various successful developers: devtalk.buzzsprout.com/
- Now on Instagram 📸! Follow here for more content and sneak peaks! / letslearnthistogether

Пікірлер: 79
@clementbaudet7752
@clementbaudet7752 3 жыл бұрын
Nice job ! and thank you for use my sprite !
@severius8611
@severius8611 2 жыл бұрын
3:40 I spend so much hours with copie every sprite seperatly into one sprite animation, now i realize how far I could be with my project if i just knew that trick
@chuckolator1859
@chuckolator1859 2 жыл бұрын
One of the best tutorials I've seen! Lots of helpful info, and you take time to explain things step by step without assuming much prior knowledge. That really helps me understand the concepts a lot more clearly. I also appreciate how you showed us what the game looks like before the code is technically finished; seeing how the character would be stuck in an animation, or not turn around, helps show what code does and does not do, which makes it very clear how it works. Most tutorials tell you all the code until it works how they want, then show you what the final product looks like; but this way teaches much more effectively imo. Instant sub, thanks and God bless!!
@infinitysapphirex7254
@infinitysapphirex7254 3 жыл бұрын
best tutorial, straight to the point imo
@bcandles
@bcandles 2 ай бұрын
I finally got my character to move correct! THANK YOU. Bless your soul.
@CopyCopyOriginal
@CopyCopyOriginal 3 жыл бұрын
super useful, thank you!
@abakte.
@abakte. 3 жыл бұрын
Thank you, you help me!!
@Grim_Spudly
@Grim_Spudly Жыл бұрын
Someone who took the time to cover something and not try to do a speed run! Thank you for the video and on the well-earned sub.
@aadmess7533
@aadmess7533 3 жыл бұрын
Nice tutorial
@deathincarnatesplace
@deathincarnatesplace 8 ай бұрын
dude thanks and the idea that you to put the picture on top of the other one is like the old thing where you flip the book but i was trying to find the answer for like ten minutes and it would not do it. thanks again and one more sub. also i have an idea you can have. a game with an overlay only let you replace art in objects and change position of stuff. then you are allowed to lay it out and sell it like regular game to people who draw only. you will get lots of art friends.
@Nawafmilfi
@Nawafmilfi 10 ай бұрын
thabks
@jaysanprogramming6818
@jaysanprogramming6818 3 жыл бұрын
You should put a link to the creator of the spritesheet you used in the description.
@LetsLearnThisTogether
@LetsLearnThisTogether 3 жыл бұрын
Yes, yes I should.
@DanielAlvarez-oq8ex
@DanielAlvarez-oq8ex 2 жыл бұрын
@@LetsLearnThisTogether More than saying yes. it would be better to just paste the link.
@sultan_khan7701
@sultan_khan7701 2 жыл бұрын
@@DanielAlvarez-oq8ex lol true
@JonPFS
@JonPFS 3 жыл бұрын
Nice... If you wanted, you could do a video about costum animations... Its the principal thing that gm is missing... there is no timeSet for each individual frame...reuse repeated frames... and other things... With the V2.3 making costum animations, is almost instant and very easy...
@JonPFS
@JonPFS 3 жыл бұрын
//script animations function AnimCreate() { var array = array_create(0); return array; } function AnimAddGrame( animName, spriteName, imageIndexNumber, ImageDelay ) { var animPass = variable_instance_get(id, animName); var arrNum = array_length(animPass); array_resize(animPass, array_length(animPass)+1); animPass[arrNum] = { Coord1: { sprINDEX: spriteName, imgINDEX: imageIndexNumber, aDELAY: ImageDelay } } variable_instance_set(id,animName, animPass ); } function AnimPLAY(animName) { static delay2 = 0; static delay1 = animName[delay2].Coord1.aDELAY; if ( delay1 > 0 ) { delay1 -= room_speed /30; if ( delay1 = array_length(animName) ) { delay2 = 0; } } } sprite_index = animName[delay2].Coord1.sprINDEX; image_index = animName[delay2].Coord1.imgINDEX; }
@LetsLearnThisTogether
@LetsLearnThisTogether 3 жыл бұрын
I’ll look into it.
@Grimpachi
@Grimpachi 3 жыл бұрын
anyone know how to stop the blurry - ness when moving ?
@VeroGMD
@VeroGMD Жыл бұрын
help this works but when i go left i still go right but my camera changes i copied this code word for word what happened?
@tahmeed702
@tahmeed702 Жыл бұрын
how do you make the background, any tutorial for that
@imnugget8085
@imnugget8085 Жыл бұрын
9:55 ay if you notice your images are off like you move right and left fix the orgin in the sprite art itself each thing like , run, jump, act, ect need all the same orgin with the same sprite canvas size if it's off when you go left and right the image looks way off and broken
@MadJaze
@MadJaze Жыл бұрын
How to do from walking to running. I've a code that I made but I don know what is not working
@jkadirix
@jkadirix 2 жыл бұрын
When I run the code, my room canvas is really small, how do I fix this?
@itzagamerboi4708
@itzagamerboi4708 2 жыл бұрын
my character is only staying in its idle state despite i copied everything you said to doplz help me
@Murdoc--
@Murdoc-- 7 ай бұрын
Thank you very much, this is super helpful! The thing is, I'm trying to make a side-scrolling game where the character is moving in all eight directions, but when I tweaked the Y movements, the X ones wouldn't animate the running sprites. I've got zero experience in programming so I went with these codes which I thought would work based on my logic (which is definitely flawed lol): if (keyboard_check(vk_right)) { x += 3; sprite_index = sprRogueRun; image_xscale = 1; } else if (keyboard_check(vk_left)) { x -= 3; sprite_index = sprRogueRun; image_xscale = -1; } if (keyboard_check(vk_down)) { y += 3; sprite_index = sprRogueRun; } else if (keyboard_check(vk_up)) { y -= 3; sprite_index = sprRogueRun; } else { sprite_index = sprRogueIdle; } Obviously I'm missing something, so could you please enlighten me? Thanks! Edit: After a couple of minutes typing up stuff I accidentally fixed it LOL
@pugcraft3051
@pugcraft3051 6 ай бұрын
How did you fix it
@daddypvp7422
@daddypvp7422 8 ай бұрын
How do I get to that first part?
@Universalgreenie
@Universalgreenie Ай бұрын
How do i import an animation from my other device??
@josephbouzerdan9823
@josephbouzerdan9823 Жыл бұрын
where to find the sprites for this tutorial ?
@TheeMrCheeky
@TheeMrCheeky 2 жыл бұрын
Would you feel like making tutorials using the DnD and explaining it? :D idk i learn well from videos and this and your old version of this helped me make my first movable sprite :D
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
If you’re looking for DND, check out fire jump. It’s all drag and drop, and I did the videos for YoYo. I’ll also be doing some more content featuring DND, so stay tuned!
@TheeMrCheeky
@TheeMrCheeky 2 жыл бұрын
@@LetsLearnThisTogether can you explain how to make the sprite walk slower when walking in a angle 📐 by pressing like up and right at same time. Walking at angle makes sprite walk faster then normal walk speed.
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
The reason your object goes faster is because you’ve got two statements triggering at the same time, doubling the speed. If you add an if check for both keys and then set speed to normal, instead of doubled. I know I’ve seen some content on here addressing it in a better way, so search and I’m sure you can find it
@sgd_est_la2777
@sgd_est_la2777 2 жыл бұрын
My assets dont want to drag and drop is it because I have the free version ?
@bonclyde7712
@bonclyde7712 Жыл бұрын
When I auto trim all frames in the sprWarriorRun sprite sheet workflow it trims to the content of all frames instead each frame individually. I made a new project and reset settings to default, but no dice. Any ideas?
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
You must first convert the sheet to frames, it’s in the same menu, above the auto trim feature a few items. Convert to frames, then trim.
@KD07932
@KD07932 6 ай бұрын
Hi dummy question here. Is there a particular reason why my sprite kinda teleports or jiggles between left and right presses? Edit: he actually explains it. It has something to do with origin. if keyboard_check(vk_right) or keyboard_check(ord("D")){ x += 3 sprite_index = Sprite_Runmain; image_xscale = 1; } else if keyboard_check(vk_left) or keyboard_check(ord("A")){ x -= 3 sprite_index = Sprite_Runmain; image_xscale = -1; } else { sprite_index = Sprite_Idlemain; }
@HELPMEHESSEEME
@HELPMEHESSEEME Жыл бұрын
7:44 do we have DnD version
@MiracleMyz
@MiracleMyz 8 ай бұрын
Is there any way I can have the last frame of my falling animation freeze until my character reaches the ground ? Here’s the code if it helps: if (jump) { yspeed = -20; } } else { sprite_index = sPlayerJump;
@LetsLearnThisTogether
@LetsLearnThisTogether 8 ай бұрын
You certainly can. You need to know the specific frame number you want, and then in your code you can say something like if (falling and image_index >= lastFrame) { image_index = lastFrame } Or something close to that effect. If it’s a fast animation, you may need to add the at animation end event and freeze the image_speed right there.
@masongrey5907
@masongrey5907 3 жыл бұрын
ok but i have a question what if i want to add an sprites for an 2.5D game for example (undertale) can you please tell me how i will do that and btw you tutorial is amazing
@LetsLearnThisTogether
@LetsLearnThisTogether 3 жыл бұрын
Same concept. For top down, you’ll just add movement for up and down.
@masongrey5907
@masongrey5907 3 жыл бұрын
ok thanks
@REALTHEBANDVICE
@REALTHEBANDVICE 2 жыл бұрын
i've got the exact code but when my character walks into a wall they just phase through it and dont know why
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
It’s most likely a very small difference, usually a + instead of a - inside of a while loop. Delete your code, or comment it out, and try typing it out again while following along
@delphonse9243
@delphonse9243 Жыл бұрын
So the left and right works wonders but when I try to do up and down movement it messes up and I have tried many different ways but the problem is I can't replicate the same code for up and down since the sprite does not flip when moving up and down it uses two different sprites. an up moving sprite and a down moving sprite. Can I get some help on this?
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Sprite_index controls the sprite an object displays. You have to change your sprite when moving up and down. So when you check for the up key, also change your sprite to move_up or whatever your sprite is called. You’ll need this for every direction you can move.
@delphonse9243
@delphonse9243 Жыл бұрын
@@LetsLearnThisTogether so do I copy paste a new If, else if, else. code and change it to be up and down I already replaced the images to be up and down but it keeps defaulting to the else section so they move up and down but they dont animate o.o I am very new sorry.
@delphonse9243
@delphonse9243 Жыл бұрын
@@LetsLearnThisTogether oh I got it all to move and animate but now they all default to the right side. Where do I add the other Else function so they stop moving and idle in the last facing direction?
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Else goes at the very end of it statements. I’d need to see your code to know for sure, but if you’re set up like if (left) else if (right) Etc.. Then set else at the very end and stop moving there. Otherwise you’ll need an if to check for when you are standing still and set to idle then.
@imnugget8085
@imnugget8085 Жыл бұрын
Up and down are two different sprite artwork in any game even jumping they will have u use 1 sprite for going up and another sprite for coming down so it will be different but if in placement make sure your orgin and canvas size are the same to keep it overall center
@defuseuwu2130
@defuseuwu2130 Жыл бұрын
my image arguments just dont work
@RinooDinoo
@RinooDinoo 2 жыл бұрын
When i drag my object in the level. It gives an error when i try and test it
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
What error?
@RinooDinoo
@RinooDinoo 2 жыл бұрын
ERROR in action number 1 of Step Event0 for object ObjBlob: Variable .If(100005, -2147483648) not set before reading it. at gml_Object_ObjBlob_Step_0 (line 2) - If (keyboard_check(vk_right)) { gml_Object_ObjBlob_Step_0 (line 2)
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
It looks like you capitalized your i in If. It must not be capital.
@RinooDinoo
@RinooDinoo 2 жыл бұрын
@@LetsLearnThisTogether Thank you so much! It worked!
@SincerelyTaterTot
@SincerelyTaterTot Жыл бұрын
instead of (vk_right), is there a way to have it for the "d" key instead?
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Sure. ord(“D”) You can also bind keys to one another so you could have it be for vk_right and D with just one check instead of 2.
@SincerelyTaterTot
@SincerelyTaterTot Жыл бұрын
@@LetsLearnThisTogether Thank you so much! My computer actually doesn't have arrow keys. 😅
@SincerelyTaterTot
@SincerelyTaterTot Жыл бұрын
@@LetsLearnThisTogether hi again, sorry to bother. It keeps giving me an error with the "{" and "}", it says, " Got "{" inspected "(" "
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
I’d have to see your entire code to know the issue. It sounds like you’re either missing a ) or } somewhere. When you use ord, it’s a function so you have to close that call with ). if(keyboard_check(ord(“d”))) { } Notice there’s 3 ) at the end of the if statement.
@SincerelyTaterTot
@SincerelyTaterTot Жыл бұрын
@@LetsLearnThisTogether Tysm! It worked, sorry for bothering you so much
@echorinP
@echorinP 2 жыл бұрын
weird i basically copied the code on screen yet my character would only go right, despite being animated the exact way I want them to
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
Double check your addition and subtraction. And that you really added code to your left move event. One tiny + where a - should be will cause issues.
@echorinP
@echorinP 2 жыл бұрын
@@LetsLearnThisTogether I ended up fixing it by programming the movement seperately and it ended up working, I couldn't figure out what exactly went wrong with this one. Thanks for the answer though!!! Your tutorials are seriously amazing
@Neo_hungry
@Neo_hungry 11 ай бұрын
what about jump animations
@LetsLearnThisTogether
@LetsLearnThisTogether 11 ай бұрын
They’re pretty cool, that’s for sure ;) Change the sprite when you press a key to jumping, and then when gravity begins taking you to the ground, change the sprite again. There should be places for that logic in your game already and you just need to add in the sprite changes.
@Piflle
@Piflle 10 ай бұрын
69th comment nice
@LetsLearnThisTogether
@LetsLearnThisTogether 10 ай бұрын
Radical dude!
@jeremiahharris7930
@jeremiahharris7930 Жыл бұрын
Monkey errrrrdddddddd
@wobblynoob2141
@wobblynoob2141 Жыл бұрын
doesent work, he doesent go into detail what a bad tutorial.
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Doesn’t type the right words, can’t answer. But seriously. If something didn’t work, let me know and I can offer some assistance. Just gotta tell me what didn’t work for you.
@wobblynoob2141
@wobblynoob2141 Жыл бұрын
@@LetsLearnThisTogether you suspected everyone already was this far, so the people that dident have the files or dident now where they were, just got left behind.
@redvelvett22
@redvelvett22 2 жыл бұрын
I mean, yeah, it made my character go, but it would have been nice to explained the "if" or the "else if" parts better. you kinda just do it, and not explain WHY you did that. Makes the tutorial very inflexible. Ive never coded before, and I have 0 clue why you did any of that, in that specific order.
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
This isn’t a great spot to start if you’ve no coding experience. I’ve got beginner courses on my site and beginner tutorials on her. I know the desire to create something specific and cool when you’re starting out, but you need the basics down first before you try that.
@ta_pegandofogo2988
@ta_pegandofogo2988 Жыл бұрын
Because if he made the tutorial understandable for very begginers in coding, the video would end being 1 hour long (minimum). Btw: if you still don't know the basics of programming, you should start with logic. Example: if a == b, then a = 10; it would help you so much
GameMaker Studio 2.3 - How to Create and Use Tile Sets + Auto Tiling
12:30
Let's Learn This Together
Рет қаралды 44 М.
INSANELY Smooth pixel ATTACK Animation Tutorial
18:54
Penusbmic
Рет қаралды 526 М.
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 4,9 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 3,9 МЛН
Creating & Changing Rooms in GameMaker 2.3
23:19
Let's Learn This Together
Рет қаралды 26 М.
Beginner GameDev Mistakes - Ep 1
6:40
Shaun Spalding
Рет қаралды 161 М.
Creating SMART enemies from scratch! | Devlog
5:40
Challacade
Рет қаралды 279 М.
Game Engine Starter Guide: GameMaker [2024]
11:38
Ask Gamedev
Рет қаралды 35 М.
I tried coding my own graphics engine
4:23
Garbaj
Рет қаралды 189 М.
How to Create and Use Room Layers | GameMaker
11:15
GameMaker
Рет қаралды 10 М.
I Made the Same Game in 9 Engines
16:12
Emeral
Рет қаралды 270 М.
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН