Computer Science Canada

My Circle Detection Program :p

Author:  LaZ3R [ Wed Jun 13, 2007 5:07 pm ]
Post subject:  My Circle Detection Program :p

So I started making a slime sports game for fun to see how well I can make use of circular hit detection. Well, it's not too difficult but getting the ball and all to move at the correct angle and speed and for proper distance takes a slightly bit more thinking because I'm not sure how I want it just yet. So I wanted to screw around with making balls bouncing off eachother as best as I can, thus made this little application for myself Smile.

Gets boring fast, I know Very Happy.

Only problem I'm really having is having the balls hit eachother properly even if you create a ball and launch it very fast towards another ball, the detection currently works mainly if you fire a ball in a direction at not such a huge speed Smile.

Hold your mouse down, and drag it backwards (opposite to the direction you want to launch it in), and fire away Very Happy

You can also create still balls by clicking directly on the screen.

It's only 75 lines and doesn't use any trig Smile.

Author:  CodeMonkey2000 [ Wed Jun 13, 2007 6:07 pm ]
Post subject:  RE:My Circle Detection Program :p

Pretty good. Have you looked at zylum's perfect circle collision tutorial?

Author:  LaZ3R [ Wed Jun 13, 2007 8:13 pm ]
Post subject:  RE:My Circle Detection Program :p

Indeed I did, but some parts confused me a bit. I'll give it a read again I guess and hopefully read it with more of an open mind this time. Will do that now Smile.

Author:  Auraiken [ Fri Jun 15, 2007 10:12 pm ]
Post subject:  Re: My Circle Detection Program :p

Can you explain how it doesn't use any trig?


: