Logic (kinda)

Hello people I am wanting to show you my new projects that I am making. e.g Gravity
Visit here:https://snap.berkeley.edu/collection?user=danielthebanana4&collection=My%20Science%2FLogic%20
(I am only starting snap so they aren't so good)
:grinning:

I am going to make a game collection too.

Good start. You know that things speed up as they fall, right? That's why falling off the top of a skyscraper is worse than falling off the roof of a one-story house. The rate of speeding up is constant, so for example if you start with grav=-5, each time through the loop you could change it by -1, and then change y by grav as you're doing now.

Ya, I am working on that kinda stuff.

I don't understand

Sorry for the inconvenience.
I'll try to explain that the state of the object can be described by 3 attributes - position, velocity and applied force.
The Position is changed by velocity.
Applied force varies the velocity.
Gravity force changes the velocity at a constant rate (10m/s^2).
Other forces, like jet engine thrust, can vary the velocity accordingly to power level.

So having only the position and decreasing it at a constant rate is not enough to get, decent looking, space ship landing simulation.

My attempt:

So, in your project there's a line that says CHANGE Y POSITION BY (grav) that's called every display cycle. When something changes position by a certain amount each second, or each hour, or whatever, that amount is called its speed.

Clearly you understand speed, because (a) everyone does, and (b) your project wouldn't work at all if you didn't. :slight_smile:

So, the thing is, when things are falling, not only does their position change, but so does their speed. The speed isn't constant; it varies. Just as the rate of change of position over time is called "speed," the rate of change of speed over time is called its acceleration.

You may not understand acceleration, but your body does. You can't feel speed, but you can feel acceleration. So, you can be in a car or train moving at a constant 100 miles per hour and not feel anything. But if you hit a brick wall (or hit the brakes in order to avoid hitting the wall), you feel that. Another example: In an elevator, you can feel the starting and the stopping (you feel lighter or heavier), but you don't feel anything in the middle.

When you're going down in an elevator, there's a complicated mechanism with chains and pulleys and things whose job is to keep you moving at a constant speed. But if the cables attached to the top of the elevator compartment broke, you would start falling faster and faster, until you hit the bottom and all your bones would break. (This is why there's always more than one cable, and in fast elevators there are brake pads at the corners that can apply friction to the moving compartment, so no single breakage will kill anybody.)

So, all that is just what your own body teaches you. What science teaches you (first discovered empirically by Galileo, I think, and described mathematically by Newton) is that the acceleration due to gravity in free fall is constant. [Footnote: What Newton really worked out is that the acceleration due to gravity is different at different distances, so the pull of gravity on an airplane flying over the clouds is slightly less than the acceleration due to gravity in an elevator on the Earth's surface. But unless you're at astronomical distance from Earth, e.g. at the space station or on the moon, your distance from the center of the earth is basically constant. Ignore that part if it confuses you.] That's very different from saying the speed is constant, which isn't true. But the acceleration -- the rate at which the speed is changing -- is constant.

So in your program you can't just set the speed of the fall to -5. The speed's absolute value has to increase over time, maybe to -6 after the first cycle, -7 after the second cycle, etc. (If you try those numbers in your program you'll find that the game is way too fast to be playable, or even watchable. The acceleration due to gravity should be more like -0.1 rather than -1.)

So, figure out how to change your program so that the fall happens a little bit faster in each display cycle.

I might read this later it is a bit big :flushed:

'kay.

That's what I was thinking of doing.

Hmmm..