Pixel Race

Copying pxlrace

Syntax

The following is the syntax for running Pixel Race.

      pxlrace [number of racers]

      pxlrace -h

The default number of racers depends on the size of your screen. The minimum number of racers is 2. If you want to query the default number of racers, either run

      pxlrace -h

...or run a single race without a parameter. The display tells you the number of racers that can fit on your screen.


Restart Race

Press the letter r to run another race.


Termination

Press Escape to quit.


Display

pxlrace creates a race between a certain number of pixels across the screen from left to right. It takes a number of steps for a pixel to reach the end of the race. The number of steps depends on the size of your screen. The race stops when the first pixel reaches the right edge of the screen.

pxlrace shows the leading pixel during the race and the winning pixel in red at the end of the race.


Performance and Speed

pxlrace cannot guarantee equal conditions in each race. One race may use more or fewer resources than a prior race. pxlrace runs in a multi-tasking operating system, Linux. Other concurrent tasks affect the performance of the race. The speed of each race has a random factor built into it that can't be controlled.

The fewer the number of racers competing, the faster the races become. Various techniques of slowing down the races have been tried, but the random factors of performance have been magnified. When a nanosleep wait is introduced, the racers don't race at a constant speed throughout the race. To eliminate these problems, the races are run without slowing them down. Races of two contestants are fast and races with the maximum number of contestants are slower and more enjoyable to watch.

The relative speed of each pixel is not affected by the performance of the operating system. Whether the pixels run fast or slow, their chances of winning depend strictly on the random number generator. The datagen package at www.ibiblio.org/pub/linux/devel contains a thorough statistical examination of the random number generator. It passes all the statistical tests within the expected range of random variation. If it had failed in any of the statistical tests, a different generator would have been used in this package.


Microsoft Windows Version

The Microsoft Windows version of pxlrace is called pxlrace-1.0.0.win.zip.