If the collision system in this video no longer works for you, you might need to enable "collision compatibility mode" in Game Options -> Main Options -> General. GameMaker has changed over the years! Alternatively, I have released a new 5 minute video that covers all of these basics and is up to date with 2022+ standards: kzitem.info/news/bejne/2q2d0YyYgYt7gXo
@sunshinefeon
2 жыл бұрын
I cant find collision compatibility any where. Tried looking up global setting but I couldn't find anything. Can you tell me where this setting is located?
@ShaunJS
2 жыл бұрын
@@sunshinefeon global game settings, main options, general. At the bottom of the page. This is assuming you're using a very recent version of GameMaker.
@ShaunJS
2 жыл бұрын
Noticing now they've changed the IDE and the menu is now called simply "Game Options", represented by the little cogwheel icon on the top bar.
@sunshinefeon
2 жыл бұрын
@@ShaunJS Ah, ty.
@SUBtoMasonman101
2 жыл бұрын
When ever the player falls it gets stuck do you know how to fix that?
@josephloos5044
6 жыл бұрын
I can now make a cube move in a very limited space. And it only took me literally from about 3pm to 12am. Feelin proud.
@Rickmonas90
Жыл бұрын
wow it took you an entire afternoon
@Bue.z64
Жыл бұрын
literally me
@SparkysTagin
Жыл бұрын
nice i can't even get the cube to move lol
@SynthGirl64
9 ай бұрын
@@Rickmonas90 an entire afternoon = 9 hours? I'm making good pace
@mahdiaamir3971
8 ай бұрын
i needed 5 days
@dkipaz3117
6 жыл бұрын
Anybody who wants to add A = left and D = right (like the WASD controls) just do this: key_left = keyboard_check(ord("A")); key_right = keyboard_check(ord("D"));
@g1ues
6 жыл бұрын
thanks bro!
@poatatosalad6349
5 жыл бұрын
thanks i was looking on how to do it
@maxmarohn581
5 жыл бұрын
i thought it had to be ord('A'), but that was giving me troubles
@pat9986
5 жыл бұрын
From someone who's arrow keys are stupidly tiny compared to the normal WASD, thank you.
@Scrufflord
5 жыл бұрын
Thank you! I always thought arrow controls were a little wonky. (Maybe I could add both? Who knows what the preference of the person that plays my game will be?)
Hey man could you help me So my problem is when i put the walls on the same instance as the player in my case a boat is, the walls dont prevent the boat from going through them. thanks so much for helping me. Heres my script // Keybind wasd vk_comands keyboard_set_map(ord("W"), vk_up); keyboard_set_map(ord("A"), vk_left); keyboard_set_map(ord("S"), vk_down); keyboard_set_map(ord("D"), vk_right); // vk up if (keyboard_check(vk_up)) y= y-2; // Get player Input key_up = keyboard_check(vk_up); key_left = keyboard_check(vk_left); key_right = keyboard_check(vk_right); // calculate movement var move = key_right - key_left; hsp = move * walk_sp; // horizontal collision if (place_meeting(y+hsp,y,Owall)) { while (!place_meeting(x+sign(hsp),y,Owall)) { x = x + sign(hsp); } hsp = 0; } x = x + hsp; i have // vk up because i wanted to move verticaly the keybinds are here for so i can use w a s and d. So my problem is when i put the walls on the same instance as the player in my case a boat is, the walls dont prevent the boat from going through them. thanks so much for helping me.
@dotmbarricade3424
3 жыл бұрын
Thx man
@athletica5571
3 жыл бұрын
Wow Ur cool
@theairacobra
2 жыл бұрын
@@lasy5159 while (!place_meeting(x+sign(hsp),y,Owall)) you put a mayus in o, when it should be oWall
@eros.2634
2 жыл бұрын
King
@blakeburgers22
7 ай бұрын
This was SOOO helpful! I’m 14 years old and I’ve been wanting to code my own video game for a while now, moving on to part two! (I’m hopeful! 🤞)
@milokochili
7 ай бұрын
Same here, it has been so useful and only has been the first part
@laxels8835
7 ай бұрын
same also
@SecretarySquare
7 ай бұрын
yup
@patopeje1472
7 ай бұрын
man... I meet gamemaker at my 14, and I didn't understand a sh*t because in that time there wasn't KZitem tutorials, and I didn't understand english pretty well you are so lucky lol
@blakeburgers22
7 ай бұрын
@@patopeje1472 lol! Fr
@sunhouhua
4 жыл бұрын
Pressing F4 in the code editor lets you add if statements, blocks, etc. You're welcome
@matnic_6623
4 жыл бұрын
Thats actually very useful as I am a beginer! Thanks!
@lightstareight6950
4 жыл бұрын
ty
@QBelly
4 жыл бұрын
ALT + F4 opens a secret passage to Narnia.
@395leandro
4 жыл бұрын
Delete System(x64) to remove lag.
@lightstareight6950
4 жыл бұрын
install hackintosh to get 2 fps
@toolongdidntstudy8838
7 жыл бұрын
I remember 3 years ago I went to learn GameMaker Studio, and Shaun's platformer tutorial was there for me to learn. Now I can produce a platformer on the spot without any references. I'm delighted to see that you're producing a tutorial for the people getting into GM:S 2. Thanks Shaun.
@santripta
7 жыл бұрын
Too Long; Didn't Study Can relate, mate, he gets an 8/8. (sorry couldn't resist) Seriously though, Shaun helped me start programming, which led me to get into advanced programming(OO) The amount of stuff I learnt on this channel is alot. Just checking in to help these people with their errors.
@evilerroryt8448
7 жыл бұрын
I'm gonna subscribe I'm new to gamemaker studio 2. My friend and I want to make very awesome games for fun and maybe for a bit if cash but mostly for fun I can't wait for more content like this :)
@jakob6455
7 жыл бұрын
Hi, I have a problem with loading my game... it takes me 30 seconds. Do you maybe know what is wrong? The computer is very fast. Thank you for great tutorials.
@tthomas-mj1iy
7 жыл бұрын
Yeah loved his gm tutorials and now im happy to see he did some for gm2 to
@nickbrickslegoanimations1042
6 жыл бұрын
is Game Maker Studio still available or is it out of service now?
@KillingSurvival
Жыл бұрын
I know you already got a lot of praise for this tutorial but here: Your tutorial made coding fun for me (I've been trying to learn for a month) Took me about 1.5h to get this done and it's incredible, I'm looking forward to the rest of the series :D I will coment on as many videos as I remember so the algarythm hopefully pushes this amazing tutorial to more people looking to code
@ShaunJS
Жыл бұрын
Well done!!
@Jmine123
Жыл бұрын
That is how I feel!
@voidymite
Жыл бұрын
EXACTLY. i love this tutorial as much as it makes me love sam hogan !!! EXTREME props to him. this helped me learn coding entirely.
@lunasoldev
4 жыл бұрын
If you want to add sprinting to the game you just need to put: key_sprint = keyboard_check(vk_shift); to the key section and add: if(key_sprint) { hsp *= 1.75; } in front of: x = x + hsp;
@NIKOSPARAPONIARIS
3 жыл бұрын
It Works! But (after adding this feature after the next tut) there is an issue.. stacking on walls .. i guess its a collision problem!
@hansliu960
3 жыл бұрын
Nikos Paraponiaris yes I’ve met a similar situation, it seems to be sticking around the closed angles, may need additional code to get it run smoother
@FulsomeFrog
2 жыл бұрын
I can't seem to get this to work, idk why maybe its just different versions of gms2 broke stuff or im being dumb and messing up things somehow
@andrewchariker1246
5 жыл бұрын
[SOLUTION] If your player is "floating" and stays in the air too long, then you need to raise your grv variable. At 29:03, Shaun changes the value from 0.1 to 0.3. He does it really fast and might be hard to catch. Good luck with your game!
@thenunix
4 жыл бұрын
thanks
@neogul-JMK
2 жыл бұрын
lol man thanks
@uanamenezes7689
Жыл бұрын
thanks bro
@joaoarthur5140
Жыл бұрын
thank you very much bro
@crowned8777
Жыл бұрын
When I jump my character teleports up instead of jumps. Do you know how I fix this?
@dang1854
5 жыл бұрын
This was AWESOME! I had a couple glitches as I went. My mistakes helped me learn stuff: 1. If you're seeing boxes to drag instead of a place to type in the Create tab as shown in the video, right click and select Switch to GML. 2. I had a typo in one of my variables in the Create tab. I had walkvp instead of walksp! Also, WALKSP is not the same as walksp - capitalization DOES count. 3. I had semicolons at the end of my if and while statements. Don't put semicolons there. 4. I put a semicolon instead of a comma in one of the x,y+1,o_wall statements. Excellent, nay, PERFECT video for a first timer.
@volk4342
4 жыл бұрын
ty
@Baleur
4 жыл бұрын
Well its better to think of it this way, dont put semicolons when a { follows after it.
@aydemironur35
3 жыл бұрын
lol ty i was searching where im doing the mistake :D
@findtheshuaibs3888
3 жыл бұрын
I can't get past this part for some reason, my player just automatically goes left all the time and i cant bring it to the right Edit: fixed it, i wrote x = x * hsp; which was why it wasn't working
@jacosazul
2 жыл бұрын
ty
@lunasoldev
4 жыл бұрын
Instructions unclear ended up with a 4D shooter with a battle royale mode
@igris9494
3 жыл бұрын
xD
@igormazur3421
3 жыл бұрын
@@igris9494 xD indeed
@liamj7682
3 жыл бұрын
your bad lol XDDDDDDDDDDDDDDDDDDDDDDDDDDDD
@aerospacebriefcase2290
3 жыл бұрын
@THE REAL KIDO *bugs* yeah, *bugs* ....
@palegrass6168
3 жыл бұрын
darn, I hate when that happens
@jaded9436
3 жыл бұрын
I'm really interested and following along. But it feels like my brain is going to explode at the same time. These videos are super helpful.
@CommanderHof
2 жыл бұрын
yooo same
@RickyTheRoster
2 жыл бұрын
Bro which version is this when i download it from Google when i open it it always say it stopped working what to do
@Innocentzz
2 жыл бұрын
same
@leodacosta1
4 жыл бұрын
This video made coding fun for me. So much so that I made it wall jump! //Wall Jump if (place_meeting(x+hsp,y,oWall)) && (key_jump) { vsp = -7; } Thanks!!! You are an awesome teacher :D
@hole1274
3 жыл бұрын
for anyone looking to copy this, you might also add momentum away from the wall hsp = -sign(hsp) * 2; and if you're doing it after the collision (which makes sense) hsp will be 0, so save sign(hsp) in the collision and set the walljump's place meeting to (x+hSignVariable,y,oWall)
@captaincharlie1044
3 жыл бұрын
@@hole1274 excuse me, could you rewrite the code the original poster posted? your description of what to do isnt making a lot of sense, sry im a beginner
@hole1274
3 жыл бұрын
@@captaincharlie1044 I found a better way since then //check for a wall in the direction you're pointing if (place_meeting(x+move,y,oWall)) && (key_jump) { vsp = -7; hsp = -3 * move; //move away from the direction you're pointing }
@captaincharlie1044
3 жыл бұрын
@@hole1274 youre a lifesaver!! Thank you!
@captaincharlie1044
3 жыл бұрын
@@hole1274 alright, sorry for keeping this going, but the wall jump works! however, i dont want the player to be able to just keep on wall jumping up the same wall over and over. i want them to kind of bounce away from the wall naturally after one walljump. would you know how to do this? if its easier(and if you have discord) my discord username is EdgeGod27 #3004
@frostee5554
2 жыл бұрын
im new to GameMaker, I've had a decent amount of coding experience back in high school but I have long since forgotten. You are a god send. you are a wonderful teacher, and great to listen to. thank you for all you do and please, keep doing it!
@maudesaur
Жыл бұрын
This was so well explained, not only did I enjoy it, but I also verbally made noises in awe of how simple it actually is. THANK YOU.
@moellersworkshop2116
4 жыл бұрын
I've been writing platform games since 85' while in high school using 6502 on an Apple IIe, what I've learned in this life is that the most important thing an artist can do (that is what we all are) is to master the rudiments, before we can construct the fantastic. I really enjoyed getting this man's perspective on "elegant logic" for good object control in a platform game construct. You "experts" are encouraged to just go over this step by step and you may be surprised at a perspective you didn't have on some very elemental, but critical components of game making. Thanks again Shaun.
@marianateixeira9251
4 жыл бұрын
I don't often write comments on videos, but I feel obligated to thank you for an amazing set of tutorials with good start. I'm excited to be able to code my first game, as I've only worked as an artist in video-games.
@betjoy
11 ай бұрын
best coding tutorial I've ever seen. perfect balance between discribing how and why things work but still leaving some focus on the game.
@zaynebmoin9917
4 жыл бұрын
use f8 and f9 keys to zoom in and out in event code I'm pretty sure this is useful!
@PandaFishification
4 жыл бұрын
Thank You!!
@jenniferg224
4 жыл бұрын
uh, on my computer its f7 and f8.. not trying to be rude but just letting people know in the replies if they have any issues ;D
@ichifish
4 жыл бұрын
Wish I'd looked down here before I googled it! Thannks!
@jase1976
6 жыл бұрын
Thanks you, this is great. I was struggling with other tutorials to understand the code, but I understood most of this and feel I'm making progress for the first time with all this making games stuff. I'm looking forward to continuing.
@chappie3642
5 жыл бұрын
Hi, how has it been going? As someone who began 2 years ago I hope I Can help
@timschuchner
4 жыл бұрын
@@chappie3642 I am curious as well how you are both doing since I just started with gms this month.
@chappie3642
4 жыл бұрын
@@timschuchner I don't code with GSM, I know Java and C++, I usually use my own engine
@falingo
Жыл бұрын
how is your progress
@yanisel3477
3 жыл бұрын
Game Maker Studio is like a mix of unreal engine of blueprint and C++ with an actual good 2d implementation
@shared-knowledge
3 жыл бұрын
as a programmer my self (php/java/X++) i would like to say that this tutorial was a great example of how to do tutorials the right way
@jaydawn8704
7 жыл бұрын
Although my vision for what I want to make isn't a platformer, this was an awesome intro and I'm a little upset I'm so early to the series because I want to spend a day just working through these tutorials! It's like when you start watching a show during it's initial air vs when the series is complete, the wait is awful lol.
@manwhodoesthings
6 жыл бұрын
i can't even get pass the vertical coding part. lol.
@OnBrandRP
5 жыл бұрын
Just a tip for any future game developers, when you get stuck like this, duplicate your project then start experimenting. or have other smaller projects to work on.
@uanamenezes7689
Жыл бұрын
@@OnBrandRP thank you for the tip
@persianshayan3700
5 жыл бұрын
First game making Tutorial i watched until the end. I enjoyed it && learn alot. So... { I subscribed }
@falilivud6937
5 жыл бұрын
Are you acting like code *||* are you just getting insane by codes
@ohmai1290
5 жыл бұрын
you just forget the semicolon at the end, lol
@legsofjelly4428
4 жыл бұрын
if (likes_video == true) { subscribe = true; }
@Snailsxd
4 жыл бұрын
@@legsofjelly4428 you don't need to check if it's true, if you just put in the value it'll check for you
@nokutokamomiji
4 жыл бұрын
Radio oHmAi Actually, GML (The language used in GameMaker Studio 2) doesn’t require the use of semicolons.
@TinyDragonGamer250
Жыл бұрын
You are the first person to explain the actual meaning and purpose of each bit of code. You my sir/mam have earned my respect.
@reda827
Ай бұрын
I know almost nothing about game making or programming but I found your video very good and simple to follow. You really show everything step by step. I'll hopefully continue and finish your series.
@rupertdenton1
6 жыл бұрын
This is my first ever comment on KZitem I think. But I just wanted to say thank you for taking the time to make these videos. It is extremely helpful for a beginner.
@IBACAU123
6 жыл бұрын
Wow! I've watched my first 8 minutes and i've gotten more done than any other tutorial! You can sure explain stuff and i'm looking forward to more and more content from you!
@roccccat
3 жыл бұрын
After 4 years still the best GM S 2 Platformer Tutorial on YT.
@hrp127
8 ай бұрын
Thanks, that was incredibly helpful. I spent hours reading manual but it's always easier when someone explains and shows you that. Thank you again!
@dormin100
6 жыл бұрын
[[ SOLUTION ]] Lots of guys having a problem where the player just falls into the ground and become incapable of moving, i had the same problem and found some unanswred comments asking for help.. i latter found that the IF statment on the vertical collision part had "y+sign(vsp)" written rather than 'y+vsp", wich is the correct way... im proud as a begginer to have discovered the logical problem by myself, although i shoudn't had comited it in the first place hahaa
@pedroinogueiras
6 жыл бұрын
Thanks, you are a true god.
@masonclark702
6 жыл бұрын
this didnt work for me is there any other fix as ive been looking for weeks with no luck thanks
@dormin100
6 жыл бұрын
Mason Clark be sure to check the collision masks and the origin points as they can also produce some weird bugs
@jessedamon2825
6 жыл бұрын
Why did this work? This solution worked for me but I don’t understand why becquse the videos code had the (x,y+sign(vsp),oWall)
@dormin100
6 жыл бұрын
Jesse Damon if you set the collision to check on y+sign(vsp), it will be true everytime the collision mask is exactly one pixel above the ground, and will send you to the same place again and again and again
@cactus7524
7 жыл бұрын
steps script: //Get Player Input key_left = keyboard_check(vk_left); key_right = keyboard_check(vk_right); key_jump = keyboard_check_pressed(vk_space); //Calculate Movement var move = key_right - key_left; hsp = move * walksp; vsp = vsp + grv; if (place_meeting(x,y+1,oWall)) && (key_jump) { vsp = -7; } //Horizontal collision if (place_meeting(x+hsp,y,oWall)) { while (!place_meeting(x+sign(hsp),y,oWall)) { x = x + sign(hsp); } hsp = 0; } x = x + hsp; //Vertical Collision if (place_meeting(x,y+vsp,oWall)) { while (!place_meeting(x,y+sign(vsp),oWall)) { y = y + sign(vsp); } vsp = 0; } y = y + vsp;
@iurydantas4787
7 жыл бұрын
Thank you! Ive started writing in my notebook but then he put lines between other lines and it all went hell! xD
@cactus7524
7 жыл бұрын
XD
@iurydantas4787
7 жыл бұрын
I think there is a reference problem, make sure that oplayer its written the same on the objects and in the code. Is it really Oplayer with capital O and low p or its like oWall, only the W capital?
@hansturbela9514
6 жыл бұрын
Cactus ty
@gamelsrael
6 жыл бұрын
Its write to me on vertical and horizontal collision "malformed if statement". What to do?
@timtam4596
Жыл бұрын
It's possible to experience a game freeze using this method of movement/collision if you character falls onto the corner of a block at certain angles. From what I remember, this is because the collision wasn't set up for diagonal collision, so to avoid the issue, add this below your horizontal and vertical collision //Diagonal Collision if (place_meeting(x+hsp,y+vsp,oWall)) { while (!place_meeting(x+sign(hsp),y+sign(vsp),oWall)) { x += sign(hsp); y += sign(vsp); } hsp = 0; vsp = 0; }
@voidymite
Жыл бұрын
W, thanks
@susniynarezchik
Жыл бұрын
This is really nice, its working and good for basic platformer, but if you need to build up momentum in your game, this code actually might kill it.
@timtam4596
Жыл бұрын
@@susniynarezchik I haven't had any issues using acceleration and this code so far, as all the code is for is to stop you from getting frozen in a while loop when you land on a corner at a near perfect 45 degree angle, which is pretty much the only time the code seems to fire
@timtam4596
Жыл бұрын
@@susniynarezchik On second thought I have had some issues with losing momentum. Do you have a more elegant solution?
@susniynarezchik
Жыл бұрын
@@timtam4596 Yooooo i didnt think you would adress my comment that fast! As i said, your code works perfectly fine without need of any momentum implementation, but in my case it didnt work out. So, for example, i tried saving data of hsp to some momentum_saver variable right before the jump (i had set different accel/decel for it), but right before the variables data gets saved, it changes to 0. First of all, i tried saving hsp data at a different place, but I couldnt get it accurate enough. For now, i basically did a simple pre-hmove check, and turned hsp to 0 if future collision detected (also i needed that bc my character goes way too fast for game to control), and before that i save my momentum data. it turned out smth like that: //Horisontal collision if (place_meeting(x+hsp, y, oPlatform) ){ while (!place_meeting(x+sign(hsp),y,oPlatform)){ x = x + sign(hsp); momentum_save = hsp; } hsp = 0; } //momentum save (post collision check) if (place_meeting(x - hsp, y - vsp, oPlatform) and state_c == "running"){ momentum_saver = hsp; } //Pre horizontal move check if (place_meeting(x+hsp,y,oSpikes) or place_meeting(x+hsp,y,oPlatform)) { hsp = 0; } x = x + hsp; Yeah, as u get it, i am new to gm, and i very appreciate your help to us, newbies. I guess i might find more elegant solution later, but it is what it is right now. (And yeah lol, sorry for any potential grammar mistakes i made here, since english isnt my first language.) Anyways, wishing you best of luck!
@vexinity5151
Жыл бұрын
If u want multiple ways of controlling the item use this block: key_left = keyboard_check(ord("A")) or keyboard_check(vk_left); key_right = keyboard_check(ord("D")) or keyboard_check(vk_right); key_jump = keyboard_check_pressed(vk_space) or keyboard_check(ord("W")) or keyboard_check(vk_up); this lets the player control the enttiy in many ways.
@RobotKitsune
5 жыл бұрын
Just tried this tutorial out--and I had a lot of fun with it! It's so satisfying to see the code at work. Thank you for the great lesson!
@gamemastery4227
4 жыл бұрын
I was actually happy when in the end player was moving and jumping around :D
@luxelivez
Жыл бұрын
Watching this in 2023 and it still helps. Really clear and works well thanks!
@PleasantWhale
4 жыл бұрын
7:03 For anyone who got worried when you clicked, "create" but no space to code appeared, don't worry. Just go to the Events Tab, right click Create to open a drop-down menu, and select, "Convert to GML." Or it'll say something similar to that. Then boom, you'll have the same screen this guy does. 10:18 Also, it's at this point when it clicked, "Oh, I see why people like dark theme. My eyes aren't bleeding right now." First time I've used dark theme in a game editing tool. 16:40 Oh I get it, and that is very clever Mr. Spalding~. Finally, I want to say thanks a ton man! You explained everything very plainly and simply. Looking forward to the rest of your tutorials!
@scythegin9473
4 жыл бұрын
THANK YOU SO MUCH CUZ AT 7:03 I WAS SO CONFUSED AND IM LIKE OMG WHAT AM I SUPPOSED TO DO WTH
@PleasantWhale
4 жыл бұрын
@@scythegin9473 heheh, no prob~.
@PleasantWhale
4 жыл бұрын
@GAMEFREAKS No prob bob.
@lunch7497
2 жыл бұрын
To anyone who wants to use WASD instead of arrow keys you can replace the vk_left vk_right vk_space with ord("A") ord("D") ord("W") Hope this helps 🙂
Excellent work Shaun, thank you! Love this series. I come back to the later episodes regularly to remind myself about certain techniques as I need to implement them. Thanks again.
@kinklez
6 жыл бұрын
I like the speed he goes at. Just gets straight to the steps, no fillers!
@shaneaudette6763
3 жыл бұрын
I took programming 20 years ago. Haven't touched it since, looking to dabble in gamemaker. Your video is bringing it all back and your explanations are VERY clear. Thank you
@erwansellin4791
Ай бұрын
Thanks! It was fun. Anybody who wants to add double jump by deleting the impossibility to jump mid-air, just replace his jump code by this: if place_meeting(x,y+1,oWall) { jump =0 } if (key_jump) and jump
@ignskeletons
3 жыл бұрын
Just an incredible tutorial series, you've given so much to us through your content and I appreciate it a bunch :) Just resubscribed to your Patreon!
@rockzom
7 жыл бұрын
Thanks, Shaun! Wonderful stuff.
@jhonboyah5427
3 жыл бұрын
shaun
@DunderHeads
4 жыл бұрын
this man is the sole reason we learned how to code in the beginning! thanks so much man!
@stuartholt6278
2 жыл бұрын
Dude, thank you. I have had game maker stuido for months, I'd opened it a couple of times and read a few documents on it but everytime I'd been overwhelmed by it and gave up. I came across one of your other intro videos the other day, and made a note to come back. Just sat down today, and in what 40 minutes I have done more than I have achived in months!
@peterwu5957
4 жыл бұрын
Hello,everyone,I'm Peter Wu,come from China.Todey is my first day at KZitem. Nice to meet you,and I'm very happy to study gms2 with you. 😂
@FranckOlive
4 жыл бұрын
thats actually very cute
@t-boneproductions6779
5 жыл бұрын
You're very smart. I'm barely grasping key points here. Thank you for the video. I'm using my android for a fps creator, and so far the video has been very helpful. Thank you man.
@bahamutaxiomx8706
10 ай бұрын
I'm new to coding, and new to your channel. I must say, what a beautiful tutorial you've created. The best I've seen yet. Very comprehensive and VERY easy to follow; the easiest I've seen yet. I've got a pretty bad anxiety when it comes to watching tutorials since school, but the smoothness and thoroughness of your tutorial is perfect for allowing me to follow along! Thank You! Looking forward to more in the future!
@pablo_p_art
3 жыл бұрын
As a completely noob in coding, I found it useful and now starting to understanding it! Many thanks!
@illdie314
7 жыл бұрын
19:27 "you can leave it at 30 if you prefer" but you shouldn't prefer
@henryw4535
6 жыл бұрын
Yep, it looks very slow and choppy in 30fps.
@Luka-sf3vu
6 жыл бұрын
xd
@randumbcrits6125
6 жыл бұрын
CiNeMaTiC 30 fPs
@aurorajarvis5502
6 жыл бұрын
a lot of games work even better at higher frame rates than your monitor can push out. Dont believe me? if you're playing counter-strike with a locked frame-rate try taking it off. This isn't something that's discussed all that often because of the power needed to push a game beyond 200 fps. playing a game at 80fps or whatever just means screen tearing
@wyzolol
6 жыл бұрын
lol
@jedidiah2686
6 жыл бұрын
I am very new to GML. I have been using the drag and drop in gm:1 for a few years so it nice to learn GML. As a challenge I tried to add triple jumping without any tuts and I finally did it. You just have to add a var called airj and set it to 0 in the create event. Then add airj = 0; to the check for wall on y, then add if (!place_meeting(x,y+1,obj_wall)) && (key_jump) && (airj < 2) { vsp = -7; airj = airj + 1; } to the bottom of the code.
@XO-cq6gx
5 жыл бұрын
Hey! I have a question, I can only double jump 1 time, how do I make it unlimited
@Isakube
5 жыл бұрын
@@XO-cq6gx use drag n drop lol. i tried it and you can jump unlimited times without adding the y+1 thing
@Datoneguy_9343
11 ай бұрын
I cannot thank you enough for zooming in during the code writing part
@cringeconnor9154
2 жыл бұрын
I don't know why you don't have 1 million subscribers. You are criminally underrated
@matissebriers5032
4 жыл бұрын
I was having a problem where my player would just fall through the ground I fixed it by : 1. Going to the player sprite in the workspace tab and expanding collision mask (left hand side) 2. setting mode to "manual" 3. looking at the sprite preview window and clicking and dragging a black box over the entire sprite I think the reason I got this error is that I changed the origin of the object ( in the video somewhere around 2:03) to top left instead of center but i'm not sure.
@bioshockgril
3 жыл бұрын
i was having an issue where it wasnt stopping on the right side, i did what you suggested and now it's not moving at all lmao.
@Thomas-yq5yl
3 жыл бұрын
Hey man/miss I've been coding for a bit and working with stuff like this and yet I thought my code was F***ed. Bouta start again and then I checked the comments. You saved me. Hats of to good sir.
@simon3123
3 жыл бұрын
after 2 days of struggeling i foud your comment, i tried it and it worked! thanks man
@MachineMan64
3 жыл бұрын
After doing this I still have the green box fall through the ground, it'll still stop at the sides of the walls, but it still falls through. Need help :(
@pagina_1316
2 жыл бұрын
I had the same problem but i just deleted the while command in the vertical collision.
@hildanateghi778
6 жыл бұрын
mine does not have a ''typing bar'' i cant type in the codes when creating events, heeeelp :))))
@freya4333
6 жыл бұрын
Right click on the empty space (left of the tool box) and click 'Convert to GML'
@LunaRiddle77
6 жыл бұрын
Freya Marshall Woooo thank you, I had the same problem and I was starting to think I did something wrong :0
@hildanateghi778
6 жыл бұрын
thank you soooooo much!
@100Jim
6 жыл бұрын
Thanks worked for me!
@scorpio7536
6 жыл бұрын
omg thx man
@xDMrGarrison
2 жыл бұрын
I did not think it would actually be this easy to get this much stuff. This is exciting.
@m4rt_
5 ай бұрын
Programming tip: Avoid abreviations like hsp, vsp, grv, walksp. These can confuse you or others in the future, It's better to spend some extra time to write out a longer name for it, for example: horizonatal_speed, vertical_speed, gravity, walk_speed Now you will know exactly what every variable is for, so you won't have to guess what it is for. (it may not seam like an issue now, but over time when you have a lot of them, you'll have a hard time remembering what every single variable means, and what the exact name for a variable you need is, when you have ones more like the ones above, you can just write out what the variable is for rather than a code name for it)
@jona7164
5 жыл бұрын
This Tutorial was so helpful, thank you. At the first moment I thought Game Maker were not a Script language like Scratch and after I saw that it's a script language I thought, that I will never can do something with Gama Maker, but you explained everything so good that I think I understood more than I some Scratch Tutorials.
@treeno6654
4 жыл бұрын
Thank you so much for this tutorial! After learning the movement and animation codes. I figured out how to make a crouch feature code and animation, also a crouch walk feature with code and animation and I somehow figured out how to disable crouch when jumping. Thanks a loooooooot!!!!!!
@purementalgames1605
3 жыл бұрын
Truly appreciate this series, Shaun. Just posting to highlight something. I had some glitching as I continued to play around with this code; on line 11 you are adjusting the vertical speed by gravity, but not first checking if the object (here the player, later also enemies) is on the ground. As a result, a vertical collision is being detected on every step, although it looks ok because ultimately vsp is reset to zero in the section that handles the vertical collision. Can be fixed by replacing line 11 with : if (!place_meeting(x,y+1,oWall)) vsp = vsp + grv; Not trying to nit-pick, just posting in case this helps anybody else with their own variations based on this code. Cheers.
@baconman113
3 жыл бұрын
Great tutorial. I realize this tutorial is aimed at complete beginners, but I still found it very useful as a professional software engineer. Goes to show how talented an educator you are. I've participated in a few game jams over the years with Unity and Unreal; however, I've found that I really have to fight those engines to get my games to do the things I want. I'm looking into Game Maker because of its simplicity and ease of use when creating 2D games. A lot of experienced game devs look down on this engine because of its simplicity; however, I think the fact that it is so simple and easy-to-use goes to show how well designed a tool it is. You can tell the team that built this engine put a lot of thought into the UX. Was considering making my game from the ground up in Rust, but this tutorial has really sold me on Game Maker. At the end of the day, why re-invent the wheel?
@zeily8035
5 жыл бұрын
TNX ALOT. With your help i finaly made my first game!
@lucacontarino4882
4 жыл бұрын
while(Didn't understand) { watch the video again } Kinda need a way to break the cycle soon or late..
@wierdbob
2 жыл бұрын
Wow , this video was a complete delight. When my little cube jumped around the screen I kinda felt like I could do anything. Thanks for making this!
@KikonSketches
Жыл бұрын
Finally! A comprehensive guide for the absolute beginner! Thank you so much!
@foggy9874
4 жыл бұрын
For the absolute begginers, if you need your player to handle double jump instead of 1 jump in a very simple way: if (place_meeting(x, y + 1, oWall)) { moreJump = 1; // variable to set the maximum number of jumps, you can change the value to 2 or 3 or more if you want to add more jumps. if (key_jump) vsp -= 7; // don't forget the basic one jump when you're on the ground } else { if (key_jump and moreJump > 0) { vsp = 0; // reset the gravity before jumping again! vsp -= 7; // jump again ! moreJump -= 1; } }
@GodOfTetris90
5 жыл бұрын
Thanks Shaun for this amazing tuto. i allways try to implement a liitle more so i can learn. I did double jump and it work perfect. keep it up
@caojedap
3 жыл бұрын
Hey Shaun, i'm on my 30's SQL Python VBA Programmer over here. I've always wanted to try making my first vg, and you are the first guy that actually make it easy to understand! Just wanted to thanks!
@chillinglord7829
3 жыл бұрын
damn, better than every tutorial I usually turn off at variables when they explain but you explained to good your the hero we needed but never desreved
@super-creative-stuff1421
5 жыл бұрын
The collision code works great but there is one problem with it. Since it doesn't check the space in-between the character's current position and their future position, if they're moving fast enough, their future position will be past the object they should have collided with and they'll appear to phase through it. To be fair my improved code is a little long winded so if you know this will never be an issue in your game, then The original code might be better suited: *also I'm using xDist instead of hsp and yDist instead of vsp //I'm keeping sprite_width-height in abs incase the sprite has been mirrored //x(horizontal) //segScan is how many collision boxes fit in the distance to be traveled not including fractions of the collision box segScan = 0; if (abs(xDist) > abs(sprite_width)){ segScan = floor(abs(xDist) / abs(sprite_width)); } //loop through all of the segscan intervals for (i = 0; i
@iwillgotokoreawhenigrowup8155
5 жыл бұрын
super-creative-stuff BRO THANKS FOR YOU HARD WORK BUT IM SO NOT GONNA TRY IT CUZ ITS TOO LONG AND SCARY
@TheRealModiK
Жыл бұрын
@@iwillgotokoreawhenigrowup8155 I feel you so much rn
@qrowbranwen
5 жыл бұрын
5:01 me when I try to make a straight line with a mouse
@alephcake
4 жыл бұрын
????????
@nikunjmajithia5002
4 жыл бұрын
When I make a straight line with the shift key and wacom
@kamenriderking6453
3 жыл бұрын
Lol
@Josh_42069
Жыл бұрын
As a brand new dev I found this reasonably difficult at sometimes I wanted to quit and throw my computer up against a wall but after an hour or 2 and a few fixes this works really and this was a really good tutorial thanks so much I can't belive that this 5 year old tutorial still works :)
@CashSaucee
Жыл бұрын
you've gotten me back into coding after years, thank you! I'm looking forward to watching the rest of this series!!
@bluepie4983
4 жыл бұрын
This is the most bob ross soundin' ass i've seen a while. Your voice just smooths my soul.
@kevo9429
6 жыл бұрын
vsp = vsp + grv makes me unable to move my obj, what to do ?
@onecanvanbam6775
4 жыл бұрын
I had a similar issue and it was that I'd left a hsp in where we copy and paste it for vertical collision, check there maybe?
@fierzy_new
2 жыл бұрын
I’ve only watched up to 16:25 and this video is great at explaining and this series will help make my platform game, it’s a great tutorial.
@samuel1794
2 жыл бұрын
Чел, ты не представляешь, как сильно ты помог мне, спасибо тебе огромное!
@chadcoyle
7 жыл бұрын
I am having a problem when running off a ledge, and immediately running the other direction. I am getting stuck inside the "wall" object by what looks like a single pixel. I tried using round(x) to make sure I am not between pixels but it didn't help.
@chadcoyle
7 жыл бұрын
Instead of using my sprite's bounding box, I switched to an even width collision mask sprite for my collisions, and used round(x) for my horizontal movement so I don't end up "between" pixels. This seems to have fixed it.
@ClubXXManGame
6 жыл бұрын
Hello. I have the same problem, how to fix it?
@followingthetrend_norge2204
5 жыл бұрын
Lol a year later... but i have the same problem
@Vaalteq55
5 жыл бұрын
@@followingthetrend_norge2204 I think it has something to do with the logic checking for collision. If the player is starts falling at the exact same moment you move back at the wall, the logic correctly detects no wall so movement is allowed. So what happens is the player falls downwards and then because the logic allowed sideways movement it also moves sideways and straight inside the wall
@suspiciouswolf933
2 жыл бұрын
im sort of having the same problem but different when gravity comes into affect after falling of a ledge (its fine if a jump on the same owall at the same height) i get stuck in one spot a pixel from the owall below and cant move at all, i also can only close the window with the stop playing button instead of the x in the corner im having loads of fun with this definitely havent been stuck on this problem for hours
@acasualplayer4778
3 жыл бұрын
Thank you a bunch for this, I made my own game and I'm so happy!
@steliosfk
11 ай бұрын
Amazing tutorial. Even as someone who is not new to programming I enjoyed watching it. Haven't scripted in GameMaker more than this video has shown but from what I gathered adding air jumps was very easy. I just had to create an air jumps variable in "Create" which I would reset at the end of the script if the player was on the ground. Apart from that I changed the jumping function. If the space key was pressed, check if the player is on the ground, if he is then do vsp = -7. Otherwise, if you have air jumps left remove one and change the vsp to something lower (I made mine -4). Even though the tutorial was made 6 years ago, it made me want to look into GameMaker even more! Thanks again for explaining the basics!
@knightbender2
Жыл бұрын
Very well explained! If you make a mistake just rewatch and find where you mistyped, because its all written down as it should in the video.
@delorne2776
Жыл бұрын
Any idea why I'm getting an error in the Step event? key_left is underlined with message GM2016 - Instance variable 'key_left' declared outside of Create event, declare with 'var' or move to Create event. Everything is setup exactly as demonstrated in the video. Similar errors for key_right and key_jump. I'm also getting a naming convention error for move, it says it should be "_move".
@Monster_Face_RB
Жыл бұрын
same
@therealreishady
3 ай бұрын
they're just suggestions for keeping things tidy, these errors werent made at the time this video came out so they werent considered. as long as your game still launches they aren't anything to stress over (i know this is a very late reply and you probably figured it out but still lol)
@daniel_1378
5 жыл бұрын
Whenever the player collides with the wall, he gets stuck halfway inside it, and cant move. Someone help pls?
@ZiggyStyley
3 жыл бұрын
check your spelling on some of the code I had an issue like this because I spelt "sign" as "sigh"
@jackrenney4122
3 жыл бұрын
@@ZiggyStyley i know this was 5 months ago but thanks for this comment i was banging my head against the wall
@ZiggyStyley
3 жыл бұрын
@@jackrenney4122 the comments on these videos are timeless
@VagnerBueno
3 жыл бұрын
Dude, I don't know what to say. This tutorial series changed everything for me. I've got here by chance knowing ABSOLUTELY NOTHING about programming. But I finally did it. I made a video for my song VOIDER based on these platformers style. Shaun, it wouldn't have happened without you, and that's why your name is included in the "Special Thanks" session at the end of the video. I would be very glad if you could check it out, or even read this comment. Anyways, THANK YOU! Vagner, Brazil 🇧🇷
@DeZJuice
3 жыл бұрын
Typed the code in exactly and player won’t move. any solutions?
@AtlasInTheWest
6 жыл бұрын
I’m immediately running into an issue, I’ve copied down exactly the coding you used and yet my character will not move when I press the left and right buttons
@princessmossy6930
6 жыл бұрын
I know this is three months old but I found the solution to this for anyone who was wondering like I was. What I did was in the map placed the sprites into the room. You need to place the OBJECTS into the room. The sprites are just pictures they aren't the objects with the coding. Replace the sprites with objects and this should work!
@AtlasInTheWest
5 жыл бұрын
Princess Mossy I actually figured that out myself a few days after I commented this, but thanks!
@tithatario3915
5 жыл бұрын
@@princessmossy6930 not working for me. I used an object. No movement :(
@isaacsachs4244
5 жыл бұрын
@@tithatario3915 I have the same problem. Did you end up figuring it out?
@lucamateipintilie7006
5 жыл бұрын
Contact Parkour This is a very bad idea, but I don’t want to bother with tech support so try to use drag and drop mode and use the tutorials from the official website of the devs. Basically there are blocks that do the typing for you. Like a puzzle. Good luck. Plus it might be an update that broke it. I’ll try another time
@matkopeteh4197
6 жыл бұрын
1. play a video in fullscreen 2. type: a w e s o m e 3. look at the bar
@karrensusan4825
5 жыл бұрын
cool!
@Kielserat6969
4 жыл бұрын
cool
@flyerderek6073
2 ай бұрын
I spent a month going through this tutorial and I understand soo much now
@RaposaCadela
5 жыл бұрын
"hsp = move * walksp;" makes my game not open, for whatever reason. I tried to close and open the project back again, and now the interface is all gone, and I can't get it back!
@MotoXJuan
4 жыл бұрын
i did the same thing. turns out i had my step code in create, and create code in step, when it should have been the other way around
@szymonbargiel2659
5 жыл бұрын
Great tutorial! One thing i don't understand is at 23:28 if i don't use while (!place_meeting(x+sign(hsp),y,oWall)) . then it's still works perfectly fine, what is the situation that without this it would cause problems? Thanks for tutorial again :)
@frycs1255
3 жыл бұрын
even as someone who had been designing and creating games for years I learned something from this.
@thegamevortex2709
Жыл бұрын
finally someone who does not spent 50 minutes just explaining every singe little way to do a thing instead of using just doing the stuff we came here for.
@leedleleedlelee6912
5 жыл бұрын
nothing is appearing when im pressing play, help plz edit: nvm j was running the wrong room
@onetrueandrew
7 жыл бұрын
What is the best way to become proficient in GML and Game Maker Studio 2? Obviously tutorials and trial and error, but any other suggestions for learning?
@onetrueandrew
7 жыл бұрын
I've put in a week's worth of time and practice. It paid off. Submitted my first game, Recoil, to the GMTK jam tonight. Thanks for everything you've taught! Check me out on itch. io if you like, creator name is brotherpixel.
@garoldgoatgaming2923
6 жыл бұрын
I just played your game and it's a lot of fun!
@kuro-rg6cr
3 жыл бұрын
For everyone saying "This didn't work" You have to duplicate the code from key_left = keyboard_check(vk_left) to x = x+hsp; and replace the last line with y = y+vsp; Hope it helps!!
@imfineareu
3 жыл бұрын
Where do You put it?
@UserLuigi
2 жыл бұрын
Still works 4 years later, thanks!
@GossLean
7 жыл бұрын
I don't understand I got this.. Im new so I dont very understand, It supposed to be the same thing as you FATAL ERROR in action number 1 of Step Event0 for object oPlayer: Variable oPlayer.vsp(100009, -2147483648) not set before reading it. at gml_Object_oPlayer_Step_0 (line 11) - vsp = vsp + grv;
@nickguidi9226
6 жыл бұрын
I had the same problem but with walksp FATAL ERROR in action number 1 of Step Event0 for object obj_player: Variable obj_player.walksp(100006, -2147483648) not set before reading it. at gml_Object_obj_player_StepNormalEvent_1 (line 9) - hsp = move * walksp;
@jakob7912
6 жыл бұрын
sameeeeeee
@threeeyeduke981
6 жыл бұрын
tvelok check which type of coding you are on if there is blocks that means your on the wrong type
Пікірлер: 3,6 М.