Discuss Scratch

Shadow_Greninja
Scratcher
26 posts

Adding Physics

Griffpatch made a physics engine for Scratch, and I love it. It would be incredible if this was added to the actual Scratch. I mean, just think of all the possibilities it would add. We could make a realistic Angry Birds game with this, and adding physics to our projects would be much simpler

I think physics blocks should be one of the ‘extras’ like translation, pen, music, etc. I love the idea of being able to program physics on Scratch in a much more simpler way! Making Angry Birds is probably my favorite thing you could make with this.

If you want to check out griffpatch's physics extension, go to this link:
https://griffpatch.github.io/scratch-gui/

and be sure to watch this video to figure out how it works:
https://www.youtube.com/watch?v=WzFhOlY7Ul8

More suggestions may be added to this thread.


I don't what to put here so, hi.
cs1866244
Scratcher
11 posts

Adding Physics

I can't add the extension. It just dosesn't show it.
epicRedHot
Scratcher
500+ posts

Adding Physics

cs1866244 wrote:

I can't add the extension. It just dosesn't show it.
That is because it has not been released yet.

I occasionally do things.
Caleb_Capron
Scratcher
21 posts

Adding Physics

dude341 wrote:

The ST already have a prototype of griffpatch's physics engine with Scratch 3 in the works I believe, so this is accepted!
say [Where did you find this information?]

say [Also, I feel like this would be something, like the idea of a previous block, that is not in scratch because it's something you're supposed to find out how to make.]

Last edited by Caleb_Capron (Dec. 9, 2019 21:17:03)


Generation 381: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.


Hi there!
Caleb_Capron
Scratcher
21 posts

Adding Physics

It says find out your self. It was cut out.

Generation 381: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.


Hi there!
Starstriker3000
Scratcher
1000+ posts

Adding Physics

Caleb_Capron wrote:

say [Where did you find this information?]

say [Also, I feel like this would be something, like the idea of a previous block, that is not in scratch because it's something you're supposed to find out how to make.]
What you're doing is called blockspam, and is a type of spam.

Last edited by Starstriker3000 (Dec. 10, 2019 00:09:23)

EZ-Games
Scratcher
1000+ posts

Adding Physics

Starstriker3000 wrote:

Caleb_Capron wrote:

say [Where did you find this information?]

say [Also, I feel like this would be something, like the idea of a previous block, that is not in scratch because it's something you're supposed to find out how to make.]
What you're doing is called blockspam, and is a type of spam.
I remember seeing a topic made a while ago mentioning that this was actually tolerated if it included information contributing to the conversation, although I could be wrong.


God did not send his Son into the world to condemn the world, but to save the world through him.
John 3:17

Advice:
Saying “Support” or “No Support” doesn't contribute anything to the conversation.
A question that has already been answered doesn't need to be answered twice with the same answer - bring something new to the table.
DerpyHead0
Scratcher
1000+ posts

Adding Physics

EZ-Games wrote:

I remember seeing a topic made a while ago mentioning that this was actually tolerated if it included information contributing to the conversation, although I could be wrong.
never heard that, and i'm pretty sure that means using the blocks as they'r intended to be used.
this post should be text, not blocks

when I start as a clone
delete this clone
DerpyHead0
Scratcher
1000+ posts

Adding Physics

scratch doesn't add prebuilt things because it takes away from learning. scratch is made as a way for kids to learn, not to just pump out games at high speed. if someone wants to use the engine, they can just use the actual engine.

not to mention the insane amount of blocks needed to get “physics” to do what you want. this could be different for side view, top down, and sometimes you want things like slopes to work in certain ways, sometimes you want bouncy surfaces, the amount of interactions is pretty much infinite, and can't just be made as a prebuilt thing.

when I start as a clone
delete this clone
EZ-Games
Scratcher
1000+ posts

Adding Physics

DerpyHead0 wrote:

EZ-Games wrote:

I remember seeing a topic made a while ago mentioning that this was actually tolerated if it included information contributing to the conversation, although I could be wrong.
never heard that, and i'm pretty sure that means using the blocks as they'r intended to be used.
this post should be text, not blocks
Blocks should be used for helping Scratchers with scripts and possibly other things, although, from what I remember from a topic I saw a while ago, using blocks that hold information that contributes to the conversation is tolerated. But like I said before, I could be wrong.


God did not send his Son into the world to condemn the world, but to save the world through him.
John 3:17

Advice:
Saying “Support” or “No Support” doesn't contribute anything to the conversation.
A question that has already been answered doesn't need to be answered twice with the same answer - bring something new to the table.
ResExsention
New to Scratch
1000+ posts

Adding Physics

DerpyHead0 wrote:

not to mention the insane amount of blocks needed to get “physics” to do what you want. this could be different for side view, top down, and sometimes you want things like slopes to work in certain ways, sometimes you want bouncy surfaces, the amount of interactions is pretty much infinite, and can't just be made as a prebuilt thing.

Funny how it worked with other game engines, then. Unity has a prebuilt physics engine, and it certainly managed to solve this issue. Unreal, CryEngine, tons more.

Also, there are some people who don't want to get into the technicalities of making physics-based games and just want to start making something awesome.

Infrequently active.

It feels weird to see how far we've come. I hope you're well, wherever you are!
DerpyHead0
Scratcher
1000+ posts

Adding Physics

ResExsention wrote:

Funny how it worked with other game engines, then. Unity has a prebuilt physics engine, and it certainly managed to solve this issue. Unreal, CryEngine, tons more.
Also, there are some people who don't want to get into the technicalities of making physics-based games and just want to start making something awesome.

the key thing is that there's no block list, everything is typed.
when you TYPE commands, you don't have to go searching for a specific block, and you can easily have 200 commands and stacked commands and all of that stuff.

also, if someone couldn't make or use (from another project) a physics engine, they probably would have even more trouble understanding all the options that would be necessary in the supposed inbuilt physics engine. you would HAVE to go into a bunch of technicalities because if the options weren't there, most projects wouldn't even be able to use the physics because it doesn't do what they need it to.

when I start as a clone
delete this clone
ResExsention
New to Scratch
1000+ posts

Adding Physics

DerpyHead0 wrote:

the key thing is that there's no block list, everything is typed.
when you TYPE commands, you don't have to go searching for a specific block, and you can easily have 200 commands and stacked commands and all of that stuff.

also, if someone couldn't make or use (from another project) a physics engine, they probably would have even more trouble understanding all the options that would be necessary in the supposed inbuilt physics engine. you would HAVE to go into a bunch of technicalities because if the options weren't there, most projects wouldn't even be able to use the physics because it doesn't do what they need it to.


I think having a built in engine would be good though.

In its simplest form, all that would be shown to the user would be stuff like:

set [gravity v] to [1] :: #7585ff
set [gravity v] to [-1] :: #7585dd // they would start floating up
and other similar stuff :: grey

It isn't as complicated as you think, especially for those new to programming. Of course, we could optionally have some more in depth blocks and options, but as always there would be a simpler interface.

I have a question for you. Why does this block exist:

([abs v] of (9))

It's too complicated for younger people especially, and yet it exists. I don't think we should start negative supporting all sorts of great suggestions just because they're too complicated.

Infrequently active.

It feels weird to see how far we've come. I hope you're well, wherever you are!
45afc4td
Scratcher
100+ posts

Adding Physics

No support. It's way too specific and high level for a programming language that is supposed to have a variety of projects in it. It's better to do physics (including collision detection) in the low level.
DerpyHead0
Scratcher
1000+ posts

Adding Physics

ResExsention wrote:

In its simplest form, all that would be shown to the user would be stuff like:
set [gravity v] to [1] :: #7585ff
set [gravity v] to [-1] :: #7585dd // they would start floating up
and other similar stuff :: grey
It isn't as complicated as you think, especially for those new to programming. Of course, we could optionally have some more in depth blocks and options, but as always there would be a simpler interface.
what happens when you want gravity to go left? That's a new block.
what happens when you want a bouncy surface? that's a new block.
what if someone wants the player to move with a platform they're on, but another person doesn't (like a balancing game?) that's a new block.
what happens when you want sticky ground? that's new blocks.
what happens when you want magnets? that's a ton of new blocks.
what happens when you want one player to collide with one thing, but another player to collide with a different thing? that's a bunch of new blocks and possibly a sprite rework.
what happens when you want to directly mess with momentum and other calculations? that's a new block for literally everything.
what happens when you want to change how slopes work based on how steep they are? that's a massive mess that i don't know how to deal with.

this idea will either make people want more, or just be a massive pain to use. and even then, you will still probably have to deal with some physics manually.

ResExsention wrote:

I don't think we should start negative supporting all sorts of great suggestions just because they're too complicated.
you aren't getting my point. my point is that anyone that wouldn't have the skill to quickly grab and use a platformer engine would have even more problems using any inbuilt system that could be made.

ResExsention wrote:

I have a question for you. Why does this block exist:
([abs v] of (9))
It's too complicated for younger people especially, and yet it exists.
it makes negative numbers positive numbers.

that isn't complicated in any sense, sin would've been a better example.

and even still, this isn't my point. these things are needed and useful for some complicated projects, but an inbuilt platformer idea would be too complicated for new users, and not good enough or not useful for experienced users.

when I start as a clone
delete this clone
Caleb_Capron
Scratcher
21 posts

Adding Physics

Starstriker3000 wrote:

Caleb_Capron wrote:

say [Where did you find this information?]

say [Also, I feel like this would be something, like the idea of a previous block, that is not in scratch because it's something you're supposed to find out how to make.]
What you're doing is called blockspam, and is a type of spam.
Sorry. Haven't used forums much and I didn't know

Generation 381: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.


Hi there!
M1mikyu
Scratcher
1000+ posts

Adding Physics

Didn’t anyone here see the post saying that it was already semi-accepted??

Behold, Luna's Mimikyu army!! It got killed for a moment by an evil Lord Dome, but Lord Helix brought them back!!

--Explosion--
Scratcher
1000+ posts

Adding Physics

Sorry to (sort of) necropost, but can an ST member please tell me if this will actually be added, now that scratch 3.0 is out?

Last edited by kaj (Tomorrow 00:00:00)
✰✩✭✴★--Explosion--★✴✭✩✰
Forum helper | boy | platformers | 14yrs | guitar | website


ResExsention
New to Scratch
1000+ posts

Adding Physics

DerpyHead0 wrote:

ResExsention wrote:

In its simplest form, all that would be shown to the user would be stuff like:
set [gravity v] to [1] :: #7585ff
set [gravity v] to [-1] :: #7585dd // they would start floating up
and other similar stuff :: grey
It isn't as complicated as you think, especially for those new to programming. Of course, we could optionally have some more in depth blocks and options, but as always there would be a simpler interface.
what happens when you want gravity to go left? That's a new block.
what happens when you want a bouncy surface? that's a new block.
what if someone wants the player to move with a platform they're on, but another person doesn't (like a balancing game?) that's a new block.
what happens when you want sticky ground? that's new blocks.
what happens when you want magnets? that's a ton of new blocks.
what happens when you want one player to collide with one thing, but another player to collide with a different thing? that's a bunch of new blocks and possibly a sprite rework.
what happens when you want to directly mess with momentum and other calculations? that's a new block for literally everything.
what happens when you want to change how slopes work based on how steep they are? that's a massive mess that i don't know how to deal with.

this idea will either make people want more, or just be a massive pain to use. and even then, you will still probably have to deal with some physics manually.

what happens when you want gravity to go left? That's a new block.

Gravity block rework:

set [gravity v] to [1] direction [right v] :: #7585ff

what happens when you want a bouncy surface? that's a new block.

forever
if <touching [bouncy surface v] ?> then
set y velocity to [3] :: #7585ff // would be affected by gravity
end
end

what happens when you want sticky ground? that's new blocks.

forever
if <touching [sticky ground v] ?> then
set [gravity v] to [100000] direction [down v] :: #7585ff // the character wouldn't be able to jump due to gravity overwhelming it
else
set [gravity v] to [1] direction [down v] :: #7585ff
end
end

what happens when you want magnets? that's a ton of new blocks.

forever
if <(distance to [magnet v]) < [50]> then
set [gravity v] to [1] direction [magnet v] :: #7585ff // I don't really know the specifics, but it would basically get pulled to the magnet.
... // We could also do a bit of math to make gravity increase as it gets closer
end
end


what happens when you want to directly mess with momentum and other calculations? that's a new block for literally everything.

The same way

([ v] of (9) :: operators

has quite a multitude of dropdown options, we could do the same.

what happens when you want to change how slopes work based on how steep they are? that's a massive mess that i don't know how to deal with.

Create a separate slope sprite, and then we could have like a “barrier” option added to sprites that would prevent it from overlapping other “barrier” sprites. (the same way collision detectors in Godot don't ever overlap, my terminology might be wrong)

Then gravity would do all the work.

DerpyHead0 wrote:

ResExsention wrote:

I don't think we should start negative supporting all sorts of great suggestions just because they're too complicated.
you aren't getting my point. my point is that anyone that wouldn't have the skill to quickly grab and use a platformer engine would have even more problems using any inbuilt system that could be made.


Read this. There's a small chance it'll change your mind.

——

I agree with all of your points, however I still believe that implementing this without being confusing is certainly possible. At most, it would be hidden as an extension so that new programmers aren't instantly overwhelmed.

Last edited by ResExsention (Dec. 11, 2019 10:33:42)


Infrequently active.

It feels weird to see how far we've come. I hope you're well, wherever you are!
45afc4td
Scratcher
100+ posts

Adding Physics

There's various different forms of gravity in physics engines that could be implemented.

Quadratic gravity (velocity increases by a constant each frame)
Cubic gravity
Exponential gravity
etc. you name it, all sorts of functions,

not to mention each of those may have modifications like terminal velocity, etc.

Powered by DjangoBB