Oscilloscope turns Quake into retro art project

An oscilloscope is a tool used to measure varying signal voltages by way of a simple 2D XY line plot, usually on a small embedded screen. It’s a serious piece of electrical equipment, but that’s not all it is. With some tweaking, it can become a monitor for playing a little Quake. One Pekka Väänänen put it all together and detailed the process.

Väänänen used a Hitachi V-422 oscilloscope and a simple XY-oscilloscope simulator written in the Processing language for testing. All an oscilloscope really does is draw a series of vertical and horizontal points. The result is a series of lines, or rays. If you control the input carefully, the instrument can be used to draw complex shapes. You need to keep the time intervals tight and consistent, though. Otherwise the line segments in a complex image will have different intensities.

The system uses Audio Stream Input/Output and the PortAudio I/O library to get a signal from the PC to the oscilloscope. This was used because it’s fast, and a game is real time, so the signal can’t go through a bunch of intermediaries that introduce latency. The oscilloscope isn’t actually displaying an image based on the final rendered version of the game, but rather is based on the projected scene geometry from the game engine. The Quake 1 source code has been released, meaning a variety of mods exist that give access to this data (in this case, Darkplaces was used).

In order to keep the display close to real time, unneeded lines have to be discarded during the rendering process. If a line lies completely behind another one (like lines that describe a wall), that line is dropped from the frame. On average, 1800 lines per frame are transferred. There’s a bit of low-frequency noise in the video above caused by a sound card issue, and there are only about 1000 lines on the screen at a time (any more and the audio output can’t keep up). It still looks cool to me.