Changes
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user