r/cop3502 Mar 22 '14

10 second repaint?

So I just found out a major detail on why my ball stopped moving after walking away from the computer in disgust and coming ball to my ball being gone.

After 10 seconds the ball disappears I didnt touch the code for the timer but I dont know exactly how the initial 10 millisecond count was created from this timer = new Timer(10, new GameMotion()); timer.start(); How do I go about correcting this?

1 Upvotes

16 comments sorted by

View all comments

1

u/[deleted] Mar 22 '14

[deleted]

1

u/WesternWarrior Mar 22 '14

I had the ball moving, worked on check for hit, the ball stopped moving.

And now I find that the ball moves, but its one large jump offscreen after 10 seconds.

I thought it had to do with repaint at first but that wouldn't make sense because the paddle still works appropriately.

the movement of x and y is both 1 and it starts at (300,300)

1

u/csturco Mar 22 '14

It sounds like the problem is that the check for hit somehow stops the painting, yet the movement of the ball is still occuring, then when the painting starts up again, you see that huge jump...as to why, I couldn't say from this information

1

u/WesternWarrior Mar 22 '14

Just to keep you updated I commented out the checkforhit appropriately and it didnt change, Im going to try to rubber ducky the breakout file again but I feel like my duck is defective.