Wednesday, 21 August 2013

How can I get my graphic to move without lag or without slowing down?

How can I get my graphic to move without lag or without slowing down?

I have a game where a ball(circle graphic moves around the form. It moves
based on a timer that ticks every 8 milliseconds. The problem is that
after a few seconds the ball slows down a lot. How can i stop the ball
from slowing down and keep it going at the same pace.
move.Stop();//Prevents a queue of events
//Moves the ball
ballGraphic.Location = new Point(ballGraphic.Location.X +
ball.xVelocity(), ballGraphic.Location.Y + ball.yVelocity())

No comments:

Post a Comment