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.
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
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 👍👍👍👍
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!
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 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.
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.
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.
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.
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!
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
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
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!
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
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?
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.
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.
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.
*LISTEN EVERYONE YOUR GOING TO WANT TO KNOW THIS* This is a great tutorial BUT Just to save people some time and frustration just REMEMBER to put global variables you create in the create event NOT in the Object Variable Definitions with GML’s Latest update this is no longer permitted and will give you an error when trying to test your game .
Yep, this recent GM change to the previously set rules does cause issues. There is a pinned post which mentions it, and which has a link showing how to fix it. In any tutorial, it's a lesson to read any pinned posts if you are having problems.
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 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.
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"
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'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.
@@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.
@Slyddar // Although lots, if not all tutorials out there have their own merits. Your tutorials will always have a special place in my heart! ^o^ My project is based on your platformer tutorial from Udemy. What a steal! I think it was 10 or 5 dollars. I never tried DND, but watching this video, I wish I had. I think trying one simple game in DND would have helped me when I started learning GML and the gms2 engine. Anyway! ✌️✌️see you.
Was the project Slug Eating? It looks funky, hehe. I checked out your videos, you have a real quirky sense of humour. They are all looking great, keep it up and thanks for supporting me.
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
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?
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.
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.
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?
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
When you delete a resource Gamemaker saves your project. There is no way to recover it, unless you have a backup. CTRL-Z / Undo does not work in the resource tree.
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
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
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.
Hey so first off ,thanks for this tutotrial ,this really help me to start making a game. I only recently started to use game maker with your tutorial and it work perfectly at first ,but today ,when I tried to make a new project and put the exact same code from your video , while the game did started , my character only move one pixel on the direction I wish for him to go when pressing the key button , before returning back at the far left of the screen. It did this for any input , moving in the direction and being stuck in what seems to be an invisible box around him blocking hum from going more than 1 pixel
@@Slyddar OK after working on it for a few days i notice my mistake. I just forgot to make the value of hsp relative when setting the X value I feel stupid but I guess it is what most programmer deal with in general xD
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 - ruclips.net/video/-nn1vx2P7Nw/видео.html
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.
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
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 👍👍👍👍
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.
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 know its an old video but this is helping me wrap my brain around coding so much! I hope you continue doing more videos!
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
Amazing Tutorial! You made it so easy to follow and learn from. I finally feel like I'm getting somewhere. Subbed!
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
You explain so much better than the YoYo tutorials!
Thank you very much. I from east europa, and have depression, youre lessons save me.
Creativity helps to cope with bad thoughts.
I think I can speak for everyone when I say that you deserve more than 8k subs. +1 subscriber!
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.
🥳
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.
Excellent and thorough. Thank you so much for this series.
thanks so much this is the first time in my life i feel like i could finally upgrade from scratch
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
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
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
Im really happy that u made this tutorial. Im now working on a game called "Pixel the Rabbit"!
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
As soon as I did the draw sprite transformed it made my player sprite massive
yo tysm i was working on a sonic game now he can move soo smoothly tysm
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
i didnt take any complications during this tutorial.. Good job!
so far so good with your tutorial! im looking forward to learn how to make platformers from you :D
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!
Thanks Man, keep up the good work! Really appreciate it.
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 for making a video for gamemaker drag n drop
These are gold! Thank you
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, you saved my life LMAO... hello from brasil to you :3
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 :).
this was helpful :)
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.
i really like tutorial cuz you say most stuff in detail and for a reason thank you :D
now I can finally reach my dream
thank you
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?
Best. Also its visual tuttorial for noobs, not the code
Thank you for that
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 :)
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.
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
Your videos are the best!
*LISTEN EVERYONE YOUR GOING TO WANT TO KNOW THIS*
This is a great tutorial BUT Just to save people some time and frustration just REMEMBER to put global variables you create in the create event NOT in the Object Variable Definitions with GML’s Latest update this is no longer permitted and will give you an error when trying to test your game .
Yep, this recent GM change to the previously set rules does cause issues. There is a pinned post which mentions it, and which has a link showing how to fix it. In any tutorial, it's a lesson to read any pinned posts if you are having problems.
instead of drawing the sprite for scale you can use the scale on the step event
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 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 was great
I like you tutorials
Ok this was uploaded really close to my birthday.. like really close 😂
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"
Amazing tutorial
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 ?
Ah, Dragon drop :D
thanku very much for this video
amazing
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.
this code dosent work on me what i did same thing as u
Good Job. ✌
Best ever
OMG so useful thank youTT
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.
Just wait until you see my games on Steam, Google Play/App Store, or even in stores!
Good Luck!
@@ronberry5314 Yesterday I finished this (first) tutorial successfully, when I'm free I can start the second and maybe third tutorials
My sprite keeps turning 10 pixels away when I turn the other direction now, I don't understand
@Slyddar // Although lots, if not all tutorials out there have their own merits. Your tutorials will always have a special place in my heart! ^o^ My project is based on your platformer tutorial from Udemy. What a steal! I think it was 10 or 5 dollars. I never tried DND, but watching this video, I wish I had. I think trying one simple game in DND would have helped me when I started learning GML and the gms2 engine. Anyway! ✌️✌️see you.
Was the project Slug Eating? It looks funky, hehe. I checked out your videos, you have a real quirky sense of humour. They are all looking great, keep it up and thanks for supporting me.
@@Slyddar Kudos for the teacher that looks at students projects.
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 :)
I did the exact same thing you did but my sprite is acting weird after doing the last "draw" part. Why?
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?
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.
sir if i am pressing play botton,my play window is not showing anything
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.
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
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?
i need with the part where you make the character turn around
What is the place of my keyboard that i press for move my object when you do run?
It says it unable to draw sprite_index on the Draw Sprite Transformed, so what do i do
giving me an error thing, tried to debug but still dont work
the drag effect is cool but can I add accellaration aswell?
are you australian? just the accent. very rare to find a fellow aussie doing stuff like this.
You got it! Well my opener is "G'day Gamers", so I'm happy to embrace my Aussie heritage.
WHY DOES MY CHARACTER GO SO FAST WHEN HE GOES LEFT!?!?!?!?!
hey help please i can only go foward but not backwards
It is building continuously without stopping while I press run😵
The drag is not being applied correctly. Check you have done that correctly at around 8:48.
i dont know how but it dosent move even after the x thing
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 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.
I deleted my resource tree for experimental purposes, but now I don’t know how to get it back, please help!! 😫😫😫
When you delete a resource Gamemaker saves your project. There is no way to recover it, unless you have a backup. CTRL-Z / Undo does not work in the resource tree.
Slyddar oh, that’s unfortunate... anyways, thanks for your time and help, I deeply appreciate it! :D
Slyddar also, this seems like a decent channel, I’m subscribing.
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
why does it say error..
ive done all things right
..
i really wish you would explain why we should write in sprite and image index, if you expect us to use it
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
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 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
Hey so first off ,thanks for this tutotrial ,this really help me to start making a game.
I only recently started to use game maker with your tutorial and it work perfectly at first ,but today ,when I tried to make a new project and put the exact same code from your video , while the game did started , my character only move one pixel on the direction I wish for him to go when pressing the key button , before returning back at the far left of the screen.
It did this for any input , moving in the direction and being stuck in what seems to be an invisible box around him blocking hum from going more than 1 pixel
Hard to know what you've done wrong. It's a short tutorial, so maybe follow it again and ensure you do everything I did.
@@Slyddar OK after working on it for a few days i notice my mistake.
I just forgot to make the value of hsp relative when setting the X value
I feel stupid but I guess it is what most programmer deal with in general xD
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
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 - ruclips.net/video/-nn1vx2P7Nw/видео.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 :(
i can't see my character!
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