PDA

View Full Version : Bouncing Ball



Sammo
March 8th, 2005, 02:34 AM
100% sure it's been done before, but what the hell I'll post it anyway.

width=550 height=400

http://cannedlaughter.net/bounce.fla
http://cannedlaughter.net/bounceMX.fla


//EDIT: doesn't work in FF :(

flytie52000
March 9th, 2005, 08:31 PM
//EDIT: doesn't work in FF :(

Works fine for me in FF. Good job with the physics. Take a look at having the ball come to rest. It seems to get to a point and continue its x-movement with a tiny bounce indefinitely.


// Edit: very interesting. It stopped working after I posted, as well.

smoothhabitat
March 10th, 2005, 01:33 AM
make it so you can grab it and throw it!

Sammo
March 10th, 2005, 02:32 AM
Thanks for the comments, I am trying to make it stop bouncing, but im not having much success. Throwing will be a cool idea. I'll try that out. :)

[uber]
March 10th, 2005, 04:23 AM
not working for me.... FF user

Mythmon
March 10th, 2005, 06:43 PM
worked for me, let me see if it stops after i post...

Any way, nice job, i especialy like the touch of telling how far above the screen the ball is.

And about the bounce thing, i looked at your code, and ever thing seemed alright, but when i did a trace every time th bal bounced, it went down as normal. but then around 3.75 it started to only barely change, and the wierdest thing is that part of the time, the velocity went up. Maybe you should add some friction?


EDIT strange, after reloading the page when i posted it no longer works :( good job anyways

Sammo
March 11th, 2005, 09:50 AM
worked for me, let me see if it stops after i post...

Any way, nice job, i especialy like the touch of telling how far above the screen the ball is.

And about the bounce thing, i looked at your code, and ever thing seemed alright, but when i did a trace every time th bal bounced, it went down as normal. but then around 3.75 it started to only barely change, and the wierdest thing is that part of the time, the velocity went up. Maybe you should add some friction?


EDIT strange, after reloading the page when i posted it no longer works :( good job anyways

Thanks, I'll look into it. I'll post any results i get.

Deaddocus
March 11th, 2005, 09:55 AM
On the Screentime site they have a similar thing for windows. A red rubber ball you can toss and so, :)

It would be fun if the ball slowed a little less quickly, :beam:

e-sarbak
March 12th, 2005, 04:35 AM
Be sure that it is posted alot but still it is very good ...:)

[uber]
March 12th, 2005, 07:07 AM
i did this... its basically the same ball that ya3 has on his frontend


I wanna redo it and have the highlight change according to its position... plus make the sprite better

Sammo
March 12th, 2005, 07:47 AM
can I see your code? I wanna see if i can use it to get my ball to stop bouncing.

[uber]
March 12th, 2005, 07:57 AM
let me quote it up for you

[uber]
March 12th, 2005, 08:07 AM
here ya go.... i learned all the physics info from somewere....

krnmikel
March 12th, 2005, 03:55 PM
works fine for me. =p

Amish
March 13th, 2005, 06:17 AM
try www.bit-101.com/tutorials

then try the gravity one it has an amazing ball gravity and thorwing script and well instructed tutorial

n4c
March 26th, 2005, 11:45 AM
works fine for me also...

Never Too Late!!! Never Too Early!!!

n4c

freeskier89
March 28th, 2005, 10:54 PM
The physics is quite simple. I attached something that I did that is quite similar. The collisions are pretty bad because I haven't got around to fixing them and the variable I set for xfriction is too high. I used elastic mouse following movement rather than the setDrag method.