block by vasturiano 94107e18d438942f92b217809eb3e7ba

Quad Pong

Full Screen

A quadrilateral self-version of the Pong classic game.

Uses the d3-force simulation engine and custom forces to handle the collision and bounce between balls (d3.forceBounce) and with the paddles (d3.forceSurface).

Click-drag to control the paddles’ horizontal and vertical positions. Each time a ball bounces on a paddle you get 1 point. Each time it goes off screen you lose 2 points.

Use the top-left +/- buttons to add/remove balls from the system.

index.js

index.html

ball.js

paddle.js

style.css