Category: | Fun Stuff |
Author/Contact Info | photon |
Description: | this is just a senseless ascii animation :) |
#!/usr/bin/perl $xmax = 75; $ymax = 20; $delay = 0.2; $white = "\e[37m"; $bold = "\e[1m"; $red = "\e[31m"; $green = "\e[32m"; $cls = "\e[H\e[2J"; $home = "\e[H"; $off = "\e[?25l"; $on = "\e[?25h"; $text = " C3H." x 4 . "." x 15 . ":)" . "." x 26 . "photon"; $foobar = "[$red B O R I N G $green]"; print $cls. $bold; $SIG{INT} = \&quit; init_phreak(); while ( !$bored ) { print $off. $home; for ( $xx = 0 ; $xx < $xmax ; $xx++ ) { $BLOAT[$xx][ int( $xx ^ int($foo) ) ] = substr( $text, $xx, 1 +) || " "; } if ( $mode == 1 ) { $foo-- } else { $foo++ } if ( $foo > $xmax ) { $mode = 1 } elsif ( $foo < 1 ) { $mode = 0 } for ( $ii = 0 ; $ii < length($foobar) ; $ii++ ) { $a += 0.001; if ( $a > 360 ) { $a = 0 } $xbla = int( sin($a) * 10 ) + int( $xmax / 4 ); $ybla = int( cos($a) * 6 ) + int( $ymax / 2 ) - 1; $BLOAT[ $xbla + $ii ][$ybla] = substr( $foobar, $ii, 1 ); } $vieh_id++; if ( $vieh_id > 2 ) { $vieh_id = 1 } set_phreak( $x_vieh++, $ymax - 7, "vieh_" . $vieh_id ); if ( $x_vieh > $xmax + 6 ) { $x_vieh = -6 } draw(); select undef, undef, undef, $delay; } sub draw { for ( my $y = 0 ; $y < $ymax ; $y++ ) { $bloat = ""; if ( int( rand() * 5 ) == 1 ) { print $white} else { print $green} for ( my $x = 0 ; $x < $xmax ; $x++ ) { $bloat .= $BLOAT[$x][$y] || " "; $BLOAT[$x][$y] = " "; } print "$bloat\n"; } } sub set_phreak { my $xx, $yy; @t_vieh = @{ $_[2] }; $foo_name = "phreak_" . $mode; $count = scalar(@t_vieh); for ( $yy = 0 ; $yy < $count ; $yy++ ) { for ( $xx = 0 ; $xx < length( $t_vieh[$yy] ) ; $xx++ ) { $BLOAT[ $_[0] + $xx ][ $_[1] + $yy ] = substr( $t_vieh[$yy], $xx, 1 ); } } } sub init_phreak { @vieh_1 = ( "", " \\\\\\ .o( *yawn* )", " C()() ", " \\_^", " |", +" /\\", " / __", " \\ " ); @vieh_2 = ( " ///", " C()() .o( *yawn* )", " \\_^", " |", " /\\", " + _|", " \\" ); } sub quit { print "\e[0m$cls\n"; sleep 1; print "\n\t\t greetinx to all the geeks out there :) !\n$on\n"; exit; } |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: [bored] senseless amination
by Coruscate (Sexton) on Mar 18, 2003 at 20:15 UTC | |
Re: [bored] senseless amination
by photon (Novice) on Mar 18, 2003 at 18:18 UTC | |
Re: [bored] senseless amination
by photon (Novice) on Mar 18, 2003 at 23:11 UTC | |
Re: [bored] senseless amination
by sulfericacid (Deacon) on Mar 18, 2003 at 14:50 UTC |