Pong 1D

A Flatlander's perspective
2011-09-26 / Sebastian Morr / CC BY-NC-SA 4.0 / software, game

Inspired by the movie Flatland, I wrote this one-dimensional game. For those who don’t know this movie (go watch it, seriously!), let me briefly explain the concept: Pong, as you know it, is a two-dimensional game: Everything happens in a flat plane. Now imagine you were one of the paddles - you’d see your surroundings as a line, one-dimensional. The rest is just normal Pong.

You can move around with your arrow keys. First to get 11 points wins.

Computer 0:0 You

Your browser does not support Canvas.

Inner workings

The rendering is realized by a 2D raytracer: For every pixel of the viewport, a ray is being shot. The color and the angle of the object this ray first hits is used for calculation of the pixel’s color.


You can reach me at @blinry or at sebastian@morr.cc, see the about page.

For more like this, check out the home page, follow me on Twitter or subscribe to this site's feed.