To make the ball "spasm" as it moves along, just add or subtract a random unit or two from the JumpHoriz and JumpVert. I'd use a const for the amount of jitter:
const
JITTER = 5; // use an odd number to properly center around zero
Then before you do the side collision checking:
Randomize;
Inc(JumpHoriz, Random(JITTER) - ((JITTER - 1) div 2));
Inc(JumpVert, Random(JITTER) - ((JITTER - 1) div 2));
This may not be the most optimized way to do it, but it should work.
Bookmarks