←back to thread

Pong Clock

(bigjobby.com)
175 points donohoe | 1 comments | | HN request time: 0.528s | source
Show context
clocker ◴[] No.45088650[source]
Great idea! Wish the speed was bit more. I think it would be cool if it takes exactly 1 second to bounce between the two paddles.
replies(4): >>45088796 #>>45089633 #>>45092946 #>>45098330 #
1. gpt5 ◴[] No.45089633[source]
Type this into your dev console to speed it up to one hit per second (or if you want in the URL bar, prefix it with `javascript:`)

  (()=>{const T=1;window._u0=window._u0||update;update=function(){const W=gameCanvas.getBoundingClientRect().width,dist=0.92*W,vx=Math.abs(ball.speedX)||INITIAL_BALL_SPEED;let n=(dist/vx)/(60*T);n=Math.max(1,Math.min(20,Math.round(n)));for(let i=0;i<n;i++)_u0();};})()`
replies(1): >>45093507 #