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.
https://cdnjs.cloudflare.com/ajax/libs/d3/4.8.0/d3.min.js
https://unpkg.com/d3-force-surface
https://unpkg.com/d3-force-bounce