I wanna know how to make a physics game, so far I have a black and red ball, a yellow bg and a red bar, I want it to touch the red bar and go up for a certain amount (Smoothly so it's not change y by 1 as long as it's touching the red.) I also want it to fall until it hits the red... so just physics? Any help, I need to learn viarable physics >_>
Offline
I would start with learning gravity. make a ball fall. you have the ball's y position. you need a variable called something like Yvelocity.
Move ball Y to 100. (this moves the ball to the top.) Set Yvelocity to 0. (so it doesn't start moving.) Forever change Yvelocity by -1 (this adds to the velocity of the ball going down.) change the y position by Yvelocity
so the ball starts moving slowly down and speeds up.
Now make it so the ball bounces when it reaches the ground.
Here's a project I made. Try to figure out how it works. Try changing things in the script. Let me know if you have questions.
http://scratch.mit.edu/projects/AddOne/827476
Offline