This commit is contained in:
gpt-engineer-app[bot]
2026-01-03 00:50:06 +00:00
parent 1a6227bf48
commit 75946c9feb
6 changed files with 795 additions and 557 deletions
+2 -1
View File
@@ -121,7 +121,8 @@ const Breakout = () => {
}, [canvasSize.width]);
const resetBall = useCallback(() => {
const speed = 4 + level * 0.5;
// Slower base speed (2.5 instead of 4), with gentler level scaling
const speed = 2.5 + level * 0.3;
ballRef.current = { x: canvasSize.width / 2, y: canvasSize.height - 60, dx: (Math.random() > 0.5 ? 1 : -1) * speed, dy: -speed };
paddleXRef.current = canvasSize.width / 2 - paddleWidth / 2;
}, [canvasSize.width, canvasSize.height, paddleWidth, level]);