This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
i try to follow that as i much as i can,
but i m not able to apply all physical phenomenon in code, can somebody please tell me, where i m mistaken or i m still doing some silly programming mistake , the balls are moving when i m not calling bounce method and i m unable to avail the bounce method and ball are moving towards left side instead of falling/ending on floor,
Can some body can recommend me some better way or similar way to accomplish this task of applying physics on two ball or more balls ,
here is code ;
using Adobeball
load of thanks
jibby
pete stein
Bartender
Joined: Feb 23, 2007
Posts: 1561
posted
0
That's a lot of code to go through -- so I'm not.
But when my program logic doesn't work as I desire it to, I put on my debugging hat and start debugging like crazy. If you haven't already done so, either use a decent debugger or pepper your code with printlns so that you can see why the program is not behaving as it should.
Best of luck.
Jibby Lala
Ranch Hand
Joined: Aug 29, 2010
Posts: 35
posted
0
i ordered a DEBUG HAT BUT i thought it will take time to reach as i m newbie ok, then can you please shift this thread to "game development" section or most likely place to get answer.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> ...or most likely place to get answer.
as we can't compile it, or run it, the most likely place is where people enjoy reading --> the library
Jibby Lala
Ranch Hand
Joined: Aug 29, 2010
Posts: 35
posted
0
why you can't compile or run it?
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
private MyKeyListener pit;
Mike Pukuotukas
Greenhorn
Joined: Oct 08, 2010
Posts: 6
posted
0
Here is a well working code of the two dimensional ball collision, maybe it can help you.
Jibby Lala
Ranch Hand
Joined: Aug 29, 2010
Posts: 35
posted
0
Please add this :
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> Please add this :
all you are doing is wasting our time:
you have this
private MyKeyListener pit;
pit = new MyKeyListener();
now you've (finally, what 10 days?) posted the MyKeyListener class.
so how do you expect to compile/run with these lines
frame.addMouseListener(pit);
frame.addMouseMotionListener(pit);
perhaps you'll put in a better effort at your (at least) 2 cross-posts
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.