I want to remember that this great project of Canthiar was the source of this remix, that is part of Scratch Installation now (no remix link cause that doesn't existed at this early time of Scratch) (link to project)
http://scratch.mit.edu/users/davegram just posted to the Remix:
This is fantastic. I love that there are so many different ways to change what the balls do.
my comment:
[...]It's a remix of (link to project) ...you are greater if you stand on the shoulder of giants like Canthiar.
wtf everybody is right i mean he doesnt even show us the commands he used!!! so ANNOYING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Canthiar this must be the most complicated script anywhere. You inspired me to give circular bouncing a shot (link to project) Mine isn't as good but I thought you might want to see it.
If you want more balls then download the source and use the copy tool. You can have only 3 large collision objects, but you can have as many smaller ones as your computer can run.
Download the 12 sprites and 16 scripts of "Bouncing Balls" and open it in Scratch
Project Notes
You can move the object emitter around with the mouse and change the direction by clicking on the pointed end.
This is what I consider a production version since I've inlined a few things. I have a more academic version that is a little easier to read. The whole thing is also dumbed down a little to make the math a little easier.
How it works:
When a ball encounters a collision object it uses the [ point towards[ Collision ] ] command block and then uses sin and cos to calculate a colliion normal. That normal is used to calculate a resulting velocity perpendicular to the surface and velocity tangent to the surface. Friction and restitution are applied to make the ball bounce.
Comments
You need to be logged in to post comments
Add a Comment
Thanks Canthiar for creating a smart demonstration! I will use your demonstration in my scripting for an upcoming game!
P.S. I will give you credit (Just be my friend so I remember!)
(view all replies)I want to remember that this great project of Canthiar was the source of this remix, that is part of Scratch Installation now (no remix link cause that doesn't existed at this early time of Scratch) (link to project)
http://scratch.mit.edu/users/davegram just posted to the Remix: This is fantastic. I love that there are so many different ways to change what the balls do. my comment: [...]It's a remix of (link to project) ...you are greater if you stand on the shoulder of giants like Canthiar.
I've played this bout 100 times now! love it! you've gotta talent!
OMG!!! This is A-MA-ZING! You LEDGE!
You're a genious
nice, but there is no sound.
math is so cool
wtf everybody is right i mean he doesnt even show us the commands he used!!! so ANNOYING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This makes NO sense wtf?????!!!!
i dont get this gaaaame! :s
Read project notes.
BORING
Your an idiot, go grow a brain and then come back.
+_+ do you know how hard this is to make? there is a lot of trig involved.
bbbooooiiinnnngggg
nice
very good
Anybody how do you do gravity scripts?!
forever( if[not[touching<ground>]]( change y by <-3> ) else( change y by <3> ) )
(view all replies)okay
OW. Scripts hurt my head. This must've took a while.
seems like you beat seancanoodle to it. (he's making a bunch of pin bounce things)
all alla la
Canthiar this must be the most complicated script anywhere. You inspired me to give circular bouncing a shot (link to project) Mine isn't as good but I thought you might want to see it.
Awsome!
The ball thingies should collide with themselves.
cool!
XD Half plus a half plus a half awesome. Lol that's 3 halfs
swwwwwweeeeeeeeeet!!!! how do you do that?!?
nice very nice i think its so cool how u did that\
nice! 10 thumbs up
cool!
woah!!!!!!
(:-O) (That is the most complicated piece of scratch code i have ever seen!) AMAZING!!!!!!!!
i dont get it???????????/
ohoh so many variables
this is good lol i wish i made it!
all your projects are scientific or mathematic... its cool!!
oh
Restitution is a fancy word for bounciness.
Whats restitution in this case?
Sick!
Nice piece of programing, please check out some of my pojects!
Argh! My stupid computer wont let play anything! sgdbvxdhcxdhvchnasbdchzsbjcmvjmsdbjkcmsdbc!
i hav to now admit u r the best programmer on scrathc after see ing this
yet another great project! check out his random maze program its a-maze-ing
Cool, glad to hear it all worked out. I may roll that change back into this program.
Canthiar: Thank you for your help! Now it works: http://scratch.media.mit.edu/projects/MartinWollenweber/8708
I saw that earlier, but figured it was solved. I will take another look.
Hi Canthiar! Can you help to solve folowing problem with a mod-version of Bouncing Balls? (link to forums)
Eyvind: That was a typo it's SCRATCH 1.1
you're brilliant.... that's all I can say....
Excuse me MartinWollenweber, where do you download scratch 1.2?
If you want more balls then download the source and use the copy tool. You can have only 3 large collision objects, but you can have as many smaller ones as your computer can run.
how do you make it fire more balls
Or a good one.
Thats not a baad comment
This reminds me of cows jumping over the moon, believe it or not.
It didn't start off being very large, but getting it to run fast required me to inline the sin and cos calculations which bloated it a little bit.
this must have had a monster scrip
Hey, someone make a pong game outta this or something.
wow!
Check out what MartinWollenweber has done, I think it's a pretty good version 2.
The Best! Why not have version 2?