In my 50 year long quest to find tutorials that DONT have a detailed explanation and have incomprehensible gibberish, I stumbled upon this tutorial and my quest had already come to a screeching halt with no other tutorials needed to be watched. Thank you for FINALLY giving us the PERFECT tutorial, seriously this tutorial is the BEST and Slyddar is the G.O.A.T 👍👍👍.
This is a hilarious response. You taking the time to write such a detailed reply is all the thanks I need. Best of luck to you in your coding future my friend.
Finally a tutorial that's informative and isn't trying to cram a ton of everything into a 20 min video and actually describes the reasoning behind what is being done 👍👍👍👍
Just got Gamemaker Studio 2, and was confused as I was trying to figure out how the Drag and Drop stuff works. Don't comment often, but I just gotta say I really appreciate this tutorial thus far, and plan to follow it through because it's really helped thus far~! :D
pretty underrated, compared to others, you actually explain what you are talking about. as in "this drag times the hsp will make it slow down" instead of just typing it in and not explaining.
Have to join here, these are a huge help. I've seen that people really judge the dnd because it's not a real coding but people like me, which are game artist and not a coders, these dnd's are a huge help to make the own game where you don't have to learn coding or copy paste from internet, you can actually follow the tutorial and learn there a simple way and even use that later when you understand how it works. Just ended my 6 months game studying with construct and it was great to learn and understand but it's monthly cost. For a long run it will cost a small fortune to use it for a hobby. That's why I bought this which is one time payment with dnd and people doing tutorials how to start. I will join the patreon because these are really helpful and want to thank you for your effort~
Hey Triture, thanks for the support. I'm glad you found the tutorials useful. I used to be a high school teacher, so I completely understand there are multiple methods in which people learn the best and I'm glad you've found a way which works for you. Lucky you purchased GMS2 before it's own subscription model kicked in, so at least you own a perpetual license now. New users can still use the free version and make their game with an all access version (other then exporting) though, as opposed to the creation limits Construct has on it's own free version.
bruh this content and your explanations are so clear and high quality. its insane that you only have so little subscribers.. ill try spreading the word about you with my friends! you deserve so much more than 1 mil. keep up the legendary work!
its really easy to follow, my first time using DnD but you helped me understand and I was able to make the "facing" variable work without watching tutorial, because of it. Thx, the tutorials will help me make a game for my friend's birthday which is really close.
I personally use a different method to create movement. I make key down events for the arrow keys (and WSAD) and place 2 "jump to point" actions on each of them. Then i also create 2 "if key down" conditions in order to control sprinting. This means that if the CTRL key (for example) is held down, the left arrow key will move to the left at speed 6, but if CTRL is not held down, it will only move to the left by 4. Still, thanks for teaching where to place those boxes. I had no idea how that worked for the longest time and was surprised when my actions wouldn't play out as intended.
Great vid! I'm having a little trouble and I just thought I'd log my bug-fixing process in case it helps anyone else. After I finished the video, my character still wasn't turning around. I didn't know where to start looking, but then I realized I could basically make my own debug menu by having GM2 draw the value of *facing* in the top-right corner. To do this, I just added a Draw Value command underneath the player's Draw Sprite Transformed one, and set its value to "facing" Because of this, I could see that the issue was that *facing* wasn't changing. In other words, I definitely know the problem is with updating the number rather than using the number in the right place. Now I know that I only have to worry about the step event because that's the only place that variable gets updated :) **EDIT** In the operation tree that begins with "If hsp !== 0" I accidentally tested the facing variable rather than the hsp. Now the problem is that the sprite teleports one character's-width each time I turn around; there is no smooth turning **EDIT 2** My sprite wasn't centered, so the facing variable was mirroring it about the top left corner! Oops! Works like a charm now
haha, you are correct! Let's spread the word on Twitter/Facebook and forums and get my series into the hands of more people. More views/followers/donations/subs means I can produce more tutorials in the end. Thanks for the support.
It is crazy how difficult it is to find GameMaker tutorials that utilize the visual editor. Thanks for making this! Subscribed :) Gonna check out your udemy courses as well.
Have been thinking the same...and if you want to learn gml code after doing the visual, you can swap to show it..but I like to learn from the visual first and then swap to gml code to see what's exactly being written
I can't believe I just found this! You're videos are so useful and you're so under rated! It's really weird how I have more subscribers than you, I hope you get 100% more!
Hello, Thank you so much for these videos. They really are the best tutorials around for Gamemaker. I have become a Patreon to you for $2 a month. I wish I could give you more, you deserve it, but I can't afford it at the moment. I'm hoping to be able to develop fun basic games and earn a second income from it. If/when I publish a game and I get 1000 downloads I will donate 10% of the profits to you because without your videos I would be completely lost. Thanks again for taking the time to make these videos, I hope you make some more and I really want to encourage other viewers to become a Patreon of Slyddar to help him along the way. Cheers!
Hi Larry, Thank you very much for your support. People like you enable people like me to continue giving back to the community. I appreciate you feel you've gained enough out of the series to give a little back. Your generous comment, and donation, really help me to produce more content, and even though my aim at the moment is a new video every month, if I had more contributors like you, I could invest more time into tutorials, and create much more content. As I try to be generous with my time, I am grateful you are generous with your donation. Good luck pursuing your goal, this is just the beginning for you!
Patreon supporters can now download the source code for the entire series, so if you are having a problem, you can compare my code to yours and see why your one may not be working. You can find the link in the description. Also note as of August 2020, Gamemaker 2.3 has been released, and has changed the way scripts work. They are now added as functions, and when you create a script you will see a "Declare a New Function" codeblock. The tutorial still works fine, but ensure all code for scripts is added under it's Declare a New Function codeblock, otherwise you will get an error. For more information see this thread - forum.yoyogames.com/index.php?threads/dnd-code-error.78336/post-465045 and this post for an actual visual description forum.yoyogames.com/index.php?threads/dnd-platformer-tutorial-bug.85103/#post-508840
Yes, But When I put It to the right of the "declare new function" block, it still gives me the error, do i need to do anything to the declare new function block?
@@brendanlange1656 Hi Brendan, thank you for the support, I really appreciate it. The source code is available to every Patreon member, so I'll send you the post link in a message via the site.
for the movement to stop for me before watching that part of the tutorial, i just repeated the same process with MAKING the player move but this time replace walk spd to just 0 when adding the value to the variable "hsp"
Thank you, was taking the tutorial on space rocks, I get the basis for gms, but really wanna specifically learn the nuts and bolts for platforming. Many thanks
I've been getting on well with these, but my character jitters when they move, I think because they're moving in sub-pixels and the camera isn't. What should I add to the code to make their movement pixel perfect? I've tried looking it up loads, but everything is based on coding rather then drag-and-drop so I'm stuck.
Hello, brilliant tutorial. Very helpful, just what I needed. I will be buying your Udemy course next week. Thanks for taking the time to do this video. Cheers.
hi. This is my first try to get along with Gamemaker. Your tutorial is very well done but unfortunately it doesn't work with the new version. In the forum I can't figure out how to do it. Can you please create a new tutorial for it ?
I added all the code but my character is just halfway off to the left of the screen and I can only move ‘em a bit to the left and the right. Any ideas how to fix this?
i did everything the same as you but my character moves a whole tile when i press an arrow that is a different direction edit:nvm just had to set origin to middle centre
lol, these smaal things are funnier and catch urselves when we're not ready. I remember the first time I used Game Maker and was always getting the same error, I didn't knew why, and after a month I realized that I was adding a value to a non existent variable.
First off, thanks for this amazing tutorial man! I noticed a glitch in the movement though - i've followed your full tutorial series two separate times, to really get it down but this glitch is happening in both projects: When you land, you cant instantly jump again. It seems to work if you jump and not move in any direction other than the vertical direction but if you land while some horizontal speed exists, you can't jump until a few moments after you've hit the ground. Why is that? I should show you my results at some point man, just to give some evidence to how helpful your work is! I've already implemented other mechanics i researched elsewhere or figured out myself - even though in probably the most janky way one could implement them, but hey, i'll get my structuring down eventually haha. So far i got a platformer with my very own pixel penguin who can double jump, glide and throw snowballs that break into pieces when hitting a wall and i'm really proud of it! And it's all thanks to you man! Can't wait to get started on your udemy course i bought recently!
My project doesn't have that problem. You can jump the moment you see the dust. Maybe add a draw text block and draw the on_ground variable in the players draw event to check if it's turning to 1 as soon as you are on the ground. A fun feature is jump anticipation, where while in the air and jump is pressed you set a variable like pre_jump to 20 or so. Ensure the variable counts down per step. When you land, if this variable is > 0, you set jump to true. This means someone can press jump just before landing, and it will still apply.
@@Slyddar Okay so i added the draw of on_ground. It's 1 when i land, so that works fine. And i gotta say, that glitch is hard to reliably reproduce. Often the moment you can jump again feels perfectly fine but sometimes it just doesn't. And i don't quite understand the second suggestion. If it counts down every step while in the air, wouldn't the amount of decrease in the variable pre_jump be dependant on the amount of time in air? Unless you mean that it starts counting from the moment that hsp is positive (so, moving down). Although with my double jump i would probably need to get the current distance to the ground first, as it varies. But to be honest, that is a little too complex for me to understand and implement yet i'm afraid. EDIT - wait, i think i kind of understand the prejump suggestion - it starts counting down from the moment you leave the ground. So the number (where you gave 20 as an example) is dependant on the steps it takes before one lands. But still "When you land, if this variable is > 0, you set jump to true" - wouldn't that mean that it essentially does the same thing as the check for whether or not the ground is at place? Thank you for helping me out man!
@@IAmStefanNixdorf I would say the jumping just comes down to timing. The code runs the same every time, if set like mine. So with the pre_jump, the variable only gets set to 20 if you are in the air, and you press jump. It should count down in all states, so maybe just add the code block to remove 1 from it in the calc_movement section. So in the idle and walk state, if pre_jump is > 0 it means it was pressed with 20 steps, and we've landed, so just above the check_jump you can set jump to true if pre_jump is > 0. Also you could set pre_jump to 0 at that stage too, it shouldn't be a problem as you move out of the idle and walk, but just to be sure.
@@Slyddar "I would say the jumping just comes down to timing. The code runs the same every time, if set like mine. " Most of the time it feels like it yeah, except for those rare occurences :/. "When you land, if this variable is > 0, you set jump to true." - Wait, maybe i misunderstood you. You didn't mean land as in "touch the ground", but as in "moving downwards", right? That would make sense to me. (That's from your previous reply, btw - just mentioning that to avoid confusion) To be honest i don't understand the whole part from " it means it was pressed with 20 steps" onwards. Sorry man. I feel flattered that you assume i have the competence to understand you there but currently i can't quite grasp it yet :D. "So in the idle and walk state, if pre_jump is > 0 it means it was pressed with 20 steps, and we've landed," - if it is >0, doesn' that mean we're in the air, instead of having landed? Since the counter gets set to 20 as soon as we take off i mean - and thus "so just above the check_jump you can set jump to true if pre_jump is > 0" wouldn't that mean, i could jump infinitely? Oh and, it makes sense to explain the pre_jump thing in the context of a single jump for clarity's sake here of course. I was just wondering, considering i have a double jump, i feel like i would need to get the current distance to the ground for an even jump anticipation (=pre_jump) buffer across all environments, right? But that's just a sidenote, maybe let's not focus on that for now, i don't know. Sorry if it's hard to get through to me here. I try to re-read your explanations many times and thought about your reply for about 10 or minutes, before concluding that i can't understand it. I don't want to unnecessarily waste your time, i'm really really thankful for the time you grant me! Pretty sure i'll start your course within the next few days. I wanted to create exactly the kind of game you made, so this will be really helpful. And it was a steal with the sale that was going on recently!
Scratch that - i think i just understood what you mean (at least for the most part). So when i jump, pre_jump gets set to 20 and is counting down. Now, if i land but pre_jump is still >0, jump will be set to true. Think i got that correct now, right? Now, what is the goal then though - 1. to have it reach 0 right before landing so i can jump again or 2. (assuming that my on_ground might not work properly) override the on_ground check (or something else, maybe that's not what you meant) in order to enable me to jump again instantly when i have landed?
Why assign hsp and then assign hsp to x and not just asign x from the begining? And why do a walk speed variable and not just asign x to .3. Seems like extra steps and you didn't really explain why we need these extra steps?
Feel like you couldve pointed out that in the facing values its important to use 1 and -1 and the values are not just being used as flags since the flip of the sprite is made by multiplying the X dimention by -1. Other than that i liked the tutorial
I feel it should work if hsp is in the variable definition. Make sure to choose the type as real & set the value to 0. Game Maker is also Case Sensitive, make sure hsp is written the same way in lower case through out the object. If an error still appears, perhaps add a Create Event and drag the block that says Var in the Create Event. In that Var Block, fill out the following : Name : hsp Value : 0 Relative : Unchecked
Pls help this is a great tut but i have code failed and I have done it many times. It says code hsp*drag failed I'm using the newest version so plz help me otherwise I'm not going to make this great game. If can help me pls I would be so happy
friction is a built in variable and is applied per step ALWAYS. So if you want to put the player in a state where you don't want friction to be applied, it is not possible.
Hello where do i request to download the files for following the code and do you supply pdf flash cards for install like hero's trail because i am not sure about genre but i like a mix of guns/melee/ bow and arrow and even magic or potion for my game. can you supply me the learning tools i need.
i have a problem, when i put the commands to make the player move, the player just go to the left part of the screen, idk how to fix it, if somebody do pls help me
I just downloaded Game Maker Studio 2. I imported a game from Game Maker Master Studio 1.4 and the game works, kind of. Sometimes pressing buttons works, sometimes it doesn't. The licenses I got are for Android and Windows. When going to the drag and drop environment, I am greeted with something that looks like it came from C++ or something. Is there a way to change the look of Game Maker 2 to a more familiar setting like Game Maker Master Studio or Game Maker 7?
please can you help! when i try to run it at 8:29 it just says this in errors: Object: o_player_PreCreate at line 2 : malformed assignment statement what does this mean and how do i fix it?
Love the Udemy Platform course!! New sub with Bell turned on. Looking forward to more training and hopefully 1 day you'll make a course for mobile game design in mind with all the beginning setups to advanced IAP, AD monetization and even multiplayer support. I'd pay for a kickstater in a heart beat.
umm i need help so my sprite when i move to the right it turns right but when i move left it does not but when i dont move it turns left Edit: i fixed it you have to remove the else and replace it with If key down Assign variable not else Assign variable
Is there a reason to create a facing variable and surrounding logic when you can just use the instance scale DND function to set it to 1 or -1 based on the already existing keypress tests?
@@GlamShatterskull Good question. I showed this method as an alternative to flipping the horizontal scale because that can lead to the character getting stuck in walls. Flipping the scale means you are also flipping the mask, and when you have a mask that has more pixels on one side then the other there is a chance you will get stuck when changing direction. Using a facing variable removes this risk, and you can ensure this method will work every time, no matter what size mask you use.
thank you for video, The subtitles of all your tutorials, for Spanish are failing (They are overlapping. and I could not follow your tutorials. Please help us fix them.), since the policies of etitles subtitles changed, the subtitles fail and should be updated, then I will leave a thread of the conversation with Shaun Spalding, since the same thing is happening to you .
Sorry to hear that. Unfortunately I don't control the subtitles, but have enabled the option for them to be added by others. If it's a problem with UA-cam themselves, it might be worth reporting though.
@@Slyddar I was referring to its automatic title that is generated. You can fix it from the option (edit video) subtitles. you just have to deactivate automatic subtitles and reactivate them. That will fix the problem. You can see the previous url, where I tell Shaun the problem for him.
@@elbituan I believe links are disabled in UA-cam comments, so I can't see the thread conversation you are referring to. I'm happy to resolve it, so maybe send me the link via twitter @slyddarstudios
It says 'For details on why this build didnt work, please review the whole log and the Compile Errors window' but there werent any errors in the Compile Errors window and I dont know what any of the stuff in the log means
Any chance you have a tutorial showing how to do this but with a custom animated sprite and with different animations? I have a sprite and Following your tutial I did everything the same but how do I switch from idle to walk animation? Thanks in advance!!!
I don't quite understand the "declare a new function code block." i get the error everyone seems to have but adding that to the top of the string isn't doing anything. what arguments am i supposed to put in the "declare new function" code block
The pinned comment describes the changes in 2.3, and has a link to a forum post showing what you need to do. A future video which was made just after 2.3 was released has a section where I talk about what you need to do with the Declare a New Function codeblock - ua-cam.com/video/-nn1vx2P7Nw/v-deo.html
HI! Thanks a Bunch for this tutorial! I was finally able to have my character face the other direction. Although the only issue i'm facing is that since my player has hand/feet moving animations, they for some reason stop moving when I run the game... any fix for that would be much appreciated!
How do you make the player skid to a stop or stop instantly? I want to have multiple characters, one which slides (Kind of like Luigi from SMB2: the Lost Levels), and another that stops immediately. Do I have to change the drag for that?
Changing drag, or setting separate drag variables for player and enemies, will allow slower stopping for different entities. The skidding animation is what will be your challenge.
hello im newbie. what's the difference of doing this or only put step event with: ´ spd = 1 if key "D" down X relative position + spd With this simple step I am able to move the character, but I want to identify the advantages of making a more advanced code
When we code knockback later, we stop the player moving during that time. With hard coding like you are suggesting, the player will always be able to move. Also if you add a speed pickup, or similar, it won't work, as you are always setting the speed.
Maybe in the future, but it's a smaller market then GML, and a course is a major commitment. In the end if I can get more support I can make more tutorials, so I'm hoping that can happen. Thanks for the comment.
@@arturbarcelos2636 A patch for Gamemaker 2 was recently released, version 2.3. This changed a few things, including renaming the resources tab to the asset tab, effectively making older tutorials inaccurate. Once you get past the small differences most things are the same though. Ensure you read my pinned comments or the video description, as I address anything that is a real issue.
Have you done any tutorials on GMS 1 I still can't get to grips with a lot of the basics. Sadly for me almost every tutorial I've come across is either about GMS 2 or doesn't cover the things I'm actually struggling with.
I started out with a Gamemaker Studio 1 GML course, which I've now retired as it's quite old, and my coding has improved since that time. The course still exists though, and even though I don't charge for it now, I'm happy to give you a free coupon if you want some GMS1 content - www.udemy.com/course/draft/1115186/?couponCode=GAMEMAKER_STUDIO_1
Just wanted to say, how come when i put in the "x" and "hsp" variable putting it as relative too, AND following the steps correctly, it still gives me some "code error" popup? could anyone help me here?
In my 50 year long quest to find tutorials that DONT have a detailed explanation and have incomprehensible gibberish, I stumbled upon this tutorial and my quest had already come to a screeching halt with no other tutorials needed to be watched. Thank you for FINALLY giving us the PERFECT tutorial, seriously this tutorial is the BEST and Slyddar is the G.O.A.T 👍👍👍.
This is a hilarious response. You taking the time to write such a detailed reply is all the thanks I need. Best of luck to you in your coding future my friend.
Finally a tutorial that's informative and isn't trying to cram a ton of everything into a 20 min video and actually describes the reasoning behind what is being done 👍👍👍👍
Just got Gamemaker Studio 2, and was confused as I was trying to figure out how the Drag and Drop stuff works. Don't comment often, but I just gotta say I really appreciate this tutorial thus far, and plan to follow it through because it's really helped thus far~! :D
I got a question, every time I search up the download for it all I see is the first game maker
@@physix4095 it changed its name
pretty underrated, compared to others, you actually explain what you are talking about. as in "this drag times the hsp will make it slow down" instead of just typing it in and not explaining.
I’m so happy I finally found a tutorial with visual coding, and not scripting.
bro if u see this just know your a beast i was curious about this engine and the first video i seen is yours and it actually worked , i learned a lot
You explain so much better than the YoYo tutorials!
Have to join here, these are a huge help. I've seen that people really judge the dnd because it's not a real coding but people like me, which are game artist and not a coders, these dnd's are a huge help to make the own game where you don't have to learn coding or copy paste from internet, you can actually follow the tutorial and learn there a simple way and even use that later when you understand how it works.
Just ended my 6 months game studying with construct and it was great to learn and understand but it's monthly cost. For a long run it will cost a small fortune to use it for a hobby. That's why I bought this which is one time payment with dnd and people doing tutorials how to start. I will join the patreon because these are really helpful and want to thank you for your effort~
Hey Triture, thanks for the support. I'm glad you found the tutorials useful. I used to be a high school teacher, so I completely understand there are multiple methods in which people learn the best and I'm glad you've found a way which works for you.
Lucky you purchased GMS2 before it's own subscription model kicked in, so at least you own a perpetual license now. New users can still use the free version and make their game with an all access version (other then exporting) though, as opposed to the creation limits Construct has on it's own free version.
I know its an old video but this is helping me wrap my brain around coding so much! I hope you continue doing more videos!
bruh this content and your explanations are so clear and high quality. its insane that you only have so little subscribers.. ill try spreading the word about you with my friends! you deserve so much more than 1 mil. keep up the legendary work!
yea this guy is pretty dope , do you know if he put out a vid on virtual or on-screen controls for the player
yeah he awesome. but its not 1 mil.. its 1.55 k :(
@@annoyingkittycat6449 he means that if it was 1 mil it still wouldn't be enough.
Thank you very much. I from east europa, and have depression, youre lessons save me.
Creativity helps to cope with bad thoughts.
Amazing Tutorial! You made it so easy to follow and learn from. I finally feel like I'm getting somewhere. Subbed!
its really easy to follow, my first time using DnD but you helped me understand and I was able to make the "facing" variable work without watching tutorial, because of it. Thx, the tutorials will help me make a game for my friend's birthday which is really close.
🥳
I personally use a different method to create movement. I make key down events for the arrow keys (and WSAD) and place 2 "jump to point" actions on each of them. Then i also create 2 "if key down" conditions in order to control sprinting. This means that if the CTRL key (for example) is held down, the left arrow key will move to the left at speed 6, but if CTRL is not held down, it will only move to the left by 4. Still, thanks for teaching where to place those boxes. I had no idea how that worked for the longest time and was surprised when my actions wouldn't play out as intended.
How do I fix the bug that i get stuck into the floor
I think I can speak for everyone when I say that you deserve more than 8k subs. +1 subscriber!
thanks so much this is the first time in my life i feel like i could finally upgrade from scratch
Excellent and thorough. Thank you so much for this series.
Great vid! I'm having a little trouble and I just thought I'd log my bug-fixing process in case it helps anyone else.
After I finished the video, my character still wasn't turning around. I didn't know where to start looking, but then I realized I could basically make my own debug menu by having GM2 draw the value of *facing* in the top-right corner. To do this, I just added a Draw Value command underneath the player's Draw Sprite Transformed one, and set its value to "facing"
Because of this, I could see that the issue was that *facing* wasn't changing. In other words, I definitely know the problem is with updating the number rather than using the number in the right place. Now I know that I only have to worry about the step event because that's the only place that variable gets updated :)
**EDIT**
In the operation tree that begins with "If hsp !== 0" I accidentally tested the facing variable rather than the hsp.
Now the problem is that the sprite teleports one character's-width each time I turn around; there is no smooth turning
**EDIT 2**
My sprite wasn't centered, so the facing variable was mirroring it about the top left corner! Oops! Works like a charm now
You need WAAAAAAAAY more subscribers. You are a great teacher!
haha, you are correct! Let's spread the word on Twitter/Facebook and forums and get my series into the hands of more people. More views/followers/donations/subs means I can produce more tutorials in the end. Thanks for the support.
Hey do you know why the sprite just shrunk right after we input the information for the different facing directions for walking?
Yea
Im really happy that u made this tutorial. Im now working on a game called "Pixel the Rabbit"!
i didnt take any complications during this tutorial.. Good job!
It is crazy how difficult it is to find GameMaker tutorials that utilize the visual editor. Thanks for making this! Subscribed :) Gonna check out your udemy courses as well.
Have been thinking the same...and if you want to learn gml code after doing the visual, you can swap to show it..but I like to learn from the visual first and then swap to gml code to see what's exactly being written
I can't believe I just found this! You're videos are so useful and you're so under rated! It's really weird how I have more subscribers than you, I hope you get 100% more!
Hey mate, glad you enjoy it. And yep, we need to get me more subscribers so I can make more content :)
Pitchcliff not anymore lol
@@blitzy7742 Wow he grew fast. GGs
@@blitzy7742 I thought I caught up to him, but now I'm 100 subs behind lmao
yo tysm i was working on a sonic game now he can move soo smoothly tysm
Hello, Thank you so much for these videos. They really are the best tutorials around for Gamemaker. I have become a Patreon to you for $2 a month. I wish I could give you more, you deserve it, but I can't afford it at the moment. I'm hoping to be able to develop fun basic games and earn a second income from it. If/when I publish a game and I get 1000 downloads I will donate 10% of the profits to you because without your videos I would be completely lost. Thanks again for taking the time to make these videos, I hope you make some more and I really want to encourage other viewers to become a Patreon of Slyddar to help him along the way. Cheers!
Hi Larry,
Thank you very much for your support. People like you enable people like me to continue giving back to the community. I appreciate you feel you've gained enough out of the series to give a little back. Your generous comment, and donation, really help me to produce more content, and even though my aim at the moment is a new video every month, if I had more contributors like you, I could invest more time into tutorials, and create much more content. As I try to be generous with my time, I am grateful you are generous with your donation. Good luck pursuing your goal, this is just the beginning for you!
As soon as I did the draw sprite transformed it made my player sprite massive
Thank you for making a video for gamemaker drag n drop
i like drag and drop alot more, i dont have to sit here and acually type out all the codes and it is way easier to remember
Thank you so much this tutorial is so much better than the others I can actually understand what's happening
Thanks for posting to Udemy, looking forward to this lesson. Maybe I could teach my own son how to make his games
hey, ty for this tutorial. It took a while but i eventually managed to complete it! You explained everything quite nicely.
Heya, glad you enjoyed it. I have a few more episodes coming up soon too.
Thanks Man, keep up the good work! Really appreciate it.
These are gold! Thank you
i really like tutorial cuz you say most stuff in detail and for a reason thank you :D
Patreon supporters can now download the source code for the entire series, so if you are having a problem, you can compare my code to yours and see why your one may not be working. You can find the link in the description.
Also note as of August 2020, Gamemaker 2.3 has been released, and has changed the way scripts work. They are now added as functions, and when you create a script you will see a "Declare a New Function" codeblock. The tutorial still works fine, but ensure all code for scripts is added under it's Declare a New Function codeblock, otherwise you will get an error. For more information see this thread - forum.yoyogames.com/index.php?threads/dnd-code-error.78336/post-465045 and this post for an actual visual description forum.yoyogames.com/index.php?threads/dnd-platformer-tutorial-bug.85103/#post-508840
Yes, But When I put It to the right of the "declare new function" block, it still gives me the error, do i need to do anything to the declare new function block?
I support on patreon but I can't find the download, do you need to be a higher level of supporter?
@@brendanlange1656 Hi Brendan, thank you for the support, I really appreciate it. The source code is available to every Patreon member, so I'll send you the post link in a message via the site.
@@Slyddar Thank you Appreciate it
Best. Also its visual tuttorial for noobs, not the code
Thank you for that
so far so good with your tutorial! im looking forward to learn how to make platformers from you :D
for the movement to stop for me before watching that part of the tutorial, i just repeated the same process with MAKING the player move but this time replace walk spd to just 0 when adding the value to the variable "hsp"
Thank you, was taking the tutorial on space rocks, I get the basis for gms, but really wanna specifically learn the nuts and bolts for platforming. Many thanks
yeah, I remember ages ago, back in one of the older editions of game maker, they had a tutorial for it. but now they dont. its dumb.
thanks man, you saved my life LMAO... hello from brasil to you :3
i still got errors on what i think was something to do with walking when ever i use the left or right arrow i gives a code error
I've been getting on well with these, but my character jitters when they move, I think because they're moving in sub-pixels and the camera isn't. What should I add to the code to make their movement pixel perfect? I've tried looking it up loads, but everything is based on coding rather then drag-and-drop so I'm stuck.
Hello, brilliant tutorial. Very helpful, just what I needed. I will be buying your Udemy course next week. Thanks for taking the time to do this video. Cheers.
I appreciate the support and comment, thank you for coming along for the ride :)
now I can finally reach my dream
thank you
hi. This is my first try to get along with Gamemaker. Your tutorial is very well done but unfortunately it doesn't work with the new version. In the forum I can't figure out how to do it. Can you please create a new tutorial for it ?
Thanks man this was really informative, I've been wanting to get better at games and you've allowed me to do that ty sir :).
I added all the code but my character is just halfway off to the left of the screen and I can only move ‘em a bit to the left and the right. Any ideas how to fix this?
i did everything the same as you but my character moves a whole tile when i press an arrow that is a different direction
edit:nvm just had to set origin to middle centre
lol, these smaal things are funnier and catch urselves when we're not ready. I remember the first time I used Game Maker and was always getting the same error, I didn't knew why, and after a month I realized that I was adding a value to a non existent variable.
Same thing was happening to me too thx for tellin me how to fix it!👍
this code dosent work on me what i did same thing as u
I did the exact same thing you did but my sprite is acting weird after doing the last "draw" part. Why?
First off, thanks for this amazing tutorial man! I noticed a glitch in the movement though - i've followed your full tutorial series two separate times, to really get it down but this glitch is happening in both projects: When you land, you cant instantly jump again. It seems to work if you jump and not move in any direction other than the vertical direction but if you land while some horizontal speed exists, you can't jump until a few moments after you've hit the ground. Why is that?
I should show you my results at some point man, just to give some evidence to how helpful your work is! I've already implemented other mechanics i researched elsewhere or figured out myself - even though in probably the most janky way one could implement them, but hey, i'll get my structuring down eventually haha. So far i got a platformer with my very own pixel penguin who can double jump, glide and throw snowballs that break into pieces when hitting a wall and i'm really proud of it! And it's all thanks to you man! Can't wait to get started on your udemy course i bought recently!
My project doesn't have that problem. You can jump the moment you see the dust. Maybe add a draw text block and draw the on_ground variable in the players draw event to check if it's turning to 1 as soon as you are on the ground. A fun feature is jump anticipation, where while in the air and jump is pressed you set a variable like pre_jump to 20 or so. Ensure the variable counts down per step. When you land, if this variable is > 0, you set jump to true. This means someone can press jump just before landing, and it will still apply.
@@Slyddar Okay so i added the draw of on_ground. It's 1 when i land, so that works fine. And i gotta say, that glitch is hard to reliably reproduce. Often the moment you can jump again feels perfectly fine but sometimes it just doesn't.
And i don't quite understand the second suggestion. If it counts down every step while in the air, wouldn't the amount of decrease in the variable pre_jump be dependant on the amount of time in air? Unless you mean that it starts counting from the moment that hsp is positive (so, moving down). Although with my double jump i would probably need to get the current distance to the ground first, as it varies. But to be honest, that is a little too complex for me to understand and implement yet i'm afraid.
EDIT - wait, i think i kind of understand the prejump suggestion - it starts counting down from the moment you leave the ground. So the number (where you gave 20 as an example) is dependant on the steps it takes before one lands. But still "When you land, if this variable is > 0, you set jump to true" - wouldn't that mean that it essentially does the same thing as the check for whether or not the ground is at place?
Thank you for helping me out man!
@@IAmStefanNixdorf I would say the jumping just comes down to timing. The code runs the same every time, if set like mine.
So with the pre_jump, the variable only gets set to 20 if you are in the air, and you press jump. It should count down in all states, so maybe just add the code block to remove 1 from it in the calc_movement section. So in the idle and walk state, if pre_jump is > 0 it means it was pressed with 20 steps, and we've landed, so just above the check_jump you can set jump to true if pre_jump is > 0. Also you could set pre_jump to 0 at that stage too, it shouldn't be a problem as you move out of the idle and walk, but just to be sure.
@@Slyddar "I would say the jumping just comes down to timing. The code runs the same every time, if set like mine.
" Most of the time it feels like it yeah, except for those rare occurences :/.
"When you land, if this variable is > 0, you set jump to true." - Wait, maybe i misunderstood you. You didn't mean land as in "touch the ground", but as in "moving downwards", right? That would make sense to me. (That's from your previous reply, btw - just mentioning that to avoid confusion)
To be honest i don't understand the whole part from " it means it was pressed with 20 steps" onwards. Sorry man. I feel flattered that you assume i have the competence to understand you there but currently i can't quite grasp it yet :D. "So in the idle and walk state, if pre_jump is > 0 it means it was pressed with 20 steps, and we've landed," - if it is >0, doesn' that mean we're in the air, instead of having landed? Since the counter gets set to 20 as soon as we take off i mean - and thus "so just above the check_jump you can set jump to true if pre_jump is > 0" wouldn't that mean, i could jump infinitely?
Oh and, it makes sense to explain the pre_jump thing in the context of a single jump for clarity's sake here of course. I was just wondering, considering i have a double jump, i feel like i would need to get the current distance to the ground for an even jump anticipation (=pre_jump) buffer across all environments, right? But that's just a sidenote, maybe let's not focus on that for now, i don't know.
Sorry if it's hard to get through to me here. I try to re-read your explanations many times and thought about your reply for about 10 or minutes, before concluding that i can't understand it. I don't want to unnecessarily waste your time, i'm really really thankful for the time you grant me! Pretty sure i'll start your course within the next few days. I wanted to create exactly the kind of game you made, so this will be really helpful. And it was a steal with the sale that was going on recently!
Scratch that - i think i just understood what you mean (at least for the most part). So when i jump, pre_jump gets set to 20 and is counting down. Now, if i land but pre_jump is still >0, jump will be set to true. Think i got that correct now, right? Now, what is the goal then though - 1. to have it reach 0 right before landing so i can jump again or 2. (assuming that my on_ground might not work properly) override the on_ground check (or something else, maybe that's not what you meant) in order to enable me to jump again instantly when i have landed?
Why assign hsp and then assign hsp to x and not just asign x from the begining? And why do a walk speed variable and not just asign x to .3. Seems like extra steps and you didn't really explain why we need these extra steps?
My sprite keeps turning 10 pixels away when I turn the other direction now, I don't understand
Feel like you couldve pointed out that in the facing values its important to use 1 and -1 and the values are not just being used as flags since the flip of the sprite is made by multiplying the X dimention by -1. Other than that i liked the tutorial
instead of drawing the sprite for scale you can use the scale on the step event
sir if i am pressing play botton,my play window is not showing anything
It says it unable to draw sprite_index on the Draw Sprite Transformed, so what do i do
I assume that Game Maker has new in-engine variables, because using drag as a variable didn't work for me but changing it to drg did.
Hey! Whenever i add the draw my image keeps getting HUGE how do i fix this
What tools/Settings are you using? I'm not a master, but I do know How To Sprite.
I solved the same problem by simply changing the name of the variable from "direction" to "facing".
Sorry for answering so late!
:D
What is the place of my keyboard that i press for move my object when you do run?
giving me an error thing, tried to debug but still dont work
Why does it say FATAL ERROR in action number 1 of step event0 for object o_player, hsp value not found
I feel it should work if hsp is in the variable definition. Make sure to choose the type as real & set the value to 0.
Game Maker is also Case Sensitive, make sure hsp is written the same way in lower case through out the object.
If an error still appears, perhaps add a Create Event and drag the block that says Var in the Create Event. In that Var Block, fill out the following :
Name : hsp
Value : 0
Relative : Unchecked
@@VICE-H3RO Thanks! I looked through my code, and i found that i had spelled " hsp " as " Hsp "!
@@gamesrockets996 No Problem :)
Pls help this is a great tut but i have code failed and I have done it many times. It says code hsp*drag failed I'm using the newest version so plz help me otherwise I'm not going to make this great game. If can help me pls I would be so happy
Please make the DnD version lesson on udemy..
when i hit run to test, im not able to see my sprite
Your videos are the best!
i really wish you would explain why we should write in sprite and image index, if you expect us to use it
What's the reason he uses drag and not the default friction? Is it a new thing?
friction is a built in variable and is applied per step ALWAYS. So if you want to put the player in a state where you don't want friction to be applied, it is not possible.
Hello where do i request to download the files for following the code and do you supply pdf flash cards for install like hero's trail because i am not sure about genre but i like a mix of guns/melee/ bow and arrow and even magic or potion for my game. can you supply me the learning tools i need.
i need with the part where you make the character turn around
i have a problem, when i put the commands to make the player move, the player just go to the left part of the screen, idk how to fix it, if somebody do pls help me
I just downloaded Game Maker Studio 2. I imported a game from Game Maker Master Studio 1.4 and the game works, kind of. Sometimes pressing buttons works, sometimes it doesn't. The licenses I got are for Android and Windows. When going to the drag and drop environment, I am greeted with something that looks like it came from C++ or something. Is there a way to change the look of Game Maker 2 to a more familiar setting like Game Maker Master Studio or Game Maker 7?
hey help please i can only go foward but not backwards
i dont know how but it dosent move even after the x thing
please can you help! when i try to run it at 8:29 it just says this in errors: Object: o_player_PreCreate at line 2 : malformed assignment statement
what does this mean and how do i fix it?
I get the same problem.....
Love the Udemy Platform course!! New sub with Bell turned on. Looking forward to more training and hopefully 1 day you'll make a course for mobile game design in mind with all the beginning setups to advanced IAP, AD monetization and even multiplayer support. I'd pay for a kickstater in a heart beat.
umm i need help so my sprite when i move to the right it turns right but when i move left it does not but when i dont move it turns left
Edit: i fixed it you have to remove the else and replace it with
If key down Assign variable
not else Assign variable
i can't see my character!
Is there a reason to create a facing variable and surrounding logic when you can just use the instance scale DND function to set it to 1 or -1 based on the already existing keypress tests?
Loving the tutorial! Is this just as valid a solution? prnt.sc/rozqsb
@@GlamShatterskull Good question. I showed this method as an alternative to flipping the horizontal scale because that can lead to the character getting stuck in walls. Flipping the scale means you are also flipping the mask, and when you have a mask that has more pixels on one side then the other there is a chance you will get stuck when changing direction. Using a facing variable removes this risk, and you can ensure this method will work every time, no matter what size mask you use.
@@Slyddar awesome! Thank you for the response!
thank you for video, The subtitles of all your tutorials, for Spanish are failing (They are overlapping. and I could not follow your tutorials. Please help us fix them.), since the policies of etitles subtitles changed, the subtitles fail and should be updated, then I will leave a thread of the conversation with Shaun Spalding, since the same thing is happening to you .
hello this is de conversation with Shaun Spalding,
The images can illustrate the problem twitter.com/shaunspalding/status/1225100303986577408
Sorry to hear that. Unfortunately I don't control the subtitles, but have enabled the option for them to be added by others. If it's a problem with UA-cam themselves, it might be worth reporting though.
@@Slyddar I was referring to its automatic title that is generated. You can fix it from the option (edit video) subtitles. you just have to deactivate automatic subtitles and reactivate them. That will fix the problem. You can see the previous url, where I tell Shaun the problem for him.
@@elbituan I believe links are disabled in UA-cam comments, so I can't see the thread conversation you are referring to. I'm happy to resolve it, so maybe send me the link via twitter @slyddarstudios
Is there a reason not to change directly the image_xscale instance variable instead of drawing a reversed sprite in the Draw event?
Unless you can be sure your sprite mask can be mirrored without overlap, meaning the mask width is an even number, this is the safest method.
It says 'For details on why this build didnt work, please review the whole log and the Compile Errors window' but there werent any errors in the Compile Errors window and I dont know what any of the stuff in the log means
Ok I got it to work but now it wont move
why does it say error..
ive done all things right
..
Any chance you have a tutorial showing how to do this but with a custom animated sprite and with different animations? I have a sprite and Following your tutial I did everything the same but how do I switch from idle to walk animation? Thanks in advance!!!
In one of the later episodes I show how to add an animated sprite, which has an idle and a walk animation.
7:39 who got scared because his character didn t move
WHY DOES MY CHARACTER GO SO FAST WHEN HE GOES LEFT!?!?!?!?!
for some reason the drag isn't working for me?
the drag effect is cool but can I add accellaration aswell?
I don't quite understand the "declare a new function code block." i get the error everyone seems to have but adding that to the top of the string isn't doing anything. what arguments am i supposed to put in the "declare new function" code block
The pinned comment describes the changes in 2.3, and has a link to a forum post showing what you need to do. A future video which was made just after 2.3 was released has a section where I talk about what you need to do with the Declare a New Function codeblock - ua-cam.com/video/-nn1vx2P7Nw/v-deo.html
@@Slyddar I added the declare function code block to the top with everything else to the right like in the link but now the character won’t move :(
HI! Thanks a Bunch for this tutorial! I was finally able to have my character face the other direction. Although the only issue i'm facing is that since my player has hand/feet moving animations, they for some reason stop moving when I run the game... any fix for that would be much appreciated!
Ok this was uploaded really close to my birthday.. like really close 😂
How do you make the player skid to a stop or stop instantly?
I want to have multiple characters, one which slides (Kind of like Luigi from SMB2: the Lost Levels), and another that stops immediately. Do I have to change the drag for that?
Changing drag, or setting separate drag variables for player and enemies, will allow slower stopping for different entities. The skidding animation is what will be your challenge.
hello im newbie.
what's the difference of doing this or only put step event with:
´
spd = 1
if key "D" down
X relative position + spd
With this simple step I am able to move the character, but I want to identify the advantages of making a more advanced code
When we code knockback later, we stop the player moving during that time. With hard coding like you are suggesting, the player will always be able to move. Also if you add a speed pickup, or similar, it won't work, as you are always setting the speed.
The DnD tutorial is great! Can you add more DnD game tutorials to Udemy?
Maybe in the future, but it's a smaller market then GML, and a course is a major commitment. In the end if I can get more support I can make more tutorials, so I'm hoping that can happen. Thanks for the comment.
I made the codes but my character was too small, and even if I increased it, it didn't change, what do I do?
decrease the room size
I don't know if you even respond to these questions anymore, but on your far right it's ''resources'' for me it's assets
As a matter of fact, a lot of things are different, i managed to create a sprite, and it's also different to yours.
@@arturbarcelos2636 A patch for Gamemaker 2 was recently released, version 2.3. This changed a few things, including renaming the resources tab to the asset tab, effectively making older tutorials inaccurate. Once you get past the small differences most things are the same though. Ensure you read my pinned comments or the video description, as I address anything that is a real issue.
I run it and it says that the X variable is not read or recongnised
what do i do
Read the pinned message in the comments about the changes you need to make for Gamemaker 2.3
Have you done any tutorials on GMS 1 I still can't get to grips with a lot of the basics. Sadly for me almost every tutorial I've come across is either about GMS 2 or doesn't cover the things I'm actually struggling with.
I started out with a Gamemaker Studio 1 GML course, which I've now retired as it's quite old, and my coding has improved since that time. The course still exists though, and even though I don't charge for it now, I'm happy to give you a free coupon if you want some GMS1 content - www.udemy.com/course/draft/1115186/?couponCode=GAMEMAKER_STUDIO_1
Just wanted to say, how come when i put in the "x" and "hsp" variable putting it as relative too, AND following the steps correctly, it still gives me some "code error" popup? could anyone help me here?
Post the error, exactly as it shows, and we might be able to help you.
How do I make the sprite turn to the Y direction?