Crouch Mechanic in GameMaker! (How to Make a Platformer Part 9)

Поделиться
HTML-код
  • Опубликовано: 29 июн 2024
  • Part 9 of 9!!! Learn how to make your player crouch and automatically react to things like moving platforms!
    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
  • ИгрыИгры

Комментарии • 65

  • @LunaceroGames
    @LunaceroGames 4 месяца назад +7

    This has been such an excellent series. Excited to see it continue onto Mario-type series. Incredible content, thank you for all your hard work.

    • @KerpewA
      @KerpewA 2 месяца назад

      true

  • @poptartmools23
    @poptartmools23 4 месяца назад +3

    Wow its already finished! Honestly, I've loved following this tutorial, it's just so well, great! It's easy to follow and covers a lot of things that can be added to other platformer games. I can't wait to see more from you! These videos always make me happy :)

  • @Vizeff
    @Vizeff 2 месяца назад +1

    This series has been such a blast. Thank you so much!
    Can't wait for the smooth movement with friction! :D

  • @seabeast3965
    @seabeast3965 4 месяца назад +1

    Thank you for making this series, Peyton. You've taught me a lot about programming and gamemaker. Best of luck with your game, I'll definitely check it out when it releases 😁

  • @slipperyphish
    @slipperyphish 3 месяца назад +2

    Great series, thanks so much for making it. I'm looking forward to the subsequent series, especially one that shows acceleration/drag, enemies and player shooting mechanics. Thanks again!

  • @_mattbailey
    @_mattbailey 2 месяца назад

    I did it!!! Amazing series, thanks so much Peyton. Can't wait for the next series.

  • @m4rfs
    @m4rfs Месяц назад

    Just wanted to thank you so much for your hard work and good job for making so many cool things and teaching others too !! ♥

  • @bluecritter
    @bluecritter Месяц назад

    Amazing series! Looking forward to the next ones :-))

  • @psyonide1394
    @psyonide1394 3 месяца назад +3

    Hey big dog your personality makes these tutorials a joy.

  • @NeonWidow
    @NeonWidow 2 месяца назад

    Extremely excited for the Metroidvania videos! Excellent work, my friend!

  • @SuperAdjusted
    @SuperAdjusted Месяц назад

    Great series, really learned a lot!

  • @Miszi20
    @Miszi20 Месяц назад

    This series was amazing. Love the explanations, love the way the code works, love the humor. I recently moved from Game Maker 8.1 to GMS2 and wanted a good basis for my runner-like game and this will work like a charm! Thank you for putting so much effort into this series.

  • @KerpewA
    @KerpewA 2 месяца назад +1

    Thanks for the good content!@!, i did come across some issues with misstyping, but your explanations did help a lot!, i learnt a lot s2

  • @ajejebrazord4068
    @ajejebrazord4068 4 месяца назад +8

    I'm following this lovely tutorial and i just want to ask if there is any chance to see some state machine logic because i have a lot of stuff inside the step event.
    Thank you!!!

    • @peytonburnham4316
      @peytonburnham4316  4 месяца назад +5

      Once we branch off into the other series we’ll definitely be covering methods for state control!

  • @ShrtCrct
    @ShrtCrct 3 месяца назад +1

    Back here for my semi monthly check in on your channel!
    Loving the content!

  • @mellonianfello
    @mellonianfello 4 месяца назад +2

    please keep making tutorials like these dude! you're genuinely such a amazing content creator and you're tutorials have helped me learn gamemaker to the point where i plan on getting my game onto steam!

  • @Willow-xc3mz
    @Willow-xc3mz 29 дней назад

    What a journey this is, I'm not entirely sure if I want to make games on this engine but it was nice getting experience with making a basis for a game, and am happy to make it to the end ^-^

  • @verracaelum5258
    @verracaelum5258 3 месяца назад +1

    please continue this playlist you are the best teacher ever in youtube for gamemaker !!

  • @Noob-wv9ju
    @Noob-wv9ju 4 дня назад

    やあ、私は日本のGamemaker初心者ですが、このチュートリアルは素晴らしい完成度でした。
    説明が丁寧で、改造にも耐えうる頑丈なコード!シリーズが終わるのが残念です。
    是非ともメトロイドヴァニア系統のチュートリアルも作ってほしいです。
    製作ご苦労様でした。本当にありがとう🥰

  • @reedrehg
    @reedrehg 3 месяца назад +1

    Another interesting one! Something about that crouch sprite put a smile on my face 😂

  • @matthewlawton9241
    @matthewlawton9241 3 месяца назад +1

    Hey Big Dawg, I made it! All thanks to you! I can not wait for your Mario-style sequel series. As silly as it may be, please consider moving slope platforms and mario style sliding for that!

  • @metroixer
    @metroixer 3 месяца назад

    Thank you for the tutorial!

  • @laurentoutan5133
    @laurentoutan5133 2 месяца назад

    Thank you very much for these tutorial ! You explain very well any detail, it's great!
    By any chance, do you plan to make tutorial about dash, wall jump or sword pogo ?

  • @sop6545
    @sop6545 Месяц назад

    I love your tutorials!!! Would you ever consider making a cutscene tutorial??

  • @badviper2059
    @badviper2059 Месяц назад

    You are a saint, my man. xp

  • @blob693
    @blob693 Месяц назад +1

    Hey, first of all, thank you for spending your times making those tutorials. I’m making a roguelite and your tutorials helped me alot!
    I was just wondering if you could do a tutorial about how to make a rabdom room generation system simmilar to the Binding of Isaac?
    The only tutorial I found about that is using GMS 1 and sone functions are outdated.
    Anyways it would help me alot and It’ll boost the development of my game!

  • @autismandgaming4532
    @autismandgaming4532 2 месяца назад +2

    Just wanted to say 2 things
    1) I found some nifty little code if you wanted to have crawling in your game; Under your player's create event you can set a crawl sprite as sPlayerCrawl, and in your step event under sprites you can write "if xspd != 0 && crouching { sprite_index = crawlSpr; };"
    2) If you're going to do spinoffs of this series, could you do one on Wario Like Platformers? These are 2d Platformers taking inspiration from the Wario Land series, Mostly Wario Land 4, with several defining features such as the Player not taking damage, Moveset altering / hindering power ups & escapes at the end of the level where you go back to the start

    • @mariotheundying
      @mariotheundying 2 месяца назад

      yeah that line of code definitely gonna get changed when we figure out how to slide when running then crouching or when Peyton makes the tutorial with that, because otherwise it will just crawl when sliding, but cuz idk how the code will be, prob will be a "&& !crawling" or smth

  • @QTwoSix
    @QTwoSix 3 месяца назад

    Good day, firstly I wanted to say - thank you, this series has been incredibly helpful.
    I do have a small request, in the future, as you mentioned, you'll make some series focused on specific types of games. Well regarding that, are you planning to cover slippery surfaces? I would appreciate it very much if you did.

    • @ruedischmuedi780
      @ruedischmuedi780 3 месяца назад

      not sure if thats what you mean but he has a video on Ice Sliding mechanics, idk if that helps

    • @QTwoSix
      @QTwoSix 3 месяца назад

      ​@@ruedischmuedi780He does? That's amazing. I can't seem to find it though.

    • @QTwoSix
      @QTwoSix 3 месяца назад

      ​@@ruedischmuedi780found it, but it's for a top down system. I might be able to adapt it for a platformer.
      BUT, he is going to cover sliding mechanics later in the series, so that will probably be my answer

  • @matthewlawton9241
    @matthewlawton9241 4 месяца назад +2

    Please don't forget momentum and sliding!

  • @SquidgeM0seec
    @SquidgeM0seec 3 месяца назад

    I too, am a huge fan of "scream mask" -smelling candles

  • @DefinitlyNotAnAutomaton
    @DefinitlyNotAnAutomaton Месяц назад

    are you also gonna include all the "different" movement stuff like walljumps, momentum, ledge grabbing, etc?

  • @fierorecensione5828
    @fierorecensione5828 4 месяца назад +2

    TOP!

  • @user-jx1ke4ek1g
    @user-jx1ke4ek1g 2 дня назад

    will you continue the series? I would like to continue learning

  • @o2arya104
    @o2arya104 2 месяца назад

    Hey man, can u please make a video on shaders and lighting for platformers, pls

  • @SuperAdjusted
    @SuperAdjusted Месяц назад +1

    Is anyone else finding that the crouch code breaks the solid moving platforms code a bit? I am finding that after this episode a collision with a horizontal moving platform which should push the player to the right or the left now causes the player to crouch and get clipped into the wall/pass through it without being pushed properly. I've been through the tutorial twice at this point to check for typos etc and i'm pretty sure that there are no mistakes... although, if nobody else is getting this effect then I need to go back and check again. Has anyone else encountered this? If so, is there a fix for it?

  • @enr1cat
    @enr1cat 2 месяца назад

    Can you do something like if you have pressed the button you jump more than if you just preseed a second?

  • @Mal0war3
    @Mal0war3 3 месяца назад

    Will you teach us how to add enemies?

  • @johnniefinney3266
    @johnniefinney3266 4 месяца назад

    I'm just curious Peyton do you have a video about leveling up characters? Bonus points for a video about classes and what not

    • @peytonburnham4316
      @peytonburnham4316  4 месяца назад +1

      Unfortunately I don't! But I'm sure there's plenty of good videos out there by other people just keep looking!

    • @johnniefinney3266
      @johnniefinney3266 4 месяца назад

      @@peytonburnham4316 alrighty

  • @HauteOroute
    @HauteOroute 2 месяца назад

    I seem to have a small bug, I wonder if you have the same. At 14:33 if I set a stationary platform in the same way, stick to one of the sides of the rectangle and rush/accelerate then try to crouch, the code considers that I'm "crushed" and refuses to let me move forward. On the other hand, if I walk and crouch, it works.
    Ok, I really liked the idea of being able to move forward slowly when crouching, rather than being totally immobile. However, on 45° slopes, as our game is currently made, if we decide to crouch right when we're between 2 pixels of our "staircase", the code considers that we're facing a wall and refuses to move forward.
    I'm going to look into these two issues myself, but if any of you have some ideas where to look as I'm new to developing stuff, it would be geat!
    I'm going to keep the project as it is, and duplicate it to practice/adding my own features, while waiting for the sequel if there is one.
    I must say you're doing a hell of a job, and thanks to you, game development as I like seems more accessible. Can't wait to see what else you in store for us. Keep it up!

  • @TechnoCookieNG
    @TechnoCookieNG Месяц назад

    After finishing this tutorial I gave my player character acceleration and deceleration, however now they pop off of slopes when running down them, how do I fix this?
    // X Movement
    move_dir = key_right - key_left;
    if move_dir != 0
    {
    face = move_dir;
    x_spd += move_dir * accel;
    }
    else
    {
    if x_spd != 0
    {
    var dir = sign(x_spd);
    x_spd -= dir * min(decel, abs(x_spd));
    if abs(x_spd) < 0.1 // floating point error prevention
    {
    x_spd = 0;
    }
    }
    }
    if crouching
    {
    move_dir = 0;
    }
    //run_type = key_run; // comment out if don't want run
    x_spd = clamp(x_spd, -max_speed, max_speed);
    This was the only part of the code I changed

  • @Flycanjack
    @Flycanjack 2 месяца назад

    I need to know what song you use in these videos 😭

  • @immingdonlmfao
    @immingdonlmfao 2 месяца назад

    could you teach us how to make a batte system for an rpg game??? i really need it pls :(

  • @cooldudeinc
    @cooldudeinc Месяц назад

    What song plays in the GameMaker 2 RPG series? Still stuck in my head and the only cure is finding the actual song

  • @kawanpld9969
    @kawanpld9969 3 месяца назад

    Hi! One suggestion, there are no good turn-based combat tutorials on RUclips, It would be amazing if you made one, the only one on youtube was shaun spalding but he abandoned the channel for personal reasons

    • @kawanpld9969
      @kawanpld9969 3 месяца назад

      Love your channel btw I've made my dialog system and inventory system watching your videos

  • @sixiangyang
    @sixiangyang 2 месяца назад

    Peyton,your tutorials is so good, you should come out earlier..

  • @user-hm3us5fi3t
    @user-hm3us5fi3t 29 дней назад

    I'd like to know how to make a game like Touhou Project, which inspired Toby Fox.

  • @Ref6969
    @Ref6969 Месяц назад

    if you want to have your player crawl I think I made it possible:
    //create event
    moveSpd[0] = 5;//walking
    moveSpd[1] = 10;//running
    moveSpd[2] = 3;//crawling
    //step event
    if (Down_Key) && instance_exists(my_Floor_Platform)
    {
    xspd = moveDir * moveSpd[2]
    crouching = true;
    }
    //Crouching
    if (crouching = true) { sprite_index = duck_idle;};
    if (abs(xspd)) >= moveSpd[2] && (crouching = true) { sprite_index = duck_walk;};
    if (crouching= true) { mask_index = S_Player_Mask2;};
    if that doesn't work for ya sorry, it works for me so far, I'll update this if that changes :)
    also although Peyton adressed it I made my own version of the not being able to jump while couched if you want it:
    if Jump_Buffrd && jmp_count < jmp_MAX && (!Down_Key || _floor_is_solid) && (!crouching)
    {
    //reset buffer
    Jump_Buffrd = false
    JumpBuffer_Timer = 0;

    //jumpy jump jump add thingy doo dad
    jmp_count++

    //set the hold timer or some shit idk LMAO
    jump_hold_timer = jump_hold_frames
    Set_On_Ground(false);
    }
    all i did was add (!crouching)

  • @SasamuelTheCool
    @SasamuelTheCool 4 месяца назад +2

    First 🤠

  • @vellayiikintherealworld
    @vellayiikintherealworld 4 месяца назад

    Hey I hate to comment here but I desperately need an answer for this, I’ve followers your text box tutorial and it works with one issue. The text box placement is dependent on where I place the obj text block. It’s almost never actually in frame. I should probably mention that I switched the draw event to a draw gui event putting a *2 over most variables

    • @peytonburnham4316
      @peytonburnham4316  4 месяца назад +1

      Hey! The short answer is if you draw to the GUI you don't need to compensate for the camera position, drawing something at (0, 0) on the GUI will ALWAYS draw it at the top left of the screen, so just don't add in the physical coordinated of the the camera's position! Sorry can't help you out more than that but that should fix your problem!

    • @vellayiikintherealworld
      @vellayiikintherealworld 4 месяца назад +1

      @@peytonburnham4316 thank you so much. While I’m here I have one more question. What’s the simplest way to draw the character who’s speaking name on top of the text box
      Also how do I make it so the button that starts the text box and the button that advances it are the same. I tried doing this earlier but it made it so the first pages line didn’t type instead they instantly appeared

  • @MorphJonesOfficial
    @MorphJonesOfficial Месяц назад

    not sure why this happened but I got this error whilst just playing around
    ERROR in
    action number 1
    of Step Event0
    for object O_Player:
    DoAdd :2: Malformed variable
    at gml_Script_check_4_platform@gml_Object_O_Player_Create_0 (line 26) - for (var i = 0; i < _listSize; i++)
    ############################################################################################
    gml_Script_check_4_platform@gml_Object_O_Player_Create_0 (line 26)
    gml_Object_O_Player_Step_0 (line 80) - downslope_platform = check_4_platform(x+xspd,y+abs(xspd)+1)

    • @HarryLLC
      @HarryLLC 22 дня назад

      I think it's that in your downslope_platform code you did abs(xspd) instead of abs(yspd)?
      I'm not a coder but I think that's not right.