Go with the flow —

“Pong” gets a physics boost, by way of HTML5

Real-time modeling of fluid dynamics makes for a fun but frustrating game.

Physics and computer games have a long, beautiful friendship, starting with Spacewar! in 1962, its play based on spacecraft maneuvering in the gravitational field of a star. Many modern games have extensive physics engines to create realistic play. (Your mileage may vary in terms of "realism"—I'm looking at you, entire Mario franchise!) For an explicit merging of realistic physics and classic arcade game play, it's hard to beat Plasma Pong, Steve Taylor's 2007 browser-based game that was named by Wired as one of the best independent titles.

Screencap of your author getting beaten by the AI on "Fluid Ping Pong"
Enlarge / Screencap of your author getting beaten by the AI on "Fluid Ping Pong"
Plasma Pong, alas, suffered an early death via a cease-and-desist from Atari, which owns the PONG™ trademark. However, Australian developer Anirudh Joshi revamped the title and changed its name to Fluid Ping-Pong, giving it an HTML5 flourish along the way. While PONG™ had very simple physics—just a ball bouncing back and forth, with no need to model forces—Fluid Ping-Pong uses a real-time fluid dynamics engine, with code and concepts from Jos Stam, Oliver Hunt, and RJ Marsan. The extra dynamics are evident from the name: the ball moves in a somewhat viscous fluid. In addition to moving the paddles PONG™-style, players can send jets into the ambient fluid, or "suck" the fluid back.

Because the gameplay is based on real fluid dynamics, the motion of the ball can be unpredictable, at least on the level of human reaction times. Having two players (one AI in my case—I haven't tested the two-player mode) means there could be two competing streams of fluid colliding, with turbulence at the boundary. While it's realistic and based on modeling of the fluids using the Navier-Stokes equation, anyone who has used a ping-pong gun knows how erratically the ball can move even in fairly still air.

I found the gameplay fun but frustrating, worth more than a few minutes of enjoyably wasted time. More interesting to me is the intersection between the real science of fluid dynamics and video games—and why a realistic mix may not always be desirable.

Channel Ars Technica