It's just a compressed version of a more rational but very short program, shaven down to its bare minimum length so that it meets the requirements of The Perl Journal's Second Annual Obfuscated Perl Contest, being a self-contained game comprising 512 bytes or fewer. I have no doubts that other games will pull tricks far more evil than mine and thus win the prize, but I'm pleased at what I was able to make anyway.
Unfortunately, playing this game requires you to be nerdy enough to know what to do when presented with a dollop of raw Perl code. (Flee the premises while screaming, while a valid answer, won't make the game run.) You can read the rules and storyline and view the obfuscated or readable versions of the game's source code, or get the entire tarball of all files as submitted to the contest. Or, you can just copy and paste the obfuscated version from this webpage into a local text editor. Here it is (with spaces inserted after semicolons for proper browser display):
($a)=@ARGV; $a||=10; $b=40; $d='.'; $c=($b-$a); $f=($c/2); $g=0; $j=5; $e=1; $h=$f; foreach(0..$c){$i[$_]=(100/$c)*$_}while($j){@k=(); if($h<$f){$h=$f; $j--; $e=-$e}elsif($h>=($f+$a)){$h=$f+$a-1; $j--; $e=-$e}$|=1; @l=(' ')x$a; $l[$h-($f)]=$d; push @k,'*'x($f+1); push @k,@l; push @k,'*'x($c-$f+1); push @k,' ',$j; print join('',(@k)); if(rand(100)<=$i[$f]){$f--; }else{$f++}$g++; $y=$x=''; vec($x,fileno(STDIN),1)=1; if(select($y=$x,undef,undef,.1)){until(sysread(STDIN,$b,1)){}$e=-$e; }else{print"\n"}$h+=$e}print"$g\n";
These docs are available as part of the game's tarball.
Help Don the Daredevil Dot steer clear of the sides of the bottomless Crevasse of Stars, into which he has flung himself in search for fame and glory. Sadly, he is very nearsighted, so since you can't see the shape of the pit underneath him very well, you'll just have to try and keep him clear of the walls. Don will happily collide with the walls five times before calling it quits and retiring to a less demanding pastime elsewhere in your computer.
Hit ENTER to toggle the direction of Don's fall: left or right. You can't make him fall straight down, but you can kinda fake it by holding down the ENTER key. However, this straight plunge makes Don especially aerodynamic, and may greatly increase his downward velocity. Be careful!
You score one point for every Don-length that Don falls before he bumps five times into the starry walls, at which point the game shall display your final score.
Don always begins his plummet from the left lip of the crevasse, and starts to fall rightwards.
If Don still has lives left after smacking into a wall, he'll bounce off of it and start falling in the opposite direction.
It is said that the Star Crevasse rather resents folks jumping into it, and might sometimes try to confuse and endanger adventurous divers by displaying nonsensical illusions. Stay alert!
This game serves as the author's entry into the 2000 Obfuscated Perl Contest, held by The Perl Journal. While it is his first attempt at such a competition, the program is actually a port of a game he wrote in Apple BASIC in 1990, as a high school project.
fall.pl and this documentation file are both copyright © 2000 by Jason McIntosh <jmac@jmac.org>. You may distribute them under the same terms as Perl itself.