# Pong 1D

Pong (marketed as PONG) is one of the earliest arcade video games, and is a tennis sports game featuring simple two-dimensional graphics. The aim is to defeat an opponent either computer-controlled or a second player by earning a higher score. The game was originally manufactured by Atari Incorporated (Atari), who released it in 1972. Pong was created by Allan Alcorn as a training exercise assigned to him by Atari founder Nolan Bushnell. Bushnell based the idea on an electronic ping-pong game included in the Magnavox Odyssey, which later resulted in a lawsuit against Atari. Surprised by the quality of Alcorn’s work, Atari decided to manufacture the game.

# Game

Two players interact with a ball free to move in the interval $[0,1]$ of a 1D coordinate axis. One of the playerscan reverse the velocity by clicking the mouse when the ball hits $x=0$ and the other at $x=1$. If the mouse is clicked to early or too late the game ball is lost.

# Mathematics

Assume the ball moves with constant speed $v$. The equation of motion is $dx=vdt$ as long as the ball is inside the interval $[0,1]$. If $x((n+1)dt)<0 or $x(ndt)<1, then a player can reverse the direction of motion, by a mouse click.

# Realization

• Update position by $x^{n+1}=x^n+vdt$.
• Reverse the sign of $v$ by mouse click when $x((n+1)dt)<0 or $x(ndt)<1.

# Generalization

• Given variable speed $v(t)$.
• Add given force $F(t)$ and update $dv=\frac{F}{M}dt$, $dx=vdt$.

# Perspective

\item \hyperref[chaptershortcourse]{Short Course of Calculus.}