Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread David Muffley
On Dec 4, 2007 12:45 AM, Greg Ewing <[EMAIL PROTECTED]> wrote: > To do this calculation properly you'd need to use the > appropriate relativistic formulas. No doubt you could > get enough kinetic energy if the object was moving at > a speed close enough to c, but the more likely result > would be

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread Greg Ewing
Ian Mallett wrote: So, if our object masses 1kg., to move the Earth 1m/s., the object must move 199,120,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,

Re: [pygame] Bouncing ball - separating the physics from the frame rate

2007-12-03 Thread Casey Duncan
On Dec 3, 2007, at 12:30 PM, Ian Mallett wrote: On 12/3/07, Matt Smith <[EMAIL PROTECTED]> wrote: if it bounces a couple of times inside one time-frame) (http://hyperphysics.phy-astr.gsu.edu/hbase/ hframe.html for a good physics reference, also, choose radians, steer away from degrees http

Re: [pygame] Talking to midi devices

2007-12-03 Thread Alex Polite
2007/12/3, Ian Mallett <[EMAIL PROTECTED]>: > Do you mean like making sounds? > Pygame does that. nope. > By talk, do you mean dictate to, or converse? The latter is much more > difficult, because the communication would be two-way. Maybe you > could use microphones... I'm making a piano game.

RE: [pygame] This is why your ball vibrates

2007-12-03 Thread Boer Kees
The solution: :) see my previous post for some code. the problem was twofold: check somehow, if the ball moves SOO slightly, it is to be considered dead. BUT! there also was a major flaw in the way the ball bounced back up: the speed was assumed to INCREASE all the way, even AFTER the dir

Re: [pygame] Talking to midi devices

2007-12-03 Thread James Paige
On Mon, Dec 03, 2007 at 11:52:08AM -0800, Ian Mallett wrote: > Do you mean like making sounds? > Pygame does that. > By talk, do you mean dictate to, or converse? The latter is much more > difficult, because the communication would be two-way. Maybe you > could use microphones... > Ian Pygame do

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread Michael George
At those speeds you need to use relativity to get the right answer anyway. A 1kg mass needs to be moving at roughly the speed of light to accelerate the earth to 1m/s. Ian Mallett wrote: So, if our object masses 1kg., to move the Earth 1m/s., the object must move 199,120,000,000,000,000,000,

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread David Gowers
On Dec 4, 2007 7:02 AM, David Gowers <[EMAIL PROTECTED]> wrote: > Hi Ian, > > > On Dec 4, 2007 6:18 AM, Ian Mallett <[EMAIL PROTECTED]> wrote: > > So, if our object masses 1kg., to move the Earth 1m/s., the object > > must move > > 199,120,000,000,000,000,000,000,000,000,000,000,000,000,000,000,00

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread David Gowers
Hi Ian, On Dec 4, 2007 6:18 AM, Ian Mallett <[EMAIL PROTECTED]> wrote: > So, if our object masses 1kg., to move the Earth 1m/s., the object > must move > 199,120,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

Re: [pygame] Bouncing ball - separating the physics from the frame rate

2007-12-03 Thread Ian Mallett
On 12/3/07, Matt Smith <[EMAIL PROTECTED]> wrote: > > if it bounces a couple of times inside one > > time-frame) (http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html for > > a good physics reference, also, choose radians, steer away from degrees > > http://en.wikipedia.org/wiki/Sine) Yep, and if

Re: [pygame] Bouncing ball - separating the physics from the frame rate

2007-12-03 Thread Matt Smith
Boer Kees wrote: The best I think you can do, is, in pseudo code: mainloop: -get the current time in ms -calculate the new position of the ball -take speed of ball, take direction of ball, calculate the imaginary end position of the ball -keep checking (with calculus), if the line ball-

RE: [pygame] Why does my ball vibrate?

2007-12-03 Thread Boer Kees
#ok, I think I have it broken down into pieces now... check out this code: # import sys, pygame, mathpygame.init()pixelspercm=10.0gravity=9.80 * 10.0 # meter per second per second (juiced up a little :) )framerate=50.0 # per secondlossperbounce=0.33 # lose energy per bounceframestosilence=3

Re: [pygame] Talking to midi devices

2007-12-03 Thread Ian Mallett
Do you mean like making sounds? Pygame does that. By talk, do you mean dictate to, or converse? The latter is much more difficult, because the communication would be two-way. Maybe you could use microphones... Ian

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread Ian Mallett
So, if our object masses 1kg., to move the Earth 1m/s., the object must move 199,120,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread Michael George
Lenard Lindstrom wrote: This is less than the Planck length of 1.6 * 10 ** -35 meters so becomes moot. The Planck length would make a natural cutoff for any game physics. :-) I've thought of writing a game with physics operating at the quantum scale, but I couldn't think of anything inter

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread Lenard Lindstrom
Ian Mallett wrote: If the ground were mobile, that gravity force down would cause the earth to move down with that same force. Since the earth can't move, it pushes back with the force of gravity. But the Earth does move. If you drop a 1kg. ball from a height of one meter, then both obj

Re: [pygame] Why does my ball vibrate?

2007-12-03 Thread Ian Mallett
On 12/2/07, Patrick Mullen <[EMAIL PROTECTED]> wrote: > But there IS an upward force, at least as far as my memory of the > physics I learned. The whole every action has a reaction business. Right. Newton's third law. Pushing on a table should move it, if the force is unbalanced, but it doesn't,

RE: [pygame] Bouncing ball - separating the physics from the frame rate

2007-12-03 Thread Boer Kees
ok, I had this problem once, a while ago, simulating bouncing rigid balls. lost the code... The best I think you can do, is, in pseudo code: mainloop: -get the current time in ms -calculate the new position of the ball -take speed of ball, take direction of ball, calculate the imaginary e