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 Игры
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.
true
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 :)
This series has been such a blast. Thank you so much!
Can't wait for the smooth movement with friction! :D
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 😁
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!
I did it!!! Amazing series, thanks so much Peyton. Can't wait for the next series.
Just wanted to thank you so much for your hard work and good job for making so many cool things and teaching others too !! ♥
Amazing series! Looking forward to the next ones :-))
Hey big dog your personality makes these tutorials a joy.
🙏😌
Extremely excited for the Metroidvania videos! Excellent work, my friend!
Great series, really learned a lot!
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.
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
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!!!
Once we branch off into the other series we’ll definitely be covering methods for state control!
Back here for my semi monthly check in on your channel!
Loving the content!
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!
Thank you don’t worry I will!!
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 ^-^
please continue this playlist you are the best teacher ever in youtube for gamemaker !!
やあ、私は日本のGamemaker初心者ですが、このチュートリアルは素晴らしい完成度でした。
説明が丁寧で、改造にも耐えうる頑丈なコード!シリーズが終わるのが残念です。
是非ともメトロイドヴァニア系統のチュートリアルも作ってほしいです。
製作ご苦労様でした。本当にありがとう🥰
Another interesting one! Something about that crouch sprite put a smile on my face 😂
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!
Thank you for the tutorial!
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 ?
I love your tutorials!!! Would you ever consider making a cutscene tutorial??
You are a saint, my man. xp
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!
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
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
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.
not sure if thats what you mean but he has a video on Ice Sliding mechanics, idk if that helps
@@ruedischmuedi780He does? That's amazing. I can't seem to find it though.
@@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
Please don't forget momentum and sliding!
I too, am a huge fan of "scream mask" -smelling candles
are you also gonna include all the "different" movement stuff like walljumps, momentum, ledge grabbing, etc?
TOP!
will you continue the series? I would like to continue learning
Hey man, can u please make a video on shaders and lighting for platformers, pls
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?
Can you do something like if you have pressed the button you jump more than if you just preseed a second?
Will you teach us how to add enemies?
I'm just curious Peyton do you have a video about leveling up characters? Bonus points for a video about classes and what not
Unfortunately I don't! But I'm sure there's plenty of good videos out there by other people just keep looking!
@@peytonburnham4316 alrighty
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!
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
I need to know what song you use in these videos 😭
could you teach us how to make a batte system for an rpg game??? i really need it pls :(
What song plays in the GameMaker 2 RPG series? Still stuck in my head and the only cure is finding the actual song
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
Love your channel btw I've made my dialog system and inventory system watching your videos
Peyton,your tutorials is so good, you should come out earlier..
I'd like to know how to make a game like Touhou Project, which inspired Toby Fox.
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)
First 🤠
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
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!
@@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
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)
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.