Scratch Algorithms You HAVE To Know!
VloĆŸit
- Äas pĆidĂĄn 8. 07. 2024
- In this Scratch Tutorial, I show some very useful algorithms that you need to be using (if you aren't already).
đŹ POINT TOWARDS COORD FORUM: scratch.mit.edu/discuss/topic...
đ LINKS: All Videos In This Series: âą Scratch Tile Scrolling...
Scratch Profile Page: scratch.mit.edu/users/ShiftCl...
Night Ninja Scrolling Platformer: âą Scratch | Scrolling Pl...
Cat Clicker tutorial: âą Scratch | Cat Clicker ...
Tower Defense tutorial: âą Scratch | Making a Tow...
How-to tutorials: âą Scratch | How-To Tutor...
Get Scratch Addons: scratchaddons.com/
đ§ŸCHAPTERS:
00:00 - A SmOoOTh Intro ._.
00:14 - 1. Smoothing Algorithm
01:36 - 2. Point Towards Coord Algorithm
03:25 - 3. Move Steps Algorithm
05:07 - 4. Off Screen Detection Algorithm
06:31 - Outro
â DISCLAIMER:
This video is family-friendly! Hostile and/or rude comments will not be tolerated!
nobody:
owen: makes a literal scrolling engine in the middle of his tutorial
If I had a penny for every time I said "thing" and "smooth" in this video, I'd have like a dollar or something. đ
YO FIRST TO REPLY YES
second :D
I'd have like a -1 dollar or something*
NO!! đđđđđđđđđđđđđđđđżđżđżđżđżđżđżđżđżđżđżđżđżđżđżđżđżđżđżđż
đż
revolutionary stuff
Using your technique of ""move () steps" but with extra steps", I was able to create bullets that move offscreen and can travel in any direction.
And, sprinkling in a bit of my own code, I managed to make it so that they would disappear upon getting far enough away from the player.
Thank you.
You're welcome, that's so cool! :D
I have a way to use movement
If then
point towards mouse pointer
move (distance to mouse pointer / 15)
end
change the number to be whatever smoothness you'd like.
Nice!
@@HowtoDoStuffwithEthan bred
Aah sorry I disliked by accident :( I re-liked tho :)
@@yorp. :)
I favourite part of the Episode is at 6:44
hehe ;p
@@ShiftClickLearn I have video idea for you top 10 best Survival Disasters Games
@@ShiftClickLearn B R E A D
MY GUY YOU JUST SAVED MY LIFE WITH THAT POINT TOWARDS THING THANK YOU
This point towards X Y is a DAMN LIFE SAVER!!! I DIDNT KNOW THIS WAS EVEN POSSIBLE!!! TYSM
With hide/show for scrolling games easier way exist:if x position = x or y position =y show,else hide.
I've found that it will break sometimes. a variable could be 15.1124 while the position is only 15.1. If you round it, they're both 15. :D
Awesome video! I'll have to keep this in mind and watch it later. I like your thumbnails :D
Thanks!
Great video! This will definitely help with my games.
Thanks, glad it helped! :D
This will help in many of my games, Thank You shifty!
No problem. :)
This inspired me to make a customizable puzzle game in Python. And it's text-based too.
Wow, the second costum Block is so usefull for tower defense games!
Instead of using the multiply block you can use the divide block. Makes it easier to find a good speed.
just what I needed. thanks
No problem! :D
ShiftClickLearn thanks for super great videos
You are very welcome, thanks!
6:26 in my project(if i do scrolling platformer) i will do if not your offscreen algorythm set scroll x to x and scroll y to y
bro i just watched ur video which was from 1 year ago and i clicked on this video but bro ur voice just switched LIKE BOOMM
Really helpful!
Glad it was helpful!
Sick as heck bro đČ
Anyone noticed the bread cat?
Pretty cool I really find these tutorials use full while I am programming can you make videos on other programs if you know any other or if you want.
I'm glad you find them helpful. :D
Agreed
czcams.com/video/xcjZK9aY3mE/video.html
May I ask that you review this even if it takes a year I know you have a lot of viewers
Hello ShiftClickLearn
To say your tutorials have helped me in creating my games is a grouse understatement (there almost line for line just your tutorials). And I was wondering if you would have any idea for an algorithm relating to cloned npc's shooting cloned projectiles? This is something i've been struggling with for a while and would love to hear if you have any ideas on how to go about this.
He's on a break
so the pointing algorithm doesnt work anymore it only works if the y < y pos is true bc it doesn't let 180 / 0 it just says infinity
A very helpful video!
Glad it was helpful!
Wow, these are sooo Cool!
Thank you so much! :D
@@ShiftClickLearn :D
very useful
Glad to hear that. :)
WE NEED MORE
Hey can you help me, Im making a game with a clone enemies in it, And I tried searching how to make clones have hitbox and nothing worked. Can you help me?
Here's a simple way to make a hitbox:
Switch costume to the hitbox costume (Just a square that covers the player costume)
If (touching whatever) {
do whatever
}
Switch back to the player costume.
Hope this helps. :D
yo thank you for this video :)
No problem!
is there a way to make the move steps algorithm to work with cloned enemies chasing the player? I tried this and it didnt work
i very like the bread cat
The fact that he used the scratch cat with a loaf of bread oh he's headđ
this is soooooooooooooooooo usefull
for the pointing to a coordinate part, can you make it so that it will turn at a FIXED rate in the most efficient direction to the coordinate because I am making a game that will require the turning to make it less unbalanced
That would be a good block to add...
@@ShiftClickLearn do you have any way to make it happen
Could you maybe make a video on how to do particle effects? Because that would be cool lol :DD
Yoo good idea!
czcams.com/video/xcjZK9aY3mE/video.html
6:44 B R E A D
b r e a d
amazin!
Thank ya! :)
do you think it is also possible to change a specific number/letter in a variable to a value without modifying the other symbols?
I'm making a save function, and am using this.
I would think it's possible... I bet you'd need to loop through each character and use a "letter i of variable". You'd also need a bunch of join blocks if I had to guess.
list will be your friend with that. put all of the characters of the value inside a list using a repeat block then modify the specific thing you want then rejoin them all again using also a repeat block. are you familiar with using lists?
@@instinctdiff7765 you don't have to join them again with the repeat block, you can also do: set ["variable" v] to ("list" v), delete all of ["list" v]
woah best algorithims
Thanks!!
@@ShiftClickLearn no problem but your tuts are amazzzzzzzzzzzzzzinggggggggggggggggggggg (T R U E)
Smooooth... man
yeah... smooooooooooooth
Yes
yes
Cool
Thank you!
Can someone who understands maths pls explain why the sin of direction and cos of direction work as an replacement of move 10 steps. As far as I knew the sin of an angle is opposite/hypotonuse how does that number times steps give us a perfectly working move 10 steps replacement
Can see your full tile scrolling game in scartch
I'll share it once the series is over.
5th I think, edit: also I started watching when it was 36 seconds ago
Awesome!!
Can you make a tutorial on how to make a Nextbot in Scratch?
Idk what that is.
We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
We've known each other for so long
Your heart's been aching, but
You're too shy to say it
Inside, we both know what's been going on
We know the game and we're gonna play it
And if you ask me how I'm feeling
Don't tell me you're too blind to see
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
(Ooh, give you up)
(Ooh, give you up)
Never gonna give, never gonna give
(Give you up)
Never gonna give, never gonna give
(Give you up)
We've known each other for so long
Your heart's been aching, but
You're too shy to say it
Inside, we both know what's been going on
We know the game and we're gonna play it
I just wanna tell you how I'm feeling
Gotta make you understand
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you
đ”
Get rickrolled in the most clever way
@@ShiftClickLearn pin this please
@@dracokinerek omg so clever just copy and pasting the lyrics omg you got them omg so smart wow
@@pndaMobby I know the real song
Cool, but how to I make it smooth from the starting position at the same time?
What do you mean?
@@ShiftClickLearn like, if you do ((Target Value) - Value) * .5) then it makes it smooth, but how to I do the opposite at the same time?
The only thing i'm focused to is the *bread* cat
b r e a d
b r e a d
why tho
Smootherness +4
oh yeah
BREAD CAT
mmm yez a remake of your algroithms from like uhhhhh idk how long it was existing
Š>
or i can call it that
never knew Š> was an emoji
???
@@ShiftClickLearn ok
atan is short for arctan is short for arc tangent
Oh wow, thanks! :D
chapter 1 A SmoOtH IntrO ._. lool
Could you maybe do some helpful code tips for making a rouge-like game like binding of isacc? Iâve been making art and music for a game yet the coding is where I get stumped. It would be so helpful.
I've never played binding of isacc and I haven't ever made a roguelike so I don't know If I have any tips! If I ever make one that's a great idea! :D
quality content đ
Thanks!
Your point to xy has a bug. If the y is the same it bugs out
Huh, I'll have to check that out.
It dosen't. That is how it works. Like if you think about it. If you and apple are at the same position and you want to point towards the apple you could litreally point anywhere you want, since it is at same position (it is clipping thro your body)
@@Lukex305 I said if y is the same. Not x
I can see the confusion as I never said that x should be different
cool
Thanks.
*B R E A D C A T*
My feeble human brain still can't understand these algorithms, despite the fact that I've been working with Scratch for over 2 years.
It's arc tan
Bread
bread
They turn into custom Blocks
?
How old are you bro
Tysm for the video
I'm 108, you're welcome. :D
Your voice is way too sharp for 108 year old dead body
Again yaya
haha french cat
lol
baguette cat
đ„đ
the why he got bread on the head
bc he likes bread
Taco Cat
it's bread xD
First? I guess second
lol
B R E A D
B R E A D
bread cat
đ
Can you (try) make a horror game or you can't
Pls don't mind
I've never really played any horror games xD
I thought the Dani trick would work
Oh ok
f r e n c h b r e a d
đ
@@ShiftClickLearn i like bread,specially toasts
bread cat đ
bread cat đ
bread
đđđ
Dope vidoe but i dont use Scratch đ
lol
noise
text
Easing
like smOOthing?
@@ShiftClickLearn smoothing out the beginning and ending of the M O V E M E N T yes (sorry for getting mad at my autocorrect)
Why does the voice change every vid
i was the 1,000 liked video!
atan = arctangent
Cool
Take the ln of Atan^s (x) and raise to e
S atan(x)
@@dracokinerek ?
bread cat đ
bread cat đ
@@ShiftClickLearn bread cat đ indeed
Hey man, I've been watching your videos lately, and your the BEST CZcamsr I have EVER watched. If you can, Could I please get a shoutout? Thanks for everything ShiftClickLearn. I subscribed aswell. Also, could you please make a shine effect video? Thanks.
Wow, thank you so much for commenting/ subbing. You're very welcome- that's a good idea. :D
Why did your Brother stop uploading?
And you may know someone who usually comments on your vids called Cyan.
25th liek : - )
s.o...c.o.o.l
a
b
@@ShiftClickLearn c
h m m
h m mm mm
Accidentally disliked but I liked it again
lol
â@@ShiftClickLearn also uhhhhhhhhhhhhhhhhhhhhhh, among us
BREAD
-SCL 2022
B R E A D C A T
đđ„đ„Ș
bread cat
bread
bread
@@ShiftClickLearn bread
@@anasoares6476 bread
@@qyralkent9918 bread
@nge nge bread