Hello Brian. The game is coming along nicely since the last time I saw it.
In your game-draw routine, where you check for the ball position, you need
to allow the top-bottom left-right test to adjust the velocity in both
planes X and Y in a single cycle. The ball is getting stuck on the edges and
wobbling in certain circumstances. I think this is because the puck velocity
isn't 1 so the puck can travel past the edge far enough that it gets locked
in a zone where it's always off the edge and bouncing with every go round
the loop.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Brian" <br************@gmail.com> wrote in message
news:c2*************************@posting.google.co m...
Hello all,
Hope you all had a enjoyable Christmas and New Year!
Making some good progress on my Air Hockey game, which you've all
heard so much about! :)
Apologies for the vagueness of the following:
Having some little problems not... got my hit-testing working but am
having problems with it at the bottom of the table (typically) for
some reason. The puck seems to react a couple of times at the bottom.
Here's a link to my Table form (along with the Table and puck - put in
Debug folder to work!)
Could ye please have a look at it and suggest why this could be
happening?
PS - Also, i'm about to begin to implement user interaction into it.
Such as the puck reacting when the mouse enters it? How could i go
about implementing this?