Click to See Complete Forum and Search --> : positionable object speedup problem


twostepted
03-09-2004, 08:21 PM
I'm designing a simple pong game using DHTML. The movement of paddles and serve are activated by keystroke events. As the game goes on, the speed of the paddles and the speed of the ball increases until it is impossible to play. And I have noticed that this speedup only occurs when relevent keystrokes are made (ie the keystrokes which control the game). If anyone has any experience with this, I would love to know how to slowdown this speedup problem.

Thanks

Sam
03-09-2004, 08:29 PM
why not have a timer that controls the speedup?

twostepted
03-09-2004, 08:51 PM
That would work for the speed of the bouncing ball as I keep track of its speed. However, it wouldn't work for the speed of the paddles unless I changed their positions by smaller increments each time. So this may work. I'll let you know.

I am hoping to understand the cause of this problem.

I have attached my source here if anyone cares to look.

Thanks