Тёмный

Make a Platformer in GameMaker! Part 2 (Double Jumping, Variable Jump Height, Input Buffering) 

Peyton Burnham
Подписаться 18 тыс.
Просмотров 12 тыс.
50% 1

Part 2 of 9! You can also download the fully finished project file for this series on my Patreon!
Patreon: / peytonburnham
Wishlist Starcross Starcade Special! store.steampowered.com/app/17...
Rose of Starcross Trailer: https: // • Rose of Starcross Kick...
Starcross Starcade Special Trailer: • Starcross Starcade Spe...
My tweets: / peydinburnham
Rose of Starcross Demo: peytonburnham.itch.io/rose-of...
Discord: / discord
My twitch: / peydinburnham

Игры

Опубликовано:

 

4 фев 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@peytonburnham4316
@peytonburnham4316 4 месяца назад
!!! 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!
@DUCKSM
@DUCKSM 2 месяца назад
after doing that the game just crashes even before opening :((
@ginsginsuu
@ginsginsuu 4 месяца назад
"i'm not a real anything" man i felt that in my soul LMAO
@Mafeijora
@Mafeijora 4 месяца назад
Simple, but effective tutorials. You even teach us why things work instead of just making people copy things. Love your stuff!
@grifleep4916
@grifleep4916 4 месяца назад
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"
@Mafeijora
@Mafeijora 4 месяца назад
lmao fr@@grifleep4916
@hugoacevedo4812
@hugoacevedo4812 4 месяца назад
Really appreciate that you don't take too long to upload the other parts despite having them on Patreon. Greetings from Mexico!
@peytonburnham4316
@peytonburnham4316 4 месяца назад
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!!
@kylegray2018
@kylegray2018 2 месяца назад
Just finished your first tutorial in this series. Amazing as always! Thank you so much for these!
@napoleonicgerbil
@napoleonicgerbil 8 дней назад
18:47 that gave me a mini heart attack, I thought I didn't follow along XD
@poptartmools23
@poptartmools23 4 месяца назад
Already Excited for all the new episodes!
@SasamuelTheCool
@SasamuelTheCool 4 месяца назад
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!
@orianaevans6909
@orianaevans6909 3 месяца назад
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.
@lolerthegoat8603
@lolerthegoat8603 20 дней назад
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.
@idontknowwhattoputherelol6685
@idontknowwhattoputherelol6685 4 месяца назад
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));
@peytonburnham4316
@peytonburnham4316 4 месяца назад
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!
@grifleep4916
@grifleep4916 4 месяца назад
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?
@LF21Hungry
@LF21Hungry 4 месяца назад
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
@TeTeloooLegal
@TeTeloooLegal 4 месяца назад
Thank you so much for the video!
@Satorl
@Satorl 4 месяца назад
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
@peytonburnham4316 4 месяца назад
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!
@AidinZolghadr
@AidinZolghadr 4 месяца назад
THanks these are great!
@o2arya104
@o2arya104 2 месяца назад
Literally man, if i got u, i need no other tutorials!!!
@Fire_Jacket
@Fire_Jacket 8 дней назад
Thank you alot you are in my heart
@SpazmanNamzaps
@SpazmanNamzaps 3 месяца назад
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!
@renatoramundo5154
@renatoramundo5154 25 дней назад
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
@solfurtado4274
@solfurtado4274 4 месяца назад
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 ❤
@peytonburnham4316
@peytonburnham4316 4 месяца назад
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!!
@bluecritter
@bluecritter 2 месяца назад
You make coding fun, love your tutorials :-))
@user-xh6bv7td5x
@user-xh6bv7td5x 2 дня назад
19:18 lets gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo (my first line of code typed before it was shown in the vid) -yeah its not much, but when you are an absolute beginner it feels like something.
@sukaina4978
@sukaina4978 2 месяца назад
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?
@hiramaru6020
@hiramaru6020 4 месяца назад
the best!!!!!!
@DaPointa
@DaPointa 19 дней назад
Nice series. Just one question: how do I code acceleration?
@FriskDreemurr66669
@FriskDreemurr66669 3 месяца назад
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.
@AidinZolghadr
@AidinZolghadr 4 месяца назад
How do you think the best way to add shooting and simple patrol?
@SebastianJose_Fatherlessaxo
@SebastianJose_Fatherlessaxo 4 месяца назад
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)
@autismandgaming4532
@autismandgaming4532 2 месяца назад
If I were to do gamepad_button_check with a generic USB controller, what sort of Inputs should I opt to use?
@novapulse_music_
@novapulse_music_ 2 месяца назад
"before we add more code" (adds more code)
@Christianguy-vg9ud
@Christianguy-vg9ud 2 месяца назад
when I switched my jumpKeyPressed with jumpKeyBuffered in line 35 it cancled jumping
@hiramaru6020
@hiramaru6020 3 месяца назад
Adding a viewpoint causes the player object and wall object to slightly overlap. How can I solve it?
@360master
@360master 4 месяца назад
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.
@peytonburnham4316
@peytonburnham4316 4 месяца назад
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!
@DaPointa
@DaPointa 19 дней назад
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...
@palex.5375
@palex.5375 2 месяца назад
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!
@orions2908
@orions2908 19 дней назад
hey what setting makes gms stop worrying about the camel case?
@SebastianJose_Fatherlessaxo
@SebastianJose_Fatherlessaxo 4 месяца назад
can you make a bullet hell tutorial for this series also like cuphead
@mogghiiii
@mogghiiii 2 месяца назад
Why did you make both pressed and not pressed jumpKey in the getControls script?
@pokemontrainer4148
@pokemontrainer4148 Месяц назад
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*
@berserk9147
@berserk9147 2 месяца назад
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.
@RemainingAxis565
@RemainingAxis565 4 месяца назад
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
@Big_Worm89
@Big_Worm89 Месяц назад
My jump height variable isn't working any clue why?
@Blankpagess
@Blankpagess 14 дней назад
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
@ShaolinMonkster
@ShaolinMonkster 4 месяца назад
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 :/
@dennyforthewin
@dennyforthewin 4 месяца назад
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
@peytonburnham4316 4 месяца назад
Make sure you put the other function we made (i believe we called it controlSetup() or something similar) in your create event!
@dennyforthewin
@dennyforthewin 4 месяца назад
@@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
@grifleep4916
@grifleep4916 4 месяца назад
Remember command shift F to find stuff in your project
@fishy008er
@fishy008er 4 месяца назад
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.
@rinakumu5792
@rinakumu5792 4 месяца назад
@orthewin it still do not work for me edit: it stop saying error but I can't jump anymore
@matthewlawton9241
@matthewlawton9241 4 месяца назад
:)
@polarmadeit
@polarmadeit 2 месяца назад
Hey why does my game crash immediately after trying to jump?
@bholloman598
@bholloman598 2 месяца назад
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.
@polarmadeit
@polarmadeit 2 месяца назад
@@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
@DaPointa
@DaPointa 18 дней назад
my jump stopped working :(
@AndyHope970
@AndyHope970 11 дней назад
Me to :(
@toad786
@toad786 4 месяца назад
23:07 My player just moves up on start, WTF
@toad786
@toad786 4 месяца назад
why does every gamemaker tutorial i use suck monkey duck
@toad786
@toad786 4 месяца назад
Okay apparently I had to remove an equal sign...
Далее
Phil Fish: Gaming's Most Hated Developer
19:44
Просмотров 326 тыс.
bringing JUSTICE to the MOST HATED Mario game.
23:05
Просмотров 45 тыс.
Immersive Sim in Godot 4: COGITO - Overview
8:22
Просмотров 32 тыс.
Optimizing my Game so it Runs on a Potato
19:02
Просмотров 442 тыс.
Adding Tons of Levels to My Indie Game
6:39
Просмотров 63 тыс.
Recreating Balatro's Game Feel | Mix and Jam
7:21
Просмотров 45 тыс.
What does a Game Engine actually do?
16:45
Просмотров 141 тыс.
Beginner GameDev Mistakes - Ep 1
6:40
Просмотров 161 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 687 тыс.
Погружаемся в Яндекс Игры.
37:10
Просмотров 347 тыс.