HOW TO CREATE A PHYSICS ENGINE IN SCRATCH!!!
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
This is literally the exact physics engine i was searching for
also dont use the ground as a backdrop use it as a sprite
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
What other physics engine would you be looking for?
@@leomartin7409he could’ve been looking for one that uses balls
me to
amazing tutorial! under 30 minutes and works almost to perfection
this is giving me a lot of new ideas, tysm for uploading
just a little bit janky, but still impressive compared with scratch's standards
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
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.
bruh ☠️
I need to completely replace my variables now...
@@Unplugged7 Just use plugins, it's not that hard.
@@MagnetizedBread he cant he's unplugged
thank god i have addons
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
now show us how to make angry birds with these physics for the buildings
Ooooooooo that would be super cool!
make it yourself lmao
I was thinking about this
@@person___9rude
I made it
For literally no reason, I can't throw the cube in the X direction. Can anyone help me?
I have no idea why this is happening for you I am sorry for you😢
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
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.
For some reason everything works, but the cubes wont turn when on slopes or edges. Help
they keep being throwen to the corner and when i catch it it literally goes to my cursor untill i end it
what have you done to the collisons
can someone please tell me, I kind of wrote everything correctly, but my cube always slides to the left?
Deku im on turbowarp please help me for the clone moving right
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
Set the hold variable to all sprites
for some reason it teleports away and keeps reset please help me with this i spent my day on this project
i cannot drag the box, do you have a solution to solve it?
Thank you so much for this video. You helped me a lot 😀
THANK YOU SO MUCH THIS IS AMAZING!
Every time I try throwing my block It just teleports strait to the floor. Can anyone please help with this??
For some reason when the block touches the ground it teleports back to the top
I followed your tutorial and the blocks keep going into the ground.
Does anybody know how to fix this?
when I right click on it it doesn't say swap
it can only go up for me i cant find where i messed up.
I can't pick up the blocks though I went through the code
When I start the project my cubes are spinning so clockwise very fast help
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
Give me the link for this scratch project
dude you earned a sub
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.
mine too
make functions run without screen refresh
one thing why can't you change the square into a ball?
0:00 to 0:01 yo his voice changed so much in 1 sec
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
Can you help me please the box’s just keep rolling
i built off yours and made an even better one! thank you for this and helping me
I have a problem because my blocks are sooo slow slower than a snail
Every time I pick up the cube it glides to the wall and grows out of the ground like a tree
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
me too
my blocks have a spasm attack when i hold them :(
for some reason, when i grab the cube, it goes all over the place
the blocks arent colliding with each other for me
My blocks get pushed to the edge of the map and I cant grab them.
cool love ur vids
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!
WHERE DO WE MAKE USE OF “TURN” BLOCK?!
very good not gonna lie this is perfect for games that has physics👍👍👍👍👍👍👍👍👍👍
Hey, my cubes won't turn, why is that?
you are the first who made cube physics tutorial!
no funut did he just stole funut's code
no
yeah he is gigachad
bro use glacial epoch then ice bird then ice spears then ice surge its a rlly good combo for first sea
my boxes land for half a second, start spinning then flal through the platform
Wow I love your Videos
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
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
@@AnnoyedBowlOfSpaghetti its been a while since I've touched the project lol but when I do again, ill try it out, thanks!
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
same issue for me
Same for me. Anyone has a fix?
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
if the clone block was plugged into a "recieve brodcast" block, it would create clones for the ammount of clones + the original sprite.
My dude hit puberty at the start from the intro
hippity hoppity your code is now my property
objects cant bounce and cant be stacked on eatchother becouse the tower is too wobbly, not so physics
This is the best tutorial I had in my life
sanec
My cubes kept getting pulled to the side
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?
dont convert 'gotHold' and 'hold?'.
same here
I Found Putting the Set Hold? to 0 in the clone's forever loop
Now this is an opportunity to make a 2d ragdoll sandbox game
I don't think you mentioned to put the TURN block..... :)
my block spins around clockwise can sombody help
wow, just 20 minutes and you get what I would do in 20 hours
U mean never.
@@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
This?! in 20 hours!? I can make this in 20 years!!
@@hasanmohammed3690 yeah your gonna meet death in 20 years
I don't know why but my sprits just keeps falling through the backdrop
the cubes be like magnetic to the edges
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
did you get dragging mode
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)
It actually matters when the hold? is for this sprite only, it should be on for all sprites!!
nope
very false
e
24:29 "The most famouse sentence in 1960s"
19:55 I just got the addon that lets you convert variables to "for this sprite only." It's very handy.
I have too
you just got a new sub
legend thank you so much
Bro I had to watch the whole thing again because he did not tell me the variables were for this sprite only
idk why but for me it don't work properly
I can’t throw mine and they randomly tp to the floor
@marielaoviedo8789ohhhhh
I want project link
my cubes keep going to the right
Don’t you need more objects?
uhm, my cube wont turn?
i think this channle deserves a 10/10 (day 5 of reviewing youtube channles)
@Croc i was
help my square doesnt fall of the edge
Mine doesn’t work
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
38th viewer i really wanted to hear your tutorial i never used physics engine on scratch before?
I have a glitch where whenever I have the turn block in the physics all my blocks move to the right.
Same
I think you have slope for all sprites instead of for this sprite only
@@saturncool5140 it's for this sprite only
Happy new years day!
Rename this to how to break your computer
9:45 thank god you noticed that
You could just change it into for this sprite only in scratch addons!
Is there any way to reduce the lag?
Try using Turbowarp
i wanted to make a physics engine sandbox thx
I made them go sideways and I can’t figure out why😭
Thank you
Mine can't tumble around :(
I thought it was a kid at the start😂
Please make a part 2
my cubes just go down REALLY SLOWLY!!!
how to fix?
Idk make the numbers bigger
The fnaf video helped me so much with coding
its not detecting
very will