please help me here the link
https://replit.com/@CharlieTaylor29/InsignificantLightcoralDominspector?v=1
This is poorly implemented. It’s better to use requestAnimationFrame.
Change this:
animate();
To this:
function animate() {
context.clearRect(0, 0, canvas.width, canvas.height);
drawSquare();
collision();
drawPaddle();
drawScore();
requestAnimationFrame(animate);
}
animate();
1 Like
hi thank you but the code still does not work would it work if I invited you into the workspace
See if it’s okay now.
It copy’s the ping pong bal leaving a bunch of it behind it
Likely because you changed the clearRect.
I set to 0,0 now, see if it works.
I also changed the paddle since it was kinda messy.
Okay thank you so much