Discuss Scratch

Enderplays8
Scratcher
14 posts

adding in physics blocks

Can you add a gravity block to scratch? it would make platformer physics a WHOLE LOT easier. here is how it would work:
forever
if <not <touching [ground] ?>> then
repeat until <touching [ground]>
change [Y speed] by (-1)
change y by (Y speed)
end
end
end

the
<touching [ground] ?>
is because this block would add in a ground sprite into your project. it would be in a category called:
(black colour) Physics.
and, a number or text block also in the physics category called:
(scroll on sprite).
absolutely NO idea on how long it takes to enter it in in JavaScript.
NO IDEA AT ALL. also, when you add them in, (if you even DO add them in),
let me know!
Mr_PenguinAlex
Scratcher
1000+ posts

adding in physics blocks

This is in the wrong topic, also, no support.

Enderplays8 wrote:

forever
if <not <touching [ground] ?>> then
repeat until <touching [ground]>
change [Y speed] by (-1)
change y by (Y speed)
end
end
end
You just gave a workaround, so I doubt this would be added.

Last edited by Mr_PenguinAlex (June 17, 2019 22:26:22)


Sigton wrote:

People who only warn Scratchers on the forums for doing something against these suggestions. I'd like to say something:

That's utterly counter intuitive.

The point of this sticky is to give you suggestions on what to and not to do. Simply warning someone is not adding to discussion, which is one of the main points here.
themasterofme
Scratcher
42 posts

adding in physics blocks

use the custom block
define gravity blocks
...

The master of me
The MESter of disguise
BOOM
DaEpikDude
Scratcher
1000+ posts

adding in physics blocks

Wasn't there supposed to be a physics extension at some point?

Anyway, I think that for simple platformer physics it's fairly easy to recreate with a simple gravity variable. (I mean, you basically gave the workaround yourself…)
And as for more complicated physics, well, would that really be used enough to warrant an entire extra main category being added?

Pirate: The cannons be ready, captain!
Captain: are*

If my post is in QaS or Suggestions I'm probably serious, but if it's in R&P or M/C then I'm probably not
Nambaseking01
Scratcher
1000+ posts

adding in physics blocks

Support.

If there was a block that said -

set gravity to (true or false)

- it would be really nice to create platformers.

My Profile - My Test Account - My Scratch Blog - 9 years - 1.7K+ posts - Gryffindor - Unofficial Forum Helper

ResExsention
New to Scratch
1000+ posts

adding in physics blocks

Nambaseking01 wrote:

Support.

If there was a block that said -

set gravity to (true or false)

- it would be really nice to create platformers.

Uh, no…

You can just do:

forever
if <(gravity_enabled) = [1]> then
whatever gravity script :: grey
end
end

Hi, I'm ResExsention, a New Scratcher who refuses to press that button! I hope we get to know each other and become friends!

If you see "[DATA EXPUNGED]", you'll know it was deleted by me. It's a lot easier.
Nambaseking01
Scratcher
1000+ posts

adding in physics blocks

ResExsention wrote:

~snip~
Uh, no…

You can just do:

forever
if <(gravity_enabled) = [1]> then
whatever gravity script :: grey
end
end

Uhh, I was just giving an example of what the block would look like?

Even if people used that script, you will have to define the variable, how it works, etc… Still giving support.

My Profile - My Test Account - My Scratch Blog - 9 years - 1.7K+ posts - Gryffindor - Unofficial Forum Helper

Dragonlord767
Scratcher
1000+ posts

adding in physics blocks

Apparently @Grifpatch has made one. It would definately be doable.


The contest is now closed. I'm working on the results.
Thank you to The Elemental Shop for my 60 second demon banner.
Nambaseking01
Scratcher
1000+ posts

adding in physics blocks

Dragonlord767 wrote:

Apparently @griffpatch has made one. It would definately be doable.

Not only griffpatch made a gravity system, also tons of other Scratchers and New Scratchers.

I fixed your grammar btw. ;P

Last edited by Nambaseking01 (June 23, 2019 11:58:59)


My Profile - My Test Account - My Scratch Blog - 9 years - 1.7K+ posts - Gryffindor - Unofficial Forum Helper

Enderplays8
Scratcher
14 posts

adding in physics blocks

GEEZ GUYS, THNX!! but, the physics blocks would just reduce lag. because normal platformers have more blocks, but the
(Gravity)
block reduces lag ‘cuz it doesn’t use AS MUCH blocks!
Enderplays8
Scratcher
14 posts

adding in physics blocks

themasterofme wrote:

use the custom block
define gravity blocks
...
WELL,
Gravity
is just a SUGGESTION.
Hmm? what's that Gravity Block?
Gravity
I think scratch team should add me . there could me many uses for me, and other of my type . it looks like they have some things to say, too .
hitbox width () length ()
wall/slope detection
NPC/ENEMY ACTION # of actions ()
i'm a hitbox detector. i'll got to any sprite i'm in, and i'll be the size of my two number-or-text slots. I also don't take variables .
i'm a slope/wall detector. I detect if the player is touching a wall, or walking up a slope. I even detect ceiling collision and ground collision .
i'm an NPC/ENEMY action randomizer. I will make enemies in platformers and NPCs for simulators easy. enter the number of actions in my number-or-text slot to determine what kind of enemy/NPC it is.
so, there are some more of my PHYSICS category blocks.

Powered by DjangoBB

Standard | Mobile