Scratch - Jumping and Gravity

Sdílet
Vložit
  • čas přidán 1. 06. 2024
  • A Scratch tutorial that explains how to add acceleration and gravity to a jumping object in scratch. The character will jump a bit like "Super Mario" or other 2D platformers. In this example I used a ball instead of a character so I added a bit of a bounce when it hits the ground.
    Many people were asking for a Portal Tutorial... Here it is!
    • How to make Portal usi...

Komentáře • 687

  • @MrMattperreault
    @MrMattperreault  Před 10 lety +44

    This is my most popular Scratch Tutorial. Please tell me what else you'd like to learn about and I'll make more tutorials...

    • @renaibrown5587
      @renaibrown5587 Před 9 lety

      how to make A Game With A Inventory Please?

    • @krvin8087
      @krvin8087 Před 9 lety

      I'm doing a project for school and I'm trying to figure out how to make a sprite (with multiple costumes) perform a walking sequence. For example: If "right arrow" clicked "move x steps" and "set costume A". However, once the "right arrow" is clicked again, I would like for the sprite to move and switch to another costume (one that looks like a walking kind of action). So basically, every time the "right arrow" is clicked, it would move and also change costumes. Additionally, you would be controlling the walking with however many times that key is pressed. Sorry if I made it sound more confusing than it really is. From this video it seems like you know what you are doing so I thought I'd ask. Great tutorial!

    • @renaibrown5587
      @renaibrown5587 Před 9 lety +2

      ***** Thanks So much!

    • @alertacraftgold533
      @alertacraftgold533 Před 9 lety

      MrMattperreault THANKS!

    • @bggamingdeluxe5658
      @bggamingdeluxe5658 Před 9 lety +1

      ***** MY ACCOUNT: scratch.mit.edu/users/ACooIExit987656/

  • @TacoTurtleTwo
    @TacoTurtleTwo Před 10 lety

    Some people just would rather not curse as much as others, just respect his decisions man. CZcams can only be a nice place if we all treat each other with respect.

  • @knexpert1700
    @knexpert1700 Před 10 lety +1

    6:50 You could just change velocity to -1.6 (Or something else of your preference) instead of having to put -1 and divide and include all that bounce count stuff. It doesn't make him bounce 3 times but he doesn't keep on bouncing.

  • @mastimail
    @mastimail Před 3 lety +2

    I love it!!! I have been trying to understand this concept for so long but couldn't find a tutorial to explain it so simply and well!! ❤️

  • @manham98
    @manham98 Před 12 lety

    I'm in Year 9 and we are using this. This is great material and it would be helpful for future game designs.

  • @burpboy7351
    @burpboy7351 Před 8 lety

    This is the most helpful scratch platformer tutorial that I have seen. Good job!

  • @gibsonedu
    @gibsonedu Před 8 lety

    This is great. Currently teaching robotics and we start out with programming on Scratch. While the kids work, I've been working to advance my own Scratch Skills. I'm wanting to make a sidescrolling game and this is the first aspect I'll be tackling. Thanks :)

  • @nigelpaulette4260
    @nigelpaulette4260 Před 8 lety +30

    4 years and scratch still hasn't changed

    • @itz-gripstockz1179
      @itz-gripstockz1179 Před 8 lety +1

      Well, it has, since that's 1.4, and I use to go on scratch before December, and it was in 2.0 when it was white and everything was different, so you probably are still playing on 1.4

    • @bam6990
      @bam6990 Před 7 lety

      but its still fucking shit

    • @ethanpixelate
      @ethanpixelate Před 6 lety

      ItZ-GriPStockZ dont forget scratchX

    • @ethanpixelate
      @ethanpixelate Před 6 lety

      Bam but have you seen griffpatch's projects? or even chooper100 thelogfather or scratchcube? let me know

    • @stepfordzone
      @stepfordzone Před 5 lety

      umm scratch 1.0 is old

  • @EverydayMinecraft
    @EverydayMinecraft Před 11 lety

    Brilliant video and slowly building the variables together to get the 'answer' is really great

  • @Avenue522
    @Avenue522 Před 5 lety +8

    Holy cow i have been searching for weeks and FINALLY I find this IT'S SO HELPFUL!!!! AND SIMPLE AS WELL!!!

  • @Shibacki
    @Shibacki Před 8 lety +1

    I could never have figured this out without this video!

  • @icanfly2524
    @icanfly2524 Před 11 lety

    if you want a character to do an action he usually does to the right also to the left, you can do something like ¨when left arrow pressed, send to everyone the message LEFT¨, then, go to the character´s scripts an make a script that says something like¨when receiving LEFT, if key whatever is pressed, change sprite to whatever sprite¨. This new script will replace the action the key normally does whenever you press left.
    I hope this is useful!

  • @TaranVaranYT
    @TaranVaranYT Před 8 měsíci

    This is interesting. A 2011/2012 tutorial about scratch, that still works today.

  • @AndrewCockling
    @AndrewCockling Před 12 lety

    If you want to have the character land be able to land on two different colours when you pick the colours go to options and move 'or' into the 'if' space. You can then select the colours

  • @Winterline13
    @Winterline13 Před 8 lety +1

    This was SUPER helpful! Thanks so much for making this tutorial! :)

  • @MrMattperreault
    @MrMattperreault  Před 12 lety +1

    Awesome Suggestion! Maybe I'll make another improved tutorial!

  • @aric7726
    @aric7726 Před 11 lety

    This vid really helped me make my ball quest demo, and I'm hoping to have the full game out in the next week, thnx a lot!

  • @SerginhoD
    @SerginhoD Před 11 lety

    Nice answer! Very encouraging.... I started learning how to use scratch and understanding programing just few days ago. Its really great! Im vey interested in gravity use... Thanks a lot!

  • @BlaZe-pl4ym
    @BlaZe-pl4ym Před 10 lety +4

    thx for the help i needed it for my sonic generations demo

  • @DoctorIT98
    @DoctorIT98 Před 11 lety +1

    Great job MrMattperreault :D!
    Congratulations!!!
    It's pretty nice to make your students understand all the things that are being said by you!
    Congrats again :-)!

  • @sitab2009
    @sitab2009 Před 12 lety +2

    It's an excellent tutorial, lots of thanks; do hope you do more. Making small parts of games will be very helpful; I vote in favor for the portal gun.

  • @RevangelRose
    @RevangelRose Před 7 lety

    Great tutorial. Thank you so much. It really comes in handy!

  • @ninjabagel01
    @ninjabagel01 Před 11 lety

    i agree with what MrMatt said to you but adding to what he said about the marks are very important for a computer class i have to agree with him. I have taken numerous "video game design" "computer programming" "IT" and other such computer classes and ive always found 2 things, 1 half of the stuff they teach you is just "school" and no one actually does that in the field and 2 with some subjects its alot eaiser to understand things if you find online tutorials and just play with stuff for weeks

  • @marcosbauch1661
    @marcosbauch1661 Před 9 lety

    Thank you! I have spent more than 2 hours to find this out!

  • @halopancake
    @halopancake Před 11 lety

    Hello world! If you want to forget the bounce part this is what you need to do: Do everything he says until 5:05. Then create a separate script with this (Top to Bottom)
    when green flag is pressed
    forever if touching color [Whatever color your GROUND is {Not walls on the sides or ceiling}]
    set velocity to 0
    Then add your jumping things and your done.

  • @mehulnatarajan4239
    @mehulnatarajan4239 Před 9 lety

    Thanks a lot man. Your video was so useful, so automatically subscribed

  • @donaldduck7262
    @donaldduck7262 Před 8 lety

    you made this way more complicated then it could have been but still really good

  • @ieangzornglim520
    @ieangzornglim520 Před 7 lety

    amazing!!! i logically think of physics while watching this video, and i can understand it well. This video is a big help

  • @batlin
    @batlin Před 12 lety

    You could check for the condition where y

  • @bumble7193
    @bumble7193 Před 9 lety

    Thanks so much! I'm making a scratch game about my little puppy, and I wanted to make sure she had a realistic, and working jumping animation.

  • @Undecided_
    @Undecided_ Před 11 lety

    this helped so much, before my guy look like a robot teleporting, now it actually has simple physics THANKS, too complex for me to figure out

  • @klapzzo9024
    @klapzzo9024 Před 8 lety

    YOU DESERVE A SUBSCRIBER KEEP UP THE GOOD WORK

  • @jmc2379
    @jmc2379 Před 8 lety

    Thank you for this amazing tutorial!

  • @joejohn9238
    @joejohn9238 Před 11 lety

    I am doing a scratch/java camp in 2 days. i was worried if i didnt know enough but after this video i fell like i know everything there is to know about scratch (of course i dont) but still thanks a lot!!!!

  • @TigranTerterian
    @TigranTerterian Před 9 lety

    Thanks So much. I am a scratcher and this gets me stumped until now. :) thanks!!

  • @MennaElsaid
    @MennaElsaid Před 8 lety

    ITS REALLY AMAZING!!I LOVE THE GRAVITY!!

  • @adamsbri56
    @adamsbri56 Před 9 lety

    This was extremely helpful for a school project (I did change some things though since I have a lot more to my game than this) but thank you so much!

  • @Murder4Survival
    @Murder4Survival Před 11 lety

    This really helped me out, man, thanks a lot.

  • @ashton7308
    @ashton7308 Před 7 lety

    Thank you for this tutorial! It helped a lot!

  • @judahvenable7742
    @judahvenable7742 Před 6 lety

    Thank you so much! This tutorial was very helpful to me!

  • @stanfordmatthews5886
    @stanfordmatthews5886 Před 10 lety

    Thank you so much, this video helped with mostly all of my games in scratch! :D

  • @sirmerl1n770
    @sirmerl1n770 Před 9 lety

    Great tutorial, keep it up

  • @Silllybean
    @Silllybean Před 11 lety

    Amazing tutorial, thank you very much. Helped A LOT.

  • @Flash3Wade3Heat
    @Flash3Wade3Heat Před 12 lety

    for the horizontal movement, all you have to do to make it not move when you aren't pressing it is to put a "change x by Horizontal Velocity" inside of the if statement saying "if key left arrow pressed" and put if after the "set Horizontal Velocity to -3". do the same with the right arrow key.
    if (key (left arrow) pressed?)
    {
    set Horizontal Velocity to -3;
    change x by Horizontal Velocity;
    }
    if( key (right arrow) pressed?)
    {
    //repeat
    }
    //end forever loop
    Like so people can see

  • @allison6030
    @allison6030 Před 6 lety

    Yes thank you. I have been looking for a video like this to help me with my project I have to do in class

  • @komotohawk2270
    @komotohawk2270 Před 3 lety

    Thank you! im playing in scratch 1.4 on my windows 10 and now i know how to make jumping and moving! thank you!

  • @tthe3186
    @tthe3186 Před 5 lety +1

    So good, helped me a lot

  • @richardyin4417
    @richardyin4417 Před 10 lety +2

    AWESOME
    Thanks SOOO MUCH I NEEDED THIS SOOO MUCH

  • @okaythen7360
    @okaythen7360 Před 5 lety

    thank you, this is a massive help. this probaly saved me weeks in class

  • @jestleyestipona6671
    @jestleyestipona6671 Před 11 lety

    Nice job, and a good instructor! :D thanks! I learned a lot

  • @EverydayMinecraft
    @EverydayMinecraft Před 11 lety

    I have used the gravity logic and maths to produce the same effect in CraftStudio (game making software) that uses visual scripting too - I hope to have a video out soon showing how I did it... Thanks

  • @lonIey
    @lonIey Před 9 lety +2

    Really Helped me Out Thank you :)!!!!!

  • @LukeCreates
    @LukeCreates Před 11 lety

    DUDE YOU MAKE THE BEST GAMES OMG :D I LOVE THEM DUDE.

  • @007poche
    @007poche Před 12 lety

    You are the best!! This helped me do a incredible level and it is all thanks to you!! :D

  • @zaffareenkhan9577
    @zaffareenkhan9577 Před 11 lety

    this is fantastic!

  • @MrMattperreault
    @MrMattperreault  Před 11 lety

    Nice work!

  • @pyrogames6087
    @pyrogames6087 Před 9 lety

    thank you so much! that really helped me with games because before my character could only jump one way, Thanks

  • @anintrovert9868
    @anintrovert9868 Před 5 lety

    Thank you sooooo much!!! This is sooooo helpful!

  • @JackaJacka1108
    @JackaJacka1108 Před 11 lety

    Nice tut. Velocities were explained well, even though I figured this out the third month I joined. I really wished that scratch allowed for 3d objects, even though you can make 3d objects using math and the pen. That was one of the big reasons I moved onto unity and java.

  • @benwinmill1916
    @benwinmill1916 Před 6 lety

    This tutorial helped me alot thank you

  • @PokemontrainerNelly
    @PokemontrainerNelly Před 12 lety +2

    Thank you for uploading this tutorial. When I was creating this on Scratch, it somewhat lags (it has to takes a second or so to calculate it before it preforms each single movement). How do you make it become more smoother like in your video?

  • @MrMattperreault
    @MrMattperreault  Před 12 lety

    I'm not sure what is wrong with your code but your best bet is to always rewatch the tutorial and double check you've done everything right. You might also want to try redoing it from scratch.. :)

  • @Zeriel00
    @Zeriel00 Před 6 lety

    Wow this is amazing!! thanks! :D

  • @xhaanfilms2479
    @xhaanfilms2479 Před 9 lety

    This helped so much thx!

  • @MrMattperreault
    @MrMattperreault  Před 11 lety

    Hi grmr3ap3r1. Don't worry too much if the theory is bogging you down. Passion is more important than marks. Computer Science is one of the only fields where you can be a "self made" success story. :)
    That said success with computer programming comes with being persistent and learning how to be a good learner. So I'd suggest saving your progress, and starting again. You'll probably catch your error when you rewatch it.

  • @Flash3Wade3Heat
    @Flash3Wade3Heat Před 12 lety

    thanks. I actually did by accident because I thought it was what you said, but it was worked and was less complicated so I went with it haha

  • @Brian-tl9nv
    @Brian-tl9nv Před 8 lety

    You don't need to make the HorzVelocity variable, you can just go to motion and drag " Change X by___" In there you should put -10 for left, and 10 for right!

    • @itz-gripstockz1179
      @itz-gripstockz1179 Před 8 lety

      You do need it, since it is like Mario, it increases speed over time

  • @peterhagege1373
    @peterhagege1373 Před 4 lety

    rather than setting y to y + velocity you could have changed y by velocity, it would just have made the code simpler, very nice tutorial

  • @MrMattperreault
    @MrMattperreault  Před 12 lety

    My plan is to create a few tutorials on scratch. I'm not sure about making a whole game but I like the idea of making small parts of a game that people can borrow and use to make their own games better. I was thinking about making a portal gun in my next tutorial what do you think?

  • @mthom41
    @mthom41 Před 11 lety

    YOU ARE AN INCREDIBLE SCRATCHER!!! do u do ant other computer programing like vbs, c++, C#,Jva(not javascript) etc. ?

  • @joejohn9238
    @joejohn9238 Před 11 lety

    aww dont quit scratch this is wayyyy in your futer ive been doing scratch for 3 years and just now is this making sense to me :P

  • @synth5123
    @synth5123 Před 5 lety

    Thank you soooo much this helped a lot!

  • @natmetos5542
    @natmetos5542 Před 8 lety

    thanks for this matt!

  • @imdaank457
    @imdaank457 Před 8 lety

    Thanks,
    You helped me so much!!!!
    Youre awesome!!!

  • @ollythelolly4631
    @ollythelolly4631 Před 7 lety

    Thx this helped me a ton!

  • @hadigameman
    @hadigameman Před 9 lety

    thank you so much I was having troubles with platformer games

  • @PS-gu5nq
    @PS-gu5nq Před 7 lety +1

    Thank u this video helped me alot

  • @florinme9777
    @florinme9777 Před 8 lety

    are the best... Like your tutorials. Please make new one's!!..

  • @ambientsoda106
    @ambientsoda106 Před 3 lety

    This was best thing I learned in year 2 one university...after watching your video...a d this can translate well to unity that kinda has in built gravity based on collider...
    Bit in unity you upsets for everything 3ven jumping because ray can allow all kinds of switching.
    .

  • @NickTeckHelp
    @NickTeckHelp Před 10 lety

    I used your tutorial @MrMattperreault but my guy gets stuck into the floor after a jump, and you need to jump again to get him to the surface. any advice?

  • @michaelkawwa88
    @michaelkawwa88 Před 8 lety

    Thank you so much this really helped and you are so smart

  • @mandarin408
    @mandarin408 Před 6 lety

    what do I do withe missing plug in message when I press the create button. I tried to click on the missing plug in button hoping it will lead somewhere where I can download the pug in, but when I press it nothing happens.

  • @catkershaw4454
    @catkershaw4454 Před 7 lety

    Wait lol nv thnx so much! keep uploading tutorials!

  • @whitetubby5026
    @whitetubby5026 Před 5 lety

    Amazing!

  • @sandramiele7601
    @sandramiele7601 Před 8 lety

    this vid helped a lot!!! thx

  • @kubogi
    @kubogi Před 7 lety +1

    thanks
    WORKED!

  • @ludiba3504
    @ludiba3504 Před 11 lety

    You are amazing bro thank you very much!!

  • @user-ps8dl2xx4x
    @user-ps8dl2xx4x Před 8 lety

    Thank you so so much this is amazing and it really helped me. ;0

  • @MrMattperreault
    @MrMattperreault  Před 12 lety

    Awesome Congrats!

  • @levidendy
    @levidendy Před 11 lety

    Thank you soooo much this is awesome!!!

  • @caseysummers8010
    @caseysummers8010 Před 6 lety

    This is super helpful thxs

  • @LocksVid
    @LocksVid Před 10 lety +2

    thx, helped me a lot, took me like 5 years to do it though!

    • @jast_
      @jast_ Před 3 lety

      Its been over 5 years have you done it yet?

  • @zombiecreator4546
    @zombiecreator4546 Před 8 lety

    i just liked and subbed bro!

  • @TheChriscallao
    @TheChriscallao Před 6 lety

    Helped a lot! I am using this for an undertale game

  • @Toonuzz
    @Toonuzz Před 12 lety

    Thnx dude your amazing Liked and subbed :p

  • @adnaanmohamed6616
    @adnaanmohamed6616 Před 11 lety

    You need to make a sensing dot below the character and in the script put forever if the (colour of sensing dot) is touching ( colour of the platform ) bounce

  • @nightfire3603
    @nightfire3603 Před 5 lety

    you helped me a lot thanks

  • @pdawg9801
    @pdawg9801 Před 12 lety

    very helpful, and I would strongly suggest making more videos on scratch. If you feel up to it, make a video on how to create a whole game, not just the jumping part. Thanks still though the video was extremely helpful

  • @EverydayMinecraft
    @EverydayMinecraft Před 11 lety

    I am currently using this Tutorial to create a visual script in CraftStudio - see my channel for examples - its a 3D game making software that you can make game with friends on - I am experimenting with it and hopefully going to use it with my after school games club. So thanks it is working.... and I will pop a video response when its finished...

  • @connorwood9337
    @connorwood9337 Před 10 lety

    thank you this helped me very much