!!! IMPORTANT FIX TO THE VIDEO !!! You may have noticed it seems like your input buffering stopped working after the variable jump height code. Have no fear it IS still working, but just maybe not the way you expect. Basically once we added the code that we commented "//Cut off the jump by releasing the jump button", it's basically stopping us from initializing the jump even if the input is buffered. This means the input IS still buffered as long as by the time we are hitting the ground we are still holding the jump button, so we are still getting a more generous input window. BUT if you want to change it to where you can tap the button before you land and still get a little hop (which would probably be preferable behavior especially if you want to have a short jump buffer), then do THIS! Take this little code block: //Cut off the jump by releasing the jump button if !jumpKey { jumpHoldTimer = 0; } and move it BELOW the next little code block: //Jump based on the timer/holding the button if jumpHoldTimer > 0 { //Constantly set the yspd to be jumping speed yspd = jspd[jumpCount-1]; //Count down the timer jumpHoldTimer--; } Basically just swap their places, that way, after we initialize the jump with the buffer, we will ALWAYS get at least one frame where our yspd is being set to the jumping speed since by the time we are setting our jumpHoldTimer to be 0, we've already run the code checking if jumpHoldTimer is ABOVE 0. It's up to you which behavior you want to have in your game! I do however think this behavior is better and it's what I intended to put in the video!
@DUCKSM9 ай бұрын
after doing that the game just crashes even before opening :((
@cougarsam50146 ай бұрын
@@DUCKSM I have the same thing happening, any fixes?
@i6ey5 ай бұрын
@@cougarsam5014 what's the error?
@katyazreal5 ай бұрын
Hey! I am trying to fix that but even when I followed the steps in this comment it will not still work properly, I don't know why
@toyo84604 ай бұрын
@@cougarsam5014 its not crashing for me, are you sure you followed the video correctly?
@Mafeijora Жыл бұрын
Simple, but effective tutorials. You even teach us why things work instead of just making people copy things. Love your stuff!
@grifleep491611 ай бұрын
I love that it's instant. "We just made this. If you test it, it does this." Rather than "welcome to my 8th 30 minute video in the series here's what you type. Great after you typed out all of that 30 minutes press play and see it works"
@Mafeijora11 ай бұрын
lmao fr@@grifleep4916
@ginsginsuu11 ай бұрын
"i'm not a real anything" man i felt that in my soul LMAO
@hugoacevedo4812 Жыл бұрын
Really appreciate that you don't take too long to upload the other parts despite having them on Patreon. Greetings from Mexico!
@peytonburnham4316 Жыл бұрын
Yeah totally! When I was learning I was never really a fan of finding series that didn't have a release schedule or didn't have a definite end so I'm glad you also appreciate that! And that's awesome, right back at ya!!
@idontknowwhattoputherelol6685 Жыл бұрын
isn't it better to just use "or" for taking inputs? for example: right_key = (keyboard_check(ord("D")) || gamepad_button_check(0 , gp_padr));
@peytonburnham431611 ай бұрын
Yeah honestly that's a bit simpler! I've done both before, I just personally like doing the method in the video because I like how it keeps everything additive, which can be good when doing things like adding analog inputs from controllers or trigger buttons. BUT as far as this series goes, you're right that would work totally fine and probably be better!
@SasamuelTheCool11 ай бұрын
love this toturial! currently working on a rage platformer and watching the entire series rn and this has helped me a LOT! thank you very much for making these!
@LF21Hungry11 ай бұрын
genuinely, you are turning me into an indie game dev here, thank you so so much for your tutorials, hope we can collab if i ever get famous lol
@poptartmools Жыл бұрын
Already Excited for all the new episodes!
@lolerthegoat86037 ай бұрын
Hi, I noticed that at 32:20 you used the "BONK CODE" but I also noticed that there is an easier way which can be done in a single line of code. I added an if statement right before the line "y += yspd" since before it there is the precise collision check. Code: if yspd == 0 {jumpHoldTimer = 0;} So basically after the precision check if it gives 0 for yspd you can't go anywhere further with the jump but you start falling. Thanks again for your tutorials, I started with this series but at the first episode you said "If you never touched this program go and watch first the RPG game tutorial." so I watched that all in a day and now I am here where I started. Thanks a lot mate :D.
@grifleep491611 ай бұрын
Awww yeah! I'm not 2 years late to an upload. Thanks for making these series! They really do teach us well. I love how you thoroughly explain the whys like why this is being set as a variable and having suggested test points makes it way easier to understand "I just changed 1 thing and now I can do this" rather than make everything, test it once and your golden. Much appreciated!!! Also had a gamemaker quistion for a funny idea. I think it's a dead lead but basically knowing that inputs give a 1 or 0 I was curious if you could multiply that by 5 and have to literally remap your keyboard to have 5 of the same buttons. Someone said that's like trying to sense 5 fingers on the same key... Any suggestions to make my remapping dream a reality?
@kylegray20189 ай бұрын
Just finished your first tutorial in this series. Amazing as always! Thank you so much for these!
@ed_55783 ай бұрын
working between this and another tutorial + reading and rereading the manual annnnnnd im kinda getting somewhere:) thanks 4 the video man
@mervinlovina56813 ай бұрын
wow, your tutorials are way easy to follow, I'm totally hooked right now doing my first game. Thanks a million bro1
@orianaevans690910 ай бұрын
Thank you for your videos, they really help me out. I haven’t coded in a while after getting my certification in it and I understand it, but I sometimes overcomplicate it and mess it up and get confused but, you make it so easy to understand, thank you and I look forward to even more game development tutorial videos.
@KoolDude-lf9jh2 ай бұрын
Great video! This is 100% a better system then I could ever come up with 😭
@Satorl Жыл бұрын
Just joined your patreon out of curiosity of the final thing, cos i dunno maybe it wasnt worth my time if it didnt have the features i was looking to learn, but now you have my full attention haha imma follow this one to the end, im just wondering how im going to adapt this to my prefered way of programming this stuff (i do a state machine and make every little thing into a function) but thats a me problem wich i will deal with later. In any case im impressed, this is the first time i see one of these tutorials that actually has stuff like moving platforms of various types that actually seem to interact well between them (at least with the little testing i did in your project file), cant wait to get to that part
@peytonburnham4316 Жыл бұрын
Oh haha that's awesome and I appreciate it! Yeah plenty of stuff can be abstracted out into functions and stuff like that, Once you're all the way through I'm sure it'll be easy for you to retroactively organize it the way you prefer!
@elijahdarkside28 күн бұрын
bro these are helping like hell
@napoleonicgerbil7 ай бұрын
18:47 that gave me a mini heart attack, I thought I didn't follow along XD
@fireice88287 ай бұрын
Amazing tutorial so far! I make computer programs for a bioimaging lab and I'm starting to pursue a hobby of making games. By the way, you are a real programmer and no we dont think you nesting the code looks terrible :). It's actually encouraged in certain languages for readability, in python indents effect how the computer understands the code actually. After statements such as if, for, when etc, all the code to be executed needs to be indented further than the statement opener. However, if you randomly indent a line where this doesnt apply like you have with the 'clamp' lines at 13:30, it will break the code. Basically in GML you enclose code in curly brackets { ... } after if statements etc if (this) { DO THIS AND THIS while (this) { DO THIS } } but in python you don't use curly brackets like that, you use a colon : and then indent the block of code, if (this): DO THIS AND THIS while (this): DO THIS
@somedirustman5 ай бұрын
its a good tutorial but im having a bit of trouble at a part that is supposed to tell us how to make it so that when you release the jump button it stops the jump. the part that i am having trouble with is the if !jumpkey part of the code because when i run the game and jump i just dont jump does anyone have a fix for this
@somedirustman5 ай бұрын
it only stops working after i put in !jumpkey {jumpholdtimer = 0;}
@InteIIo5 ай бұрын
have you made sure that your jump input and jump pressed input are the same? That's what fixed it for me
@SpaceBittt7 ай бұрын
at 23:06 i tried using the code you showed, "if !jumpkey {jumpHoldTime = 0 }" but it did not work, i have no idea why and the logic is correct
@somedirustman5 ай бұрын
is the player not jumping at all?
@jub.jub17Ай бұрын
For aome reason, with the double jump, i can get to the same spot where the double jump doesnt reset because the jump count is above jumpMax. Adding the reset on the ground allows me to keep jumping in the air? Unsure if how to fix. Help please.
@SpazmanNamzaps11 ай бұрын
Just followed / subbed, but also have a question -- I might have made some kind of mistake somewhere, but I've added some debug-messages for the jumpCount variable -- And it looks like when I jump using the character, the count increases for just -barely- a moment before resetting back to 0 for some reason. As of now, I've not been able to pinpoint why, but currently tracing through options to see what resets the jump-count before the ground is hit again. A step in the right direction could be cool -- and thanks for the tuts / videos / etc! =) EDIT (12:16AM) -- I've found the issue! Block of code written in the wrong place! Correct placement fixed the issue completely! One of those beginner things and just constant review helped. Thanks again!
@nathanhuff79484 ай бұрын
Im having the same problem, howd you fix it?
@FallenFlame66666 ай бұрын
I'm stuck on the Jump buffering. It says my jumpKeyPressed variable is not set before reading it. do you know why this is?
@cannedpieКүн бұрын
3:44 how would i make it so you can use the controller joysticks instead of d-pad
@Questionable_Insights Жыл бұрын
Excellent!
@Luke07r2 ай бұрын
27:28 I tried running the game with the same code as yours and it didn't show me the error page Idk why
@solfurtado427411 ай бұрын
In the end, input buffering stopped working after including the variable jump. I think I typed something wrong, I'll check Your work is amazing! I'm learning GameMaker by watching your series. I'll be waiting for a new series. Thanks ❤
@peytonburnham431611 ай бұрын
Hey good catch! It's actually a problem with the video, input buffering wasn't broken but it may work a little differently than expected, I'm about to write a pinned comment to detail it and how to improve it very easily!!
@Coraledge3 ай бұрын
dont know if you still read comments but instead of input + input and then clamp isnt using or (rightKey = keyboard_check(vk_right) or keyboard_check(ord("D"));) a thing so you dont have to use clamp? New to gm lol
@dennyforthewin Жыл бұрын
I keep getting an error saying that the jumpKeyBufferTimer is not set before reading. I checked my code and I cant see the problem. Maybe I am too tired and need to redo everything tomorrow with fresh eyes
@peytonburnham4316 Жыл бұрын
Make sure you put the other function we made (i believe we called it controlSetup() or something similar) in your create event!
@dennyforthewin Жыл бұрын
@@peytonburnham4316 i did and tried it a few different ways. i must have misspelled something somewhere or put something out of order. so i will do it again and double check
@grifleep491611 ай бұрын
Remember command shift F to find stuff in your project
@fishy008er11 ай бұрын
I was having this same issue. Turns out I added "controlsSetup();" into the step event and somehow moved "getControls();" over to the Create Event. 8:25 in the video was where my brain shut off for a few second and I goofed.
@rinakumu579211 ай бұрын
@orthewin it still do not work for me edit: it stop saying error but I can't jump anymore
@o2arya1049 ай бұрын
Literally man, if i got u, i need no other tutorials!!!
@10derchicken3 ай бұрын
Where in the video did you first use ‘jumpkey’ cause I need a variable
@berserk91479 ай бұрын
I've been trying to advance my code but my character jumps eternally like flappy bird and i dont know why. And of course, i checked over and over again the code.
@Torblis6 ай бұрын
similar issue, trying to figure out the issue currently. clamp seems to have something to do with it?
@dredgendan5 ай бұрын
having an issue at 18:35 . despite my jump max being set to 2 i only get 1 jump maximum. but when i set jump max to 4 - 6 it gives me 2 jumps and when at 10+ it gives me 4 jumps total. not sure what the bug is here. ive looked over and compared my code to the code in the video but no luck on figuring out whats happened.
@imbailing5 ай бұрын
same
@dredgendan5 ай бұрын
@@imbailing i managed to fix mine. the issue i had was instead of jumpbuffered = false and jumpbuffertimer = 0 i had jumpbuffered = false jumpbuffered = 0 have a look at that
@imbailing5 ай бұрын
@@dredgendan my problem was actually a little different than yours but i think i fixed it
@CraigHodson-e8m4 ай бұрын
smashed it, off to the next.
@NicheXCC3 ай бұрын
I placed two slopes with a small exit gap between them. When my character walks between them it gets wedged, and when I jump and move between them it crashes. The error says that its somewhere in the "//Constantly set the yspd to be jumping speed" line. Do you know how to fix it or should I just block all gaps like it?
@360master11 ай бұрын
Couldn't you just use or for the inputs? It works fine, so you don't need to do the clamp, unless there is a reason I'm missing. Ex: rightKey = keyboard_check(vk_right) or keyboard_check(ord("D")); leftKey = keyboard_check(vk_left) or keyboard_check(ord("A")); I also have not finished the video.
@peytonburnham431611 ай бұрын
Yeah you totally could! I've done both before and I'm not going to pretend the method I show in the video is better, something about keeping everything like a math equation just makes my brain happy. Also if you use things like analog controller inputs it can maybe make a little more sense to do what I do in the video, i suppose. But otherwise using "or" is probably simpler!
@scruffybunnies33705 ай бұрын
Hey Peyton! First off, incredible video, and sorry that I'm a little late haha. Just wanted to ask you whether you could make a video on air dashing/dashing. It would really help me out as none of the other tutorials really work with this current code. Thanks!
@Torblis6 ай бұрын
i cant figure out what's wrong ; - ; every time I try to switch jumpkeycheck to the buffered input my jump just doesn't work at all. - added the buffer code and now my player wont STOP jumping, very intresting!
@jeggg13 ай бұрын
did you fix it? i tried to change jumpkeypressed to jumpkey buffered and it stopped jumping
@FriskDreemurr6666910 ай бұрын
i love this but for some reason, the second time i follow this tutorial, the bonking stops working. ur fix to crashing works but i have a different bug. whenever i jump onto the ceiling, i just get stuck. i can sometimes drop out from the side but mostly not. this happened only the second time.
@AlbePagani6 ай бұрын
You probably used subPixel instead pixelCheck in the line checking for the wall in Y collision [this one "while !place_meeting(x , y + _pixelCheck, oWall)"]
@RSMR0297 ай бұрын
How do i make it so theres only two heights of jumping like in super mario games
@TeTeloooLegal11 ай бұрын
Thank you so much for the video!
@renatoramundo51548 ай бұрын
awsome series of tutorial both for beginners and intermediate users i think. really really appreciate all of your works!! i suggest this method in order to obtain a hypotetical "infinite series of middle-air jump" without adding a lot of variables in the create event. just before using the variable jumpholdFrames[jumpCount-1] - that was in 2 part of Y movement code - add this local variable with this if condition ---> var _jumpCount = jumpCount-1; if _jumpCount >= array_length(jumpholdFrames) _jumpCount = array_length(jumpholdFrames)-1; jumpholdTimer = jumpholdFrames[_jumpCount]; in this way jumpholdframe will read the last entry for jump frame and speed
@Big_Worm899 ай бұрын
My jump height variable isn't working any clue why?
@Christianguy-vg9ud9 ай бұрын
when I switched my jumpKeyPressed with jumpKeyBuffered in line 35 it cancled jumping
@superfIareonlogan6 ай бұрын
same
@superfIareonlogan6 ай бұрын
okay i figured out why, go to the step event of your character and delete the 3 input things and replace them with getControls() (i get why, he does it pretty fast so its hard to notice), he does it at 1:40
@Torblis6 ай бұрын
@@superfIareonlogan that really doesn't seem to be the issue for me atleast. I have zero idea how that worked for you tbh :/ unless you maybe put it in twice?
@superfIareonlogan6 ай бұрын
@@Torblis its fixed
@sukaina49789 ай бұрын
thank you so much for the amazing content, i dont understand the point of 20:54 because its just double jumping? there is no extra jump, right?
@AidinZolghadr11 ай бұрын
THanks these are great!
@mogghiiii10 ай бұрын
Why did you make both pressed and not pressed jumpKey in the getControls script?
@Flumpty_bumpty_egg4 ай бұрын
When I get to the double jump I followed it exactly right and my character isn’t double jumping
@Cyphir_The_Space_RobotАй бұрын
When I input buffer timer = 3; it gives me the red error of death.
@Cyphir_The_Space_RobotАй бұрын
Obviously, without the space, fucking autocorrect
@slmephigameplayvideos21452 ай бұрын
I like the tutorial but i am missing a walljump function. Can you add one to the series or is there a easy way to integrate it? greetings
@DaPointa7 ай бұрын
Also, the "coyote time" error doesn't apply to me because i use different sprites than just squares. At least that's what I think...
@hiramaru602010 ай бұрын
Adding a viewpoint causes the player object and wall object to slightly overlap. How can I solve it?
@Bass681954 ай бұрын
17:12 I SPENT TEN MINS TRYNA FIGURE OUT WHAT I DID WRONG TO MAKE IT NOT JUMP ANYMORE IF I HAD WAITED TWO SECONDS I WOULDVE KNOWN I LEGIT SAID OUTLOUD “he literally addresses that problem 🤦♂️”
@bluecritter9 ай бұрын
You make coding fun, love your tutorials :-))
@chaosgamer58925 ай бұрын
I accidentally put if onGround {jumpCount = 0} bellow the //jump if-statement and noticed that it would add an extra jump and I was wondering if you could tell me why. I tried to figure it out but i just couldn't
@DeavtheDev8 ай бұрын
I followed the tutorial and it says invalid token 1. After moving the controls from the step event to the script i can no longer do anything but jump. I cant move left or right anymore. *Edit i fixed it. Retyped all input codes again and it worked. Not sure what went wrong*
@imbailing4 ай бұрын
For some reason my jump count goes from 0 to 2 when pressing jump once off the ground. Any suggestions?
@DaPointa7 ай бұрын
Nice series. Just one question: how do I code acceleration?
@zombieGstar6 ай бұрын
Somewhere around 19 min idk what i did wrong but my character acts as if the ground is the air so i can jump as many times as i want like it doesnt cut off after 2
@Fire_Jacket7 ай бұрын
Thank you alot you are in my heart
@Thegoofygobber2 ай бұрын
Hey I’m having a small issue where the cube just flies off into space (gravity at .275) anyone else have this
@IndigoLurkerАй бұрын
Did you remember to put yspd += grav?
@ThegoofygobberАй бұрын
@ I think so, I’ll double check the lines to be sure. :)
@ThegoofygobberАй бұрын
Ok. The yspd += grav is in the code. I did see a comment somewhere where someone had the same issue and removed a = sign to get it working
@ThegoofygobberАй бұрын
Ok so, I ended up fixing the issue
@IndigoLurkerАй бұрын
@@Thegoofygobber Congrats!
@orions29087 ай бұрын
hey what setting makes gms stop worrying about the camel case?
@djinni200515 күн бұрын
5:25 personal bookmark
@AidinZolghadr11 ай бұрын
How do you think the best way to add shooting and simple patrol?
@crusty_779 ай бұрын
"before we add more code" (adds more code)
@mercygoddd11 ай бұрын
hello ive adjusted some few things and skipped over the part where you fix the jump and double jump thing but when i add the background my character keeps sinking why is that EDIT: its working now (DONT USE ASSETS AS YOUR BACKGROUND)
@crab-l-don58566 ай бұрын
Does awesome count as cool?
@ShaolinMonkster11 ай бұрын
At 8:07, at the if statement, shouldnt we write this instead: if(jumpKeyBufferTimer >= 0){ ... Because the way it is written i think we always have one less frame. Am i right? IMPOPRANT EDIT: it messed up my double jump and i have no idea why. I reverted back to video's code :/
@autismandgaming45329 ай бұрын
If I were to do gamepad_button_check with a generic USB controller, what sort of Inputs should I opt to use?
@DaPointa7 ай бұрын
my jump stopped working :(
@AndyHope9707 ай бұрын
Me to :(
@palex.53759 ай бұрын
is there a way to make the jump count = 1; and make it so i can pick up a "power up" and that will add to the jump count I tried adding //if place_meeting(x, y, oPowerUp) {jumpCount = 2; instance_destroy(oPowerUp)} and that didn't work, can anyone help me? thanks a lot, have a good day!
@hiramaru602011 ай бұрын
the best!!!!!!
@polarmadeit10 ай бұрын
Hey why does my game crash immediately after trying to jump?
@bholloman59810 ай бұрын
You have a syntax error (you mistyped something) in your code. Re-watch and double check your code. You may have sometime typed “jmup” instead of “jump” for example.
@polarmadeit10 ай бұрын
@@bholloman598 thanks for the help, I fixed it yesterday I should have edited my comment, it was something not capitalized I can’t quite remember what
@mercygoddd11 ай бұрын
can you make a bullet hell tutorial for this series also like cuphead
@Leegmus5 ай бұрын
Why doesn't my player drop?
@imbailing5 ай бұрын
maybe your gravity is 0
@RemainingAxis56511 ай бұрын
you can simplify the jumping a little so you don't need the timer like this if jumpKeyBuffered && place_meeting( x, y + 1, oWall ) { jumpKeyBuffered = 0; jumpKeyBufferTimer = 0; yspd = jspd; }else{ if jumpKeyRelesed && yspd < jspd/2 { yspd = jspd/2; } } this works better for me
@toad78611 ай бұрын
23:07 My player just moves up on start, WTF
@toad78611 ай бұрын
why does every gamemaker tutorial i use suck monkey duck
@toad78611 ай бұрын
Okay apparently I had to remove an equal sign...
@superfIareonlogan6 ай бұрын
your player decided to go up to heaven
@imbailing4 ай бұрын
//Reset/Prepare jumping variables if onGround { jumpCount = 0; jumpHoldTimer = 0; } else { //If player is in the air, no extra jump if jumpCount == 0 { jumpCount = jumpMax - 1 }; }
@RSMR0296 ай бұрын
8:06
@GoblinStewAnimates6 ай бұрын
It gives me an error there.
@RSMR0296 ай бұрын
@@GoblinStewAnimates same
@matthewlawton924111 ай бұрын
:)
@5-Volts3 ай бұрын
699 likes(including me)
@JoacoPacoCocoaOFICIAL6 ай бұрын
how to fix this error? action number 1 of Step Event0 for object Player: Variable .jumpKeyBuffered(100004, -2147483648) not set before reading it. at gml_Object_Player_Step_0 (line 41) - if jumpKeyBuffered && jumpCount < jumpMax ############################################################################################ gml_Object_Player_Step_0 (line 41) i dont understand :( (also i speak spanish, my english is a bit bad