How to code JUMPING and GRAVITY | Make a sprite jump | Realistic game effect - Scratch 3.0 Tutorial

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

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

  • @elrincondeprimaria
    @elrincondeprimaria  2 года назад +25

    ✅ Here you have my PLATFORMER GAME TUTORIAL in which I FIX THE CLIMBING BUG and other issues related to collisions. In addition, I explain how to add NEW LEVELS:
    ruclips.net/video/_T5TtmYBZLc/видео.html

  • @kailin4253
    @kailin4253 3 года назад +79

    I just find it funny when someone’s user name is a different language but can speak English anyways, Thank you for the video. Have a nice day! 👏🏼🙏🏻✊🏻 Muchos Gracias Amigo!

  • @legitlefty
    @legitlefty Год назад +27

    thank you so much!
    i was trying to do real physics equations but it got too complicated :|
    so this was a lifesaver!

    • @elrincondeprimaria
      @elrincondeprimaria  Год назад +1

      👍🏼☺️

    • @Spinjitzu_Master1
      @Spinjitzu_Master1 10 месяцев назад

      I completely agree with you, also, I really like that you profile pic is spamton from deltarune.

  • @scope2585
    @scope2585 Год назад +12

    another easier thing you could do to make the character change directions is to make it where there is costume corresponding to the direction the sprite is pointing in (eg. if right arrow pressed switch costume to costume b)

  • @NcBaller_14
    @NcBaller_14 11 месяцев назад +2

    dank yu vor dis video weri gud

  • @Dracoman
    @Dracoman 3 года назад +18

    You are a very handsome, underrated dude! I hope you channel continues to grow further

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

    When i was a kid, I really used to think that coding jump, friction, acceleration is hard. Nowadays after studying physics, I feel confident to code it 😂

  • @skymed3095
    @skymed3095 3 года назад +7

    thanks this helped my game i've been working on for a long time

  • @rrodey
    @rrodey 2 года назад +22

    This is a great tutorial! One small problem; touching floating platforms make the sprite teleport above it. Is there a fix to this?

    • @elrincondeprimaria
      @elrincondeprimaria  2 года назад +5

      Check the description of the video.

    • @Dulous_christhou
      @Dulous_christhou Год назад

      You can make a hitbox and if the hitbox touches the platform, you cant get the cat to touch it

  • @FoxTrolls
    @FoxTrolls Год назад +1

    When I add to the part were it won't allow double jumping and place the blocks into the needed area when I play it, it seems that the gravity is too strong for it to jump normally.

    • @elrincondeprimaria
      @elrincondeprimaria  Год назад +1

      I'd need to see your project to help you out. You have my email address in the description of the video.

  • @rollinrobloxxd8758
    @rollinrobloxxd8758 2 года назад +1

    This guy is the best! I went from knowing nothing, to making an entire platformer! He is the best at scratch! (No offense to anyone else out there who codes with scratch, and yes, I know griffpatch

  • @NotGrayYT
    @NotGrayYT 2 года назад +1

    thanks i used this for a mario game

  • @terbowithane
    @terbowithane 6 месяцев назад

    Spanish: Esto fue realmente útil. Buen trabajo. Ingles: This was actually useful. Nice work

  • @FireX295
    @FireX295 Год назад +1

    why does my sprite just fall past the ground?

    • @elrincondeprimaria
      @elrincondeprimaria  Год назад

      I'd need to see your project. You have my email in the description of the video.

  • @roxers7531
    @roxers7531 3 года назад +9

    Omg thanks a lot dude, I've watched so many videos on how to fix the vibration, and this was the only one that worked!

  • @jenniferworkman669
    @jenniferworkman669 Год назад +1

    Why can't I move whilst jumping??

    • @elrincondeprimaria
      @elrincondeprimaria  Год назад

      You probably did something wrong. My email is elrincondeprimaria2020@gmail.com.

  • @Ethans_Here
    @Ethans_Here 2 года назад +4

    Thanks dude, really needed this (:

  • @phillipwest1779
    @phillipwest1779 2 года назад +1

    thank you so much now I can jump because i'm working on a platforming game

  • @danielray9080
    @danielray9080 3 года назад +1

    When im jumping I cant move left or right. What am I doing wrong?

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      How can I know if I can't see your programme? 😂
      Send it to me if you want: elrincondeprimaria2020@gmail.com

    • @danielray9080
      @danielray9080 3 года назад

      @@elrincondeprimaria good point

  • @morriganmayfair2552
    @morriganmayfair2552 5 дней назад

    thanks man this helped me finish my game dodge the block and im also watching this right while makeing the sequal to dodge the block thanks man this is helping me rn and helped me then

  • @wiebelvr8008
    @wiebelvr8008 2 года назад +1

    tysm you made my scratch career this just shows to never give up and ones again thank you!!!!

  • @iHeartLuki
    @iHeartLuki 2 года назад +6

    Thank you bro🙏you helped me SOOOO much and you definitely deserve all the respect and Love. I Hope your Channel Grows big Sometimes🙏👍

  • @breaknmakeGamer360
    @breaknmakeGamer360 28 дней назад

    This really helped me a lot because I am thinking to make a game of mine in Scratch 3.0. Tysm!

  • @charliesimpson5666
    @charliesimpson5666 2 года назад +2

    Very basic and helpful. did not struggle at all while try to get this into my own game

  • @MohamedAli-me7uh
    @MohamedAli-me7uh 3 месяца назад

    this is the first time i see tutorial that works and easy what magic you use? thanks you so much you are a lifesaver you saved me from keeping hitting my head to the walls:D

  • @saէurn_ace
    @saէurn_ace 2 месяца назад

    OMG thx so much really helped out I was searching for SO MANY TUTS

  • @primodesmile634
    @primodesmile634 3 года назад +1

    Wow it actually works thanks

  • @OrangePJyt
    @OrangePJyt Год назад +1

    thank you i am making a game named "Super Cat Bros" and i needed help with gravity. This was very helpful and it easy =)

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

    Hey, great tutorial! But I have one problem: When my figure is in the air, it floats above the ground for a second and then touches the ground. I don't know if you're still responding to comments in here, but if yes, it would be pretty helpful!

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

      Email me your project. You can find my address in the description of the video.

  • @OnlyDaylyn
    @OnlyDaylyn Год назад

    This tutorial really came in clutch. Tysm! you earned a sub

  • @SashumiTheSprunki
    @SashumiTheSprunki 21 день назад

    Thank You! This Helped Me For my Coding!

  • @odd-socks69
    @odd-socks69 8 дней назад

    thanks I didn't know someone would make a tutorial on this but you did

  • @Mr27official
    @Mr27official 2 года назад +3

    Thank you so much! You really helped me a lot 😀😀

  • @JackelineBezerra-tw9mv
    @JackelineBezerra-tw9mv 3 месяца назад

    Thank you!, this was very useful for my Scratch game "Oyriak"!

  • @not_ptyr
    @not_ptyr Год назад +1

    It worked, big thanks! I will keep the bug though because im kinda lazy to make a wall climb mechanic in my Parkour game

  • @Avearge_Ant
    @Avearge_Ant 2 года назад +3

    thank you for the tutorial! but I have one question: is it possible to make the sprite do double jumps, but not triple jumps?

    • @bloodiedknight0049
      @bloodiedknight0049 2 года назад

      I think one way to do that would be to create a new variable called jump count, or something like that, and use an if and statement that checks if the up arrow has been pressed and also checks if jump counter is greater than 2. Inside that if and statement you can set y velocity to 12 like in the video and also increase jump count by one. Also in order to jump in the air you would have to move the jumping related code outside of the if statement that checks if the sprite is on the ground. Also in order to be able to jump multiple times, set the jump counter back to 0 once the sprite is on the ground.
      I think this should work but if you have any questions I'll try to answer them.

  • @AylexOnYT
    @AylexOnYT 8 месяцев назад

    Thank you for the awesome tutorial mate! You have saved me, I have spent days looking for the right video for gravity and jump and yours actually worked. I have an assignment due tomorrow and I thought I wouldn't find a video in that time. Once again thank you so much. Much love
    +1 Subscriber 😉

    • @AylexOnYT
      @AylexOnYT 8 месяцев назад

      I want to put this into a 2 player game so when I added the 2nd player I duplicated the 1st one but now they both don't jump as high?
      *EDIT: I have fixed this problem. Just created a yVelocity for each sprite using the option "For This Sprite Only".

    • @elrincondeprimaria
      @elrincondeprimaria  8 месяцев назад

      You'd need two different "y velocity" variables or make it "for this sprite only"

  • @captaintheo86
    @captaintheo86 2 года назад +4

    this is great! I'm making a platformer on scratch and this really helped!

  • @AcaciaOSC
    @AcaciaOSC Год назад

    This is the best tutorial I've ever seen, THANK YOU

  • @jinglepants
    @jinglepants 3 года назад +2

    Thank you I can finally continue on my game

  • @Just_GamingYC
    @Just_GamingYC 3 года назад +2

    I have a small bounce when I touch the ground after a jump but it works fine

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      You can check my dinosaur's code in this project: scratch.mit.edu/projects/484645027/

  • @starryskies9944
    @starryskies9944 3 года назад +4

    What do you do when you have a bit of ground that the character should not be able to jump onto but does anyway?

    • @bas1cbrick705
      @bas1cbrick705 3 года назад

      New sprite, or use {If touch (color)} block

  • @FTSebby
    @FTSebby 3 года назад +3

    Thank you I can finally continue on my game :)

  • @jamesdunham5505
    @jamesdunham5505 2 года назад

    Thx for making this video because I really wanted to make a platformer like rpg in scratch.

  • @nicoplays1000
    @nicoplays1000 3 года назад +1

    hello now im back again now it wont let me jump when i try to make it jump
    at 6:23 i cant jump , is there anything wrong? , if u actually have discord then i can show more pics so you can see .

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      Share your project and send me the link to it: elrincondeprimaria2020@gmail.com

  • @kartavyapatel4720
    @kartavyapatel4720 3 года назад +1

    Very nice, I will use these in my platformer

  • @legomaniac4689
    @legomaniac4689 2 года назад

    This helped me a ton with my platformer

  • @Couldbeme
    @Couldbeme 3 года назад +1

    4:30 why is it going up

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      Because I'm dragging it to place it above.

    • @Couldbeme
      @Couldbeme 3 года назад

      @@elrincondeprimaria no when I do it

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      Make sure you set a negative number in "change y velocity by".

  • @DMemorial123
    @DMemorial123 Год назад

    is it possible to make it just jump? without the touching ground thing?

    • @許浩揚-f1z
      @許浩揚-f1z Год назад

      Yofcourse, you can try set the charater's y to a variable "Y" ,and change the toching ground thing to y="Y"

  • @eternalistmorqan9476
    @eternalistmorqan9476 Год назад +1

    Real great

  • @subscribetosus5989
    @subscribetosus5989 3 года назад

    thx bro i got every step correct and made super wacky bros. the game demo

  • @MrSoapi-333
    @MrSoapi-333 9 месяцев назад

    THANK YOU SO MUCH I NEEDED THIS VIDEO!

  • @davinv3859
    @davinv3859 2 года назад

    this helped for my game im makeing a slime rancher fan game evrey slime has to fall good so keep up the awsome work

  • @Awesomegamingandmemes
    @Awesomegamingandmemes 7 месяцев назад

    I had to delete the replace part cause it would be vibrating like crazy but I was fine without. Amazing tutorial, I used it on Mr Chick run, my game and it worked
    😄 9/10 definitely subbed

  • @_snowymike
    @_snowymike 3 года назад +2

    So at last how can we fix the "climb" bug?

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад +1

      I'll explain it when I make a platformer tutorial. I might make one during this summer.

    • @_snowymike
      @_snowymike 3 года назад

      @@elrincondeprimaria ok thx

  • @khanhha3559
    @khanhha3559 3 года назад +1

    My sprite sinks into the ground like it's mud, any way to fix this?

  • @aussienesbit6391
    @aussienesbit6391 3 года назад +1

    I did everything right but it wont work when I try to make it so my character can only jump on the ground, can you please tell me how to fix this?

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      You can check my dinosaur's code in this project: scratch.mit.edu/projects/484645027/

    • @Macey88
      @Macey88 3 года назад

      @@elrincondeprimaria your dinosaur project doesn’t work either

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      It does. I can't figure out what you're doing wrong...

    • @Macey88
      @Macey88 3 года назад

      @@elrincondeprimaria Like I’m sure it does work for most sprites but I have everything copied exactly right and for some reason my sprites keep sinking into the ground and glitching out every time I try to use the up arrow. One kinda works sometimes it will jump but sometimes it doesn’t but the other one won’t jump and never stopped vibrating

    • @Macey88
      @Macey88 3 года назад

      @@elrincondeprimaria plus one never really lost their launch into the air when you hold down the up arrow thing like I have no idea what I did wrong. Ive been trying to figure out a solid way of jumping for days now and you’re video is the closet I’ve gotten so far.

  • @ragavanranjithkumar4348
    @ragavanranjithkumar4348 8 месяцев назад

    Very thanks sir, this helped me a lot for my game

  • @acidguy-e8y
    @acidguy-e8y Год назад +1

    I made a variable called jump and if you jump it will set to yes otherwise it will set to no. I used this to add a slam if you press down in midair.

  • @loretoys8785
    @loretoys8785 2 года назад

    this is fantastic! i am using this for a street fighter game but in JoJo

  • @Hampter_the
    @Hampter_the Год назад

    thank you so much !! Great video btw

  • @Solar3232
    @Solar3232 3 года назад +1

    Thank you! Helped so much!

  • @BerryOF
    @BerryOF 8 месяцев назад

    díky za tutorial byl super😀

  • @dingbat-dingo
    @dingbat-dingo 10 месяцев назад

    This works really good but i go up really fast. Do you have any recommendations on slowing the going up part of the jump down a little?

    • @elrincondeprimaria
      @elrincondeprimaria  10 месяцев назад

      Reduce both the gravity and the "set yv" value when you press up arrow key.

    • @dingbat-dingo
      @dingbat-dingo 10 месяцев назад

      Thank you :] @@elrincondeprimaria

  • @7LN7LN7
    @7LN7LN7 2 года назад

    Thanks this was the best scratch tutorial i ever watched:)

  • @violinkid6595
    @violinkid6595 2 года назад

    Thanks dude, this really helped alot with my new game, I am not new on scratch but I am still having trouble making gravity, so thanks alot!

  • @Cool.kid.gaming
    @Cool.kid.gaming Год назад

    For some reason every time I get to the part where he’s jumping in the air when I try to jump nothing happens

    • @elrincondeprimaria
      @elrincondeprimaria  Год назад

      I'd need to see your project to help you. You can find my email in the description of the video.

  • @grubworm.
    @grubworm. 3 года назад +4

    I had an issue: Even though I placed the Replace Block in the right position, my sprite still vibrates. How do you fix it? Thank you. :D

    • @elrincondeprimaria
      @elrincondeprimaria  3 года назад

      Check the code of the dinosaur in my project: scratch.mit.edu/projects/484645027/

  • @safwanabintesaif511
    @safwanabintesaif511 Год назад

    Thank you brother it really helped me out on my game

  • @LiamGames662
    @LiamGames662 2 года назад

    Thanks bud really helped i will make sure to put your link in my credits

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

    Thank you so much, life saver. But what if i want it to double jump, but only to a certain amount before being forced to fall?

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

      You need to use a variable to count the number of double jumps permitted, but it's impossible to explain it here.

  • @shapanmail
    @shapanmail 2 года назад +1

    This is so good 😀😆😆👍

  • @Integral21
    @Integral21 Год назад

    you can easily fix the "up" gravity by adding join (-) (gravity) to the change y thing

  • @auroratraver9254
    @auroratraver9254 2 года назад

    thank you! now I can make my geometry dash project

  • @CoconutREAL111
    @CoconutREAL111 Год назад

    tysm this helped me a lot for my game 👍👍

  • @FebriDahri
    @FebriDahri 2 года назад

    Thx for the tutorial bro..👍👍

  • @Content_Bakery
    @Content_Bakery 10 дней назад

    Thank You So So Much only one problem if i jump iclick my arrow up like a half sec i go trough the ground. Do yo know how to fix this?

    • @elrincondeprimaria
      @elrincondeprimaria  9 дней назад

      I'd need to see your project.

    • @Content_Bakery
      @Content_Bakery 9 дней назад

      @@elrincondeprimaria i found an other video so i deleted the script but i will later retry it

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

    for some reason at 6:34 when you jumped you went up then back down but when i press up arrow nothin happens but the numbers ( at y velocity) go up reaaly fast

  • @connorfrommars
    @connorfrommars 2 года назад

    I’m starting to get it but my cat keeps on teleporting to the bottom every time he isn’t touching it could you please give me advice on how to fix it?

  • @fyshstix9781old
    @fyshstix9781old Год назад

    Thank you for this, it is so helpful!

  • @rizal4596
    @rizal4596 3 года назад +1

    thank you for this tutorial, hopefully i remember to put your name into the credits

  • @Thunder-j8w
    @Thunder-j8w 27 дней назад

    I’ve literally followed but i think my games Brocken bc every time I place my sprite in the air it doesn’t fall like that it just.. teleports at the bottom of my screen 😢

  • @Medic744
    @Medic744 4 дня назад

    nice tutorial!

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

    Thanks sooooo much bro, you deserve the subscribe

  • @benjaminshemluck7571
    @benjaminshemluck7571 2 года назад

    Thanks sooo Much!! You saved my game :)

  • @thatonegamer_4168
    @thatonegamer_4168 Год назад

    this was really useful thanks!

  • @waterH20_23
    @waterH20_23 2 года назад

    tysm for the jumping system you helped me out a ton on my scratch project

  • @CalumMclaughlan
    @CalumMclaughlan Год назад

    This is great, but how would i do this with a start screen because by the time i get to my playing screen the sprite is way past the line?

    • @elrincondeprimaria
      @elrincondeprimaria  Год назад

      Start the character's code when receiving a message and broadcast that message when you exit the start screen.

  • @ghousiashahana3618
    @ghousiashahana3618 Год назад

    THANK YOU!! it helps me

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

    thanks it was quick and easy

  • @WilliamMurphy-i1v
    @WilliamMurphy-i1v Год назад

    Omg I was getting so mad but then after watch your video 2 times i realized i had one of my variables called my-variable instead of y. but thank you it works so smooth.

  • @xyrity
    @xyrity 2 года назад

    thank you so so so much bro, it worked!

  • @AACHIGAMER289
    @AACHIGAMER289 Год назад

    this rlly helped me out thx

  • @Platinum285
    @Platinum285 9 месяцев назад

    how did you make the ground thingy on the sensing block

  • @MinuteGlass
    @MinuteGlass Год назад

    this helped me out so much 😊

  • @codeacademy6394
    @codeacademy6394 2 года назад

    great tutorial! you earned a sub :)

  • @JadenTheBarber
    @JadenTheBarber 2 года назад

    You saved my project, and saved me so much time!! MUCHAS GRACIAS!!

  • @ZeoNeo-123
    @ZeoNeo-123 Месяц назад

    I'm not sure if this was supposed to happen but when i jump i want it where while i'm in the air i can still use A & D mid-air to jump from platforms, please make a video about it. :D

  • @Ahnobayan
    @Ahnobayan 3 года назад

    This is really helpful thx a LOT

  • @naelizaz1737
    @naelizaz1737 2 года назад

    Is chicken a a liquid or a variable