Scratch Algorithms You NEED To Know!

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 485

  • @ShiftClickLearn
    @ShiftClickLearn  3 ปีที่แล้ว +52

    Enjoy!

    • @amiasmiljour1190
      @amiasmiljour1190 3 ปีที่แล้ว +2

      1st
      Noice
      YEET

    • @QWERTYaWASD
      @QWERTYaWASD 3 ปีที่แล้ว +1

      Do a part 2

    • @jya208
      @jya208 2 ปีที่แล้ว

      thx for the helping

    • @slicerthe84th
      @slicerthe84th 2 ปีที่แล้ว +1

      the sprite is called nerd cat

    • @HS-DBQ
      @HS-DBQ 2 ปีที่แล้ว

      hello shift click lean

  • @jamespennington6428
    @jamespennington6428 2 ปีที่แล้ว +31

    I was making a title and accidentally used, “set x to” instead of “change x by” and that made it so much better with a constantly changing variable being my target value

    • @FreddyFazbearYo
      @FreddyFazbearYo ปีที่แล้ว +2

      Fr i was didn't even realise it was supposed to be a change and thought that it was supposed to be set to

    • @ChatterDoesMatter
      @ChatterDoesMatter หลายเดือนก่อน

      @@FreddyFazbearYobro is british

    • @ChatterDoesMatter
      @ChatterDoesMatter หลายเดือนก่อน

      @@FreddyFazbearYobut cool!

  • @amonke5983
    @amonke5983 3 ปีที่แล้ว +32

    Omg! I have been looking for these forever! Thanks for finding/putting them together!

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +5

      You are very welcome!

    • @vashah1
      @vashah1 2 ปีที่แล้ว

      Me to...(halfly)

  • @imnot4chriss
    @imnot4chriss 2 ปีที่แล้ว +8

    ANOTHER NICE TIP
    If you click "Backpack" on the bottom of your screen you can view a backpack
    you can drag anything into it, Scripts, Costumes, Sprites, Sounds
    And it will always be there, no matter what, wether you go to another project,
    it will ALWAYS stay there, until you delete it ofcourse, and you can take it out and use it when you need it

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว +3

      Good tip!

    • @CHA-1Gamin
      @CHA-1Gamin ปีที่แล้ว

      ​@@ShiftClickLearnit's good for some project seasons/sequels or prequels idk it will be really useful, since you don't need to rewrite everything

    • @Lol-mr8hb
      @Lol-mr8hb 6 หลายเดือนก่อน

      omg tysm

  • @bondaboo
    @bondaboo 3 ปีที่แล้ว +5

    I just LOVE your videos!

  • @Slinx92OLD
    @Slinx92OLD 2 ปีที่แล้ว +3

    this channel is underrated, and great video!

  • @magneto42brickfilms25
    @magneto42brickfilms25 3 ปีที่แล้ว +5

    Thanks for the tips

  • @gang-yt
    @gang-yt 2 ปีที่แล้ว +5

    This is so useful! Already liked!

  • @sebby_y
    @sebby_y 2 ปีที่แล้ว +6

    This is a life saver! I've been making a cookie clicker style game and this helped so much!

  • @DosBros531
    @DosBros531 2 ปีที่แล้ว +4

    No matter how many time I watch this, it is going to stay in my watch later list.
    Thanks for such a great information.

  • @gooberuploadsinc
    @gooberuploadsinc 2 ปีที่แล้ว +3

    Another way to do the second one is
    forever
    point to mouse pointer
    move ( distance to mouse pointer / a)
    Replace a with something like 10 or 15. The bigger value a is, the slower it is.

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      Yeah, I use that one more- I wish I put that in the video! Thanks for the tip! :D

  • @ZachoSchoolAccount
    @ZachoSchoolAccount ปีที่แล้ว +2

    I've always been using variables like Size speed and all that, and now I realise how much of a better way this is! Great information! :)

  • @SupTwoWater
    @SupTwoWater 2 ปีที่แล้ว +3

    I came back for this video like 10 times while making my projects EVERY TIME. Thanks for this video. I have to point out that your videos are really fast-paced with a lot of cuts and editing. I would recommend you to slow down your tutorial videos like Griffpatch.😁

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว +1

      That's awesome! Thanks for the advice. :D

    • @Lol-mr8hb
      @Lol-mr8hb 6 หลายเดือนก่อน

      why is no one replying to replies

  • @monicadees3612
    @monicadees3612 3 ปีที่แล้ว +4

    / 2 In the size one is *PERFECT* for a clicker game

  • @Siddoesart666
    @Siddoesart666 2 ปีที่แล้ว +1

    this made my game so much better looking!it helps

  • @harshadagorey
    @harshadagorey 3 ปีที่แล้ว +4

    Every scratcher should watch this

  • @DaCatOfPizza
    @DaCatOfPizza 3 ปีที่แล้ว +2

    This is awesome! also yes i am the person who made The Explorer: Tower Wars

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +2

      Cool! Thanks!

    • @DaCatOfPizza
      @DaCatOfPizza 3 ปีที่แล้ว

      @@ShiftClickLearn Fun fact: its my most viewed project ever so far

  • @TheHippyHoppyHippo
    @TheHippyHoppyHippo 2 ปีที่แล้ว +2

    The video is so well made and you have the best voice and microphone
    And the title and thumbnail also makes the video attract more viewers a lot more

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว +2

      Thank you so much! :D

    • @TheHippyHoppyHippo
      @TheHippyHoppyHippo 2 ปีที่แล้ว +1

      @@ShiftClickLearn You're welcome! And I must say that I am rather jealous

  • @taluladoesthehulainhawaii9012
    @taluladoesthehulainhawaii9012 3 ปีที่แล้ว +4

    Thank you so much! My games look a lot better now, also all of your other tutorials are really helpful so you got a sub from me

  • @althaboss3925
    @althaboss3925 3 ปีที่แล้ว +3

    can you teach raycasting algorithms

  • @noobrobloxdev9690
    @noobrobloxdev9690 2 ปีที่แล้ว +7

    has anyone counted how many times smooth was said in the video xD

  • @yaboys69
    @yaboys69 2 ปีที่แล้ว +2

    That was exacly what I was schearing to make my games on scratch

  • @InverseOfficial
    @InverseOfficial 2 ปีที่แล้ว +3

    1:25 divided by two is unnecessarily slow in this case. Always use x0.5 instead since multiplication only takes ~10 clock cycles to perform while division can take upwards of 100.

  • @harasen_haras5
    @harasen_haras5 2 ปีที่แล้ว +1

    I do this all of the time in my projects. Cool to see someone else having figured out the technique as well.

    • @harasen_haras5
      @harasen_haras5 2 ปีที่แล้ว +1

      If you flip the location of the object and the location of the spot it's moving towards inside the script, you can make it move with an accelerating speed. Sometimes it needs extra tweaks to work as it should. Really depends on its usage.

  • @luv_yellow
    @luv_yellow 2 ปีที่แล้ว +1

    OH MY SCRATCH YOU'RE A GENIUS!!! With this video you just made, I can up my level to creating Scratch games! Thanks SO VERY MUCH! You've earned a new subscriber!

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      You're very welcome! Glad this helped you out! :D

  • @gooberuploadsinc
    @gooberuploadsinc 2 ปีที่แล้ว +4

    I think the third one after time (about 9 billion years) would get jittery and eventually stop. Just speculation.

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว +1

      Yeah whenever it maxes out... have fun waiting for it to happen! :p

  • @armybrain
    @armybrain 2 ปีที่แล้ว +2

    Wow!!! That's so cool

  • @Collectors-Epic-Lounge
    @Collectors-Epic-Lounge ปีที่แล้ว +1

    Perfect! I needed to watch this video to polish off my Scratch Games; thank you so much!!

  • @Giolaboman
    @Giolaboman 2 ปีที่แล้ว +3

    this is gonna help a lot, thanks . o .

  • @errordetected8492
    @errordetected8492 2 ปีที่แล้ว +4

    I like how the sprite was called nerd cat XD

  • @comradepelusa
    @comradepelusa 2 ปีที่แล้ว +8

    yes. Super _S M O O T H_

  • @thetoaster1643
    @thetoaster1643 3 ปีที่แล้ว +2

    Thank you so much! I've been trying to improve my scratching ability recently and these videos have been life savers 😅

  • @danstevers
    @danstevers 2 ปีที่แล้ว +1

    the last one is soooooooo good for clickers i put that in my backpack and kept going🥇

  • @monkeycomet
    @monkeycomet 3 ปีที่แล้ว +2

    Awesome tutorial!I can see that your channel is slowly growing...

  • @nushanudle
    @nushanudle 2 ปีที่แล้ว +3

    "just makes me wanna hover over it so bad"

  • @Cake14797
    @Cake14797 3 ปีที่แล้ว +1

    A cool algorithm just for cleaning up stuff is: ( this is for movement scripts that uses the move block )
    Move X(your amount of steps) times X(your key) so it just makes it so that you can move while clicking a key and it also smooths up your code and saves assets

  • @JoshuaSpeedcubing
    @JoshuaSpeedcubing 2 ปีที่แล้ว +5

    hippity hoppity your code is now my property

  • @kos256
    @kos256 2 ปีที่แล้ว +4

    These are quite useful!

  • @CoolScratcher
    @CoolScratcher 3 ปีที่แล้ว +4

    You're like the family-friendly, new FUNUT. Great going :)

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +2

      Thank you! I'm glad someone noticed...I really want my channel to be a place where anyone can come to learn! :D

    • @amokaanimationz240
      @amokaanimationz240 3 ปีที่แล้ว

      Yea funut stopped uploading a lot so I’m glad he’s the funut 2.0

    • @highpheonixstudios1621
      @highpheonixstudios1621 3 ปีที่แล้ว

      @@ShiftClickLearn my parents say theres some bad stuff on funuts channel but since youre a kid m parents allow me to watch youre videos

    • @jeditz8
      @jeditz8 3 ปีที่แล้ว

      NOT REALLY

    • @jeditz8
      @jeditz8 3 ปีที่แล้ว

      @@highpheonixstudios1621 FUNUT JUST TALKS REALLY QUICK AND FAST

  • @anushthegreat6542
    @anushthegreat6542 2 ปีที่แล้ว +3

    This guy just really likes the word 'Smooooth!'. But anyway, nice tutorial, very helpful!

  • @QuantumScratcher
    @QuantumScratcher 2 ปีที่แล้ว +3

    The size one would be great for OS startups (with the logo appearing). Combine it with ghost and you get a great effect.

  • @tshark9158
    @tshark9158 ปีที่แล้ว +1

    For smooth movement you could also do
    Point towards (mouse pointer)
    Move (distance to mouse pointer / (any number)

  • @robinbyr976
    @robinbyr976 ปีที่แล้ว

    To the mouse pointer algorithms you can replace the go to x, y for a change x and a change y and remove the "+" operator !
    thanks for reading !

  • @RaNdOm3.1415
    @RaNdOm3.1415 2 ปีที่แล้ว +4

    You heard him, S M O O T H

  • @afantashoon6969
    @afantashoon6969 2 ปีที่แล้ว +1

    I basically use them in all my games now. It polishes up my projects by alot, especially the buttons.

  • @codingchicken7545
    @codingchicken7545 3 ปีที่แล้ว +3

    Thanks

  • @crowingcroster6398
    @crowingcroster6398 2 ปีที่แล้ว +3

    um, I really need help. The second part is where it follows your mouse. It's so glitchy. Why so?

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      Are you sure you copied it correctly? If you misplace one of the operators, the whole thing could break.

  • @MilkLord_1
    @MilkLord_1 3 ปีที่แล้ว +3

    Thanks I needed this

  • @charmz_s163
    @charmz_s163 3 ปีที่แล้ว +3

    can you do a tutorial about the sin blocks??

  • @Krys.s
    @Krys.s 2 ปีที่แล้ว +2

    Thanks i needed this vid

  • @aqeefdayout
    @aqeefdayout 3 ปีที่แล้ว +3

    Thanks for the tutorial it really helped me for my eating project

    • @aqeefdayout
      @aqeefdayout 3 ปีที่แล้ว +2

      and i sub u

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +2

      I hope it tasted good!
      ALSO THANKS FOR THE SUB!!!!!!!!! 😁😁😁

  • @22v220
    @22v220 ปีที่แล้ว +1

    thanks! just finished making my intro with this!

  • @RonicTheEgg
    @RonicTheEgg 2 ปีที่แล้ว +2

    This is very helpful for my games, thanks!

  • @myfertriedcoding
    @myfertriedcoding ปีที่แล้ว

    I'm already subscribed and this is why! thank you so much

  • @fyfhgvjh1_0935
    @fyfhgvjh1_0935 8 หลายเดือนก่อน

    The first one can also work like this: set size to (target size + size) / 2)
    However, the smaller the bigger the number is in the end, the smaller it gets, that's why 2 is the best choice

  • @wyattmaktrav
    @wyattmaktrav 2 ปีที่แล้ว +2

    Wow thank you so much i needed these kind of coding in my games!

  • @razkanaz
    @razkanaz 2 ปีที่แล้ว +3

    Thank you!

  • @randy054
    @randy054 ปีที่แล้ว

    This was so useful I am making a clicker game and I wanted a start menu and the 2nd one helped me polish it! TYSM!!

  • @TurtL689
    @TurtL689 3 หลายเดือนก่อน +1

    Bro this helped so much. Ty bro

  • @hainamlion
    @hainamlion 3 ปีที่แล้ว +2

    Oh I don't know about this! So helpful!!!

  • @blankpaper5093
    @blankpaper5093 2 ปีที่แล้ว +1

    Thanks for teaching me this, I will use this in my game called "Orange Man" to make the buttons more smooth

  • @cloverpopponytown
    @cloverpopponytown 2 ปีที่แล้ว +1

    I used the point in direction algorithm, but I made it Y and it still works.

  • @thescratchsavy1587
    @thescratchsavy1587 3 ปีที่แล้ว +3

    Nice!

  • @DavidGreatMod
    @DavidGreatMod 2 ปีที่แล้ว +4

    Only the size Algorithm worked the next one glitched and the thir'd one i did not worked

  • @kimeei44
    @kimeei44 2 ปีที่แล้ว +2

    omg thx! this help make me my game!

  • @anujagupta6640
    @anujagupta6640 3 ปีที่แล้ว +2

    Man Please share the tower defense game it has been 6 days what is the Problem!!

  • @itsactuallymarcus
    @itsactuallymarcus 3 ปีที่แล้ว +3

    I love your vids!

  • @Littlzzzxxd
    @Littlzzzxxd 2 ปีที่แล้ว +1

    Wow! These scripts help so much :D

  • @3e33yipchingshunyip7
    @3e33yipchingshunyip7 2 ปีที่แล้ว +1

    Thank you! (I am gonna to do my scratch homework w/ these tips lol) :)

  • @breadguyy
    @breadguyy 2 ปีที่แล้ว +2

    Bro the first one is so good

  • @MandraMockups
    @MandraMockups 2 ปีที่แล้ว +1

    Heres a tip for OS developers!
    the 1st one can be used for transitions replacing change size by move x to, i think

  • @jefferrr7376
    @jefferrr7376 3 ปีที่แล้ว +10

    make an enemy in scrolling platformer :D

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +1

      Good idea!

    • @andrew.mp4311
      @andrew.mp4311 3 ปีที่แล้ว

      Step 1: draw enemy
      Step 2: add enemy collision with the world
      Step 3: draw a range where the enemy can see
      (Draw a line from the enemy to the player and make it check if the line from the enemy to the player is touching the world so that the enemy can’t see through the world)
      Step 4: make the enemy attack (shoot at the player or lunge at the player or etc) when the player enters its sight

  • @EquaTechnologies
    @EquaTechnologies 2 ปีที่แล้ว +2

    Thank you! This will help me make my game better! 😀

  • @apo11ocat
    @apo11ocat 2 ปีที่แล้ว +1

    i really needed the middle algorithm! thanks alot

  • @Lol-mr8hb
    @Lol-mr8hb 6 หลายเดือนก่อน

    This video really helped!! TYSM !😊

  • @greengreenanimations
    @greengreenanimations 2 ปีที่แล้ว +1

    Ive learned something from this video that if you put ( set size to (0%) ) or ( point in direction (0) ) on the start of the first algorithm you will see a cool start effect!

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      Yes!!! I use that effect all the time- it will smoothly turn/ change its size back to what you put in! :D

    • @greengreenanimations
      @greengreenanimations 2 ปีที่แล้ว

      @@ShiftClickLearn i just got It randomly putting 0% in the size number and yeah that's real (i used that effect to my new clicker too)

  • @stevekong1448
    @stevekong1448 3 ปีที่แล้ว +2

    thanks alot!

  • @goobertnelius
    @goobertnelius 2 ปีที่แล้ว +1

    Used to think this isn't needed but I just realised that I need it

  • @Awesomebricks1
    @Awesomebricks1 3 ปีที่แล้ว +3

    How did you get so much views so fast?

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +2

      People watched it fast I guess! xD

  • @rapper_mario
    @rapper_mario 5 หลายเดือนก่อน

    for the second one you could do a simpler script by doing
    when flag clicked
    forever
    point towards mouse-pointer
    move ((distance to mouse pointer /10)) steps

  • @Yeti_Bs
    @Yeti_Bs 3 ปีที่แล้ว +2

    Can you make a chose your own story game like check out Scratch Season one Story Mode?

  • @hermanzainal2782
    @hermanzainal2782 2 ปีที่แล้ว +2

    i used these codes and it really helps my project :D

  • @angelx9124
    @angelx9124 2 ปีที่แล้ว +2

    algorithm 2 could be excused for
    when green flag clicked,
    set rotation style to dont rotate
    |forever|
    | point to mouse
    | move ( ( distance to mouse pointer ) / speed you want )

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      That is a good way to do it as well! :D

  • @cathymyers8286
    @cathymyers8286 ปีที่แล้ว

    I created a clicker game with the scripts all because of you :)

  • @minecrafterisaac0746
    @minecrafterisaac0746 2 ปีที่แล้ว +3

    I keep on coming back it helps so much! Thanks!
    smOOOOoooOOoootH

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      You're welcome, I'm glad it helped!
      Also yes, smoOOOOOOOOOOOOOOth

    • @minecrafterisaac0746
      @minecrafterisaac0746 2 ปีที่แล้ว

      @@ShiftClickLearn yessir

  • @mmmaaarrriiiooo3rd
    @mmmaaarrriiiooo3rd ปีที่แล้ว

    "look at how SMOOTH it is"
    "its SMOOTH"
    "see how its slow and SMOOOTH"

  • @flyh1ghgd182
    @flyh1ghgd182 ปีที่แล้ว

    some algorithms TO try by yourself.
    100 - size / speed,
    go to x: xPos + MouseX - xPos / speed y: yPos + MouseY - yPos / speed,
    point in direction: sin(speed) * 12 + direction
    go to x: xPos + sin(timeVar) * speed * value, yPos + sin(timeVar) * speed * value
    point in direction: direction + sin(timeVar) * speed * value
    change XV by: keyPressed - keyPressed * value, SMOOTHING: set XV to (xv * value(higher the value the more faster and more less friction))
    set X to: X + sin(direction) * value
    set Y to: Y + cos(direction) * value ,SMOOTHING: set (x, y) to ((x, y) * value(higher the value the more faster and more less friction))

  • @apersonthatexistssadly5208
    @apersonthatexistssadly5208 2 ปีที่แล้ว +3

    drinking game: have a shot everytime he says sMooOOotH

    • @ShiftClickLearn
      @ShiftClickLearn  2 ปีที่แล้ว

      LOL well that sounds dangerous. I said smooth at least 942,421,176 times sooooooo.... go figure. XD

  • @Blue_Pumpkin_
    @Blue_Pumpkin_ ปีที่แล้ว

    for the second algorithm, you could instead do point towards mouse pointer, and then move (distance/5) steps.

  • @lowfidelity8074
    @lowfidelity8074 ปีที่แล้ว

    i tried making the spinny key
    and i went learning animation to animate it and realize you can doi it this way
    great tutorial lol

  • @tinkerbellcookie5707
    @tinkerbellcookie5707 3 ปีที่แล้ว +3

    “Look how *smmmmoooth* that is”

  • @Wallee580
    @Wallee580 2 ปีที่แล้ว +3

    thanks, i know i am going to use these because i have already made scripts that essentially do the same thing but worse ; )

  • @Md_9000
    @Md_9000 ปีที่แล้ว

    Very useful video I will definitely come back to it

  • @ckqk
    @ckqk 3 ปีที่แล้ว +1

    Here's another one, it is another way of making the sprite follow your mouse smoothly.
    [forever]
    [point towards (mouse pointer)]
    (if then)
    [move (distance to (mouse pointer) / #) steps]

    • @ckqk
      @ckqk 3 ปีที่แล้ว +1

      The # can be any number, I recommend 5.

    • @ShiftClickLearn
      @ShiftClickLearn  3 ปีที่แล้ว +2

      Wow! Thanks for the tip!

  • @shadface3292
    @shadface3292 2 ปีที่แล้ว +2

    Thank u: Much enjey from nice algorithms soooo smooth now my clicker game is better!

  • @sdfgvhjnkmljhngfds
    @sdfgvhjnkmljhngfds 2 ปีที่แล้ว +3

    Amazing

  • @ColdBlaze_lol
    @ColdBlaze_lol 2 ปีที่แล้ว +2

    Thank you! Now I can make a god title screen with the first or last one

  • @SIG7Pro
    @SIG7Pro 2 ปีที่แล้ว +1

    I like this, I may need to backpack these one day!

  • @not_dfskjske
    @not_dfskjske 2 ปีที่แล้ว +2

    3:15 I just learned that yesterday

  • @krankcuber
    @krankcuber 2 ปีที่แล้ว +2

    thanks for your help