HOW TO CREATE A PHYSICS ENGINE IN SCRATCH!!!

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • Hope this helps you make something amazing!
    HOW TO CREATE A PHYSICS ENGINE IN SCRATCH!!!
    Merch:
    www.bonfire.com/store/dekus-s...
    DkGalaxy:
    / @dkgalaxytv
    Deku's Dubs:
    / @dekusdubs
    Spellbound TCG:
    / @dxtrgames
    Sckags:
    / @sckags1361
    Webtoons (Speciality & My Guardians):
    www.webtoons.com/en/challenge...
    www.webtoons.com/en/challenge...
    Casting Call Club:
    www.castingcall.club/dkuniverse
    Discord: / discord
    My Website: dekusuniverse.weebly.com/
  • Hry

Komentáře • 250

  • @syedaarizhuq
    @syedaarizhuq Před 2 lety +35

    This is literally the exact physics engine i was searching for

    • @syedaarizhuq
      @syedaarizhuq Před rokem +2

      also dont use the ground as a backdrop use it as a sprite

    • @syedaarizhuq
      @syedaarizhuq Před rokem +4

      Because "touching color" on a very colorful ground means LOTS of conditions, so if you use it as a sprite then just give "if touching sprite" its less laggier more efficient & less overcomplicated bugs

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

      What other physics engine would you be looking for?

    • @yes9121
      @yes9121 Před 7 měsíci

      @@leomartin7409he could’ve been looking for one that uses balls

    • @plantboy1234
      @plantboy1234 Před 2 měsíci

      me to

  • @vermillionbg
    @vermillionbg Před rokem +4

    amazing tutorial! under 30 minutes and works almost to perfection

  • @snowflake870
    @snowflake870 Před rokem +1

    this is giving me a lot of new ideas, tysm for uploading

  • @zippycat
    @zippycat Před 2 lety +24

    just a little bit janky, but still impressive compared with scratch's standards

  • @wiperADHD
    @wiperADHD Před 6 měsíci +1

    i had a problem for when just started there was nothing but the ground cus the block was in hide and i went over it again and made sure i had the same code i dont know why

  • @MagnetizedBread
    @MagnetizedBread Před 11 měsíci +7

    For the people who need it:
    make the variables direction, slope, xVel, yVel, gotHold, moveX, and moveY to this sprite only, or else it won't work. I know he already says this in the video, but I just wanted to warn people without add on's before that continue.

    • @Unplugged7
      @Unplugged7 Před 9 měsíci

      bruh ☠️

    • @Unplugged7
      @Unplugged7 Před 9 měsíci +1

      I need to completely replace my variables now...

    • @MagnetizedBread
      @MagnetizedBread Před 9 měsíci +1

      @@Unplugged7 Just use plugins, it's not that hard.

    • @Litt1eHuia
      @Litt1eHuia Před 8 měsíci +2

      @@MagnetizedBread he cant he's unplugged

    • @jobinjohn8990
      @jobinjohn8990 Před 5 měsíci

      thank god i have addons

  • @gavinleonard4848
    @gavinleonard4848 Před rokem +1

    my object dosent work, it just follows my mouse and spins, it works a bit, but its really floaty, always spinning, and it gets stuck alot

  • @koopagamesinc4676
    @koopagamesinc4676 Před 2 lety +17

    now show us how to make angry birds with these physics for the buildings

  • @edenilsonpereira551
    @edenilsonpereira551 Před rokem +7

    For literally no reason, I can't throw the cube in the X direction. Can anyone help me?

    • @user-xg8lk7os8d
      @user-xg8lk7os8d Před 7 měsíci

      I have no idea why this is happening for you I am sorry for you😢

    • @muister325
      @muister325 Před 5 měsíci

      Make sure ''hold'' is a Global variable (for all sprites), if it still doesnt work u can send the project link Ill check it out

  • @Deadfish83
    @Deadfish83 Před rokem

    what did i do wrong things don't rotate ever no matter what, the boxes fall at a set speed the hole time, and i can't drag it's like a reverse magnet.

  • @iliyastefanov312
    @iliyastefanov312 Před rokem

    For some reason everything works, but the cubes wont turn when on slopes or edges. Help

  • @Fatcatharhar
    @Fatcatharhar Před rokem

    they keep being throwen to the corner and when i catch it it literally goes to my cursor untill i end it

  • @momocraft365
    @momocraft365 Před rokem

    what have you done to the collisons

  • @Goorgoozonok963
    @Goorgoozonok963 Před 11 měsíci

    can someone please tell me, I kind of wrote everything correctly, but my cube always slides to the left?

  • @cheir1000
    @cheir1000 Před 2 lety +1

    Deku im on turbowarp please help me for the clone moving right

  • @plutoyung1002
    @plutoyung1002 Před 4 měsíci +2

    I can't pick up the cube, when I click the cube it just teleports to my cursor then just falls to the ground and cant never be picked up again

    • @LegoMixerMan
      @LegoMixerMan Před 2 měsíci

      Set the hold variable to all sprites

  • @filipryen1347
    @filipryen1347 Před rokem

    for some reason it teleports away and keeps reset please help me with this i spent my day on this project

  • @purchasepurchase3691
    @purchasepurchase3691 Před 4 měsíci

    i cannot drag the box, do you have a solution to solve it?

  • @user-de4fq3bc2y
    @user-de4fq3bc2y Před 8 měsíci

    Thank you so much for this video. You helped me a lot 😀

  • @DoorsBlox
    @DoorsBlox Před rokem +1

    THANK YOU SO MUCH THIS IS AMAZING!

  • @Lizardlover10
    @Lizardlover10 Před rokem

    Every time I try throwing my block It just teleports strait to the floor. Can anyone please help with this??

  • @user-xg8lk7os8d
    @user-xg8lk7os8d Před 7 měsíci

    For some reason when the block touches the ground it teleports back to the top

  • @theinsidegamer
    @theinsidegamer Před rokem

    I followed your tutorial and the blocks keep going into the ground.
    Does anybody know how to fix this?

  • @jarettyoung264
    @jarettyoung264 Před rokem

    when I right click on it it doesn't say swap

  • @aaronturnbull1171
    @aaronturnbull1171 Před rokem

    it can only go up for me i cant find where i messed up.

  • @KVAnim
    @KVAnim Před rokem +1

    I can't pick up the blocks though I went through the code

  • @itscooler_
    @itscooler_ Před 2 lety +1

    When I start the project my cubes are spinning so clockwise very fast help

  • @Mafferman
    @Mafferman Před 7 měsíci

    I can't throw it litteraly anywhere, I've checked the code multiple times now, but for some reason it doesn't let me actually hold it, it just goes to the mouse pointer when I click it and falls
    I'm at 17:31 at this part btw

  • @clovervidproductions
    @clovervidproductions Před rokem

    Give me the link for this scratch project

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

    dude you earned a sub

  • @teresakessler4882
    @teresakessler4882 Před 2 lety +11

    When I hold the cubes they spin around clockwise for some reason. This reason makes it really hard for the blocks to stack on top of each other.

  • @bradygamer5506
    @bradygamer5506 Před 7 měsíci

    one thing why can't you change the square into a ball?

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

    0:00 to 0:01 yo his voice changed so much in 1 sec

  • @SillyFloober
    @SillyFloober Před rokem

    I think I messed up the coding, all the blocks go to a random place, and it keeps changing Move X, and Move Y to a random number 0_0

  • @Theslayerofdoom
    @Theslayerofdoom Před rokem

    Can you help me please the box’s just keep rolling

  • @RandomDrawinglol
    @RandomDrawinglol Před rokem

    i built off yours and made an even better one! thank you for this and helping me

  • @thirishwehlaing2274
    @thirishwehlaing2274 Před 4 měsíci

    I have a problem because my blocks are sooo slow slower than a snail

  • @lucaskeen9332
    @lucaskeen9332 Před rokem

    Every time I pick up the cube it glides to the wall and grows out of the ground like a tree

  • @12newangels
    @12newangels Před rokem

    im having a problem where the cubes or whatever sprites have like no collision and it only works well with 1 when I add more than 1 they have no collision and ALSO if i try to drag one they all teleport to the one thats being dragged but i give up lol

  • @bwoccy
    @bwoccy Před rokem

    my blocks have a spasm attack when i hold them :(

  • @Hamburgerhelperisagiantglove

    for some reason, when i grab the cube, it goes all over the place

  • @erawebt
    @erawebt Před 10 měsíci

    the blocks arent colliding with each other for me

  • @SigmaASMRonGyatt
    @SigmaASMRonGyatt Před rokem

    My blocks get pushed to the edge of the map and I cant grab them.

  • @savagecatdev
    @savagecatdev Před 2 lety +1

    cool love ur vids

  • @shyguystudios6551
    @shyguystudios6551 Před 5 měsíci

    yo if i had known that it said for all sprites! i didnt have to edit my game to fix the variables. very helpful tutorial!

  • @anpham-2012
    @anpham-2012 Před 2 lety

    WHERE DO WE MAKE USE OF “TURN” BLOCK?!

  • @sakkalwin4932
    @sakkalwin4932 Před rokem +2

    very good not gonna lie this is perfect for games that has physics👍👍👍👍👍👍👍👍👍👍

  • @verysneakyspy
    @verysneakyspy Před rokem

    Hey, my cubes won't turn, why is that?

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

    you are the first who made cube physics tutorial!

  • @mibsmartlearning9621
    @mibsmartlearning9621 Před měsícem

    bro use glacial epoch then ice bird then ice spears then ice surge its a rlly good combo for first sea

  • @georgewilly269
    @georgewilly269 Před 6 měsíci

    my boxes land for half a second, start spinning then flal through the platform

  • @jakobarena1060
    @jakobarena1060 Před 2 lety +1

    Wow I love your Videos

  • @xamyvaglab7967
    @xamyvaglab7967 Před 2 lety

    hey so im tryna make a scratch version of there is no game, but for some reason the blocks just fall through the black "platform". also when i try to throw them around they just continue gliding forward, without losing their momentum. I followed the tutorial exactly and idk what to do, please helpppppp

    • @AnnoyedBowlOfSpaghetti
      @AnnoyedBowlOfSpaghetti Před rokem

      Instead of using if touching color, use if touching sprite, and remove the platform from thebackdrop, and add it to a new sprite. Make sure your friction and stiffnes is less than 0

    • @xamyvaglab7967
      @xamyvaglab7967 Před rokem

      @@AnnoyedBowlOfSpaghetti its been a while since I've touched the project lol but when I do again, ill try it out, thanks!

  • @sunburstbike
    @sunburstbike Před rokem +1

    Followed all the steps but the cubes are acting funky and going to 1 corner and spazzing out. And when i grab them out, they either stay in place or go back to one of the corners

  • @hunted_games
    @hunted_games Před 11 měsíci +1

    There is one problem with this, when you make a clone I believe it will also clone the current clone so you get two instead of one, however one of them in in "hide" mode, not sure if this could be a problem

    • @K1Siel
      @K1Siel Před 9 měsíci

      if the clone block was plugged into a "recieve brodcast" block, it would create clones for the ammount of clones + the original sprite.

  • @crusader_gaming8273
    @crusader_gaming8273 Před rokem

    My dude hit puberty at the start from the intro

  • @CherryLimeStudiosreal
    @CherryLimeStudiosreal Před rokem +1

    hippity hoppity your code is now my property

  • @AlokzAndKeakeaavea.
    @AlokzAndKeakeaavea. Před 2 měsíci

    objects cant bounce and cant be stacked on eatchother becouse the tower is too wobbly, not so physics

  • @SMG20001
    @SMG20001 Před 2 lety +2

    This is the best tutorial I had in my life

  • @Unknown-gt8ux
    @Unknown-gt8ux Před rokem

    My cubes kept getting pulled to the side

  • @thebettersiturn
    @thebettersiturn Před 2 lety +4

    I followed your tutorial, but I can't grab the cubes after converting all the variables to a this sprite only variable, could you help?

  • @Klonoa1488
    @Klonoa1488 Před rokem +1

    Now this is an opportunity to make a 2d ragdoll sandbox game

  • @coderflower
    @coderflower Před rokem

    I don't think you mentioned to put the TURN block..... :)

  • @damienleerhy
    @damienleerhy Před rokem

    my block spins around clockwise can sombody help

  • @weegie3343
    @weegie3343 Před 2 lety +4

    wow, just 20 minutes and you get what I would do in 20 hours

    • @YepItsSandro
      @YepItsSandro Před 2 lety

      U mean never.

    • @weegie3343
      @weegie3343 Před 2 lety +5

      @@YepItsSandro no like i’m ok at scratch it’s just that I procrastinate a lot and I will need to fix about 34,421 bugs as well

    • @hasanmohammed3690
      @hasanmohammed3690 Před rokem +1

      This?! in 20 hours!? I can make this in 20 years!!

    • @thirishwehlaing2274
      @thirishwehlaing2274 Před 4 měsíci

      @@hasanmohammed3690 yeah your gonna meet death in 20 years

  • @Ultoxgamer
    @Ultoxgamer Před rokem +1

    I don't know why but my sprits just keeps falling through the backdrop

  • @reeli9053
    @reeli9053 Před rokem

    the cubes be like magnetic to the edges

  • @Frougsh
    @Frougsh Před 11 měsíci

    in editing mode i can grab and move the cubes, but when i am in full screen i can't grab them then physics still work through

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

      did you get dragging mode

    • @Mafferman
      @Mafferman Před 7 měsíci

      It might be a problem with the code, I currently have the same problem with it (When you're not in fullscreen it will let you drag it whether there's any code the the game or not)

  • @crazy_stories96
    @crazy_stories96 Před 2 lety +2

    It actually matters when the hold? is for this sprite only, it should be on for all sprites!!

  • @user-ub4jf6hs1n
    @user-ub4jf6hs1n Před 13 dny

    24:29 "The most famouse sentence in 1960s"

  • @milizzo-old-channel
    @milizzo-old-channel Před rokem

    19:55 I just got the addon that lets you convert variables to "for this sprite only." It's very handy.

  • @Cuber_YT
    @Cuber_YT Před rokem

    you just got a new sub

  • @TheRealOrbit
    @TheRealOrbit Před 11 měsíci

    legend thank you so much

  • @MichiganGamingRebooted

    Bro I had to watch the whole thing again because he did not tell me the variables were for this sprite only

  • @AngelStar03
    @AngelStar03 Před rokem

    idk why but for me it don't work properly

  • @A_player_in_useGD
    @A_player_in_useGD Před rokem +1

    I can’t throw mine and they randomly tp to the floor

    • @Unplugged7
      @Unplugged7 Před 9 měsíci

      ​@marielaoviedo8789ohhhhh

  • @CHOLOMBE
    @CHOLOMBE Před 2 lety

    I want project link

  • @sabugui
    @sabugui Před rokem

    my cubes keep going to the right

  • @Carsonnetic
    @Carsonnetic Před 2 lety

    Don’t you need more objects?

  • @vr_dude2
    @vr_dude2 Před rokem

    uhm, my cube wont turn?

  • @Man_Is_Dead_Fake
    @Man_Is_Dead_Fake Před rokem

    i think this channle deserves a 10/10 (day 5 of reviewing youtube channles)

  • @Maxim67459
    @Maxim67459 Před 5 měsíci

    help my square doesnt fall of the edge

  • @ThePianoTutorialGuy
    @ThePianoTutorialGuy Před rokem

    Mine doesn’t work

  • @Oilmmm
    @Oilmmm Před rokem

    This is really good and well made, except for 1 thing. when you have to go back and replace the variables, maybe PUT something IN THE VID for making it a for this sprite only, it really only wastes time

  • @mememoristyt8992
    @mememoristyt8992 Před 2 lety

    38th viewer i really wanted to hear your tutorial i never used physics engine on scratch before?

  • @RottenPickle
    @RottenPickle Před 2 lety

    I have a glitch where whenever I have the turn block in the physics all my blocks move to the right.

  • @Nikaxe
    @Nikaxe Před 2 lety

    Happy new years day!

  • @HankTheTank32
    @HankTheTank32 Před rokem +1

    Rename this to how to break your computer

  • @DinisFelix
    @DinisFelix Před 4 měsíci

    9:45 thank god you noticed that

  • @lazerundefined
    @lazerundefined Před rokem

    You could just change it into for this sprite only in scratch addons!

  • @user-ty9op4ne1z
    @user-ty9op4ne1z Před 7 měsíci

    Is there any way to reduce the lag?

  • @Bob-kerman789
    @Bob-kerman789 Před 6 měsíci

    i wanted to make a physics engine sandbox thx

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

    I made them go sideways and I can’t figure out why😭

  • @Aetherzin._
    @Aetherzin._ Před 2 lety +1

    Thank you

  • @Pandom-
    @Pandom- Před rokem

    Mine can't tumble around :(

  • @Guy56778
    @Guy56778 Před 11 měsíci +1

    I thought it was a kid at the start😂

  • @Freddyfanmulti3214
    @Freddyfanmulti3214 Před rokem

    Please make a part 2

  • @leonardofalcone9328
    @leonardofalcone9328 Před rokem

    my cubes just go down REALLY SLOWLY!!!
    how to fix?

  • @AntiFurryofficialchannel
    @AntiFurryofficialchannel Před 7 měsíci

    The fnaf video helped me so much with coding

  • @momocraft365
    @momocraft365 Před rokem

    its not detecting
    very will