In creating Saturn, I started with the program I wanted, then golfed it enough to fit into the required shape.
I'd like to reduce it further and thought it might make an interesting golf. There is a precedent for this: in 1971, Alan Shepard thought the moon might make an interesting golf.
OK, so it's probably not the most interesting of golfs and is certainly longer than most. Yet if it can be significantly shortened, that leaves more space to add more visual effects and so improve the Saturn obfu. I've no idea what new effects to add yet, so if you've got some cool ideas on that score, I'd love to hear about them.
I've prepared a standalone program below that weighs in at a whopping 491 strokes (excluding newlines). Update: Score is for code before __DATA__ only, you get the shape for free in this game. (To make testing less tedious, I've shortened the delays between shapes). It's recommended it be run in a console window at least 90 chars wide by 46 deep.
This program is way too fat. Can you help it lose some weight?
sub I{s-^-$"x$_[1]-gem;$/x$_[0].$_.$/} sub D{$~=pop;system($^O=~Win?CLS:"clear"),print, select$Z,$Z,$Z,$~for@_} sub R{$i=0;join$/,map{$j=0;join"",grep!($j++%$_[0]),/./g} grep!($i++%$_[0]),@S} $S=$_=do{local$/;<DATA>}; y---c>$-and$-=y---cfor@S=/.+/g;$_.=$"x-(y---c-$-)for@S; D(@X=(I(20,41,$_="."),I(20,41,$_=O),I(15,31,$_=R 4), I(13,28,$_=R 3),I(10,20,$_=R 2),$S),.3); D((map{$n=$_;join($/,map($_ x$n,R($_)=~/.+/g),"")x$_}2..4) [0..2,1,0],.2); D$S,join("",map(reverse.$/,@S)),.1for$%..5;D reverse(@X),.3 __DATA__ + '''''' + ''''''''''' ''' +'''''''''''' '''''' +''''''''''' ''''''''' +'''''''''' ''''''''''' +''''''''' ''''''''''''' +'''''''' ~~~~~~~~~~~~~ ''''''' '' +''''''' ~~~~~~~~~~~~~~~~~~~ '''' '' +'''''' ~~~~~~~~~~~~~~~~~~~~~~~~ ''' +'''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '''' +''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''''' +' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~~~~~~~~ ''~~~~~~~~~~~~~~~~~~~ ''' ~~~~~~~~~~~~~~~ '''''~~~~~~~~~~~~~~~~ ''' ~~~~~~~~~~~~~~~~ '''''' ~~~~~~~~~~~~~ ''' ~~~~~~~~~~~~~~~~~ ''''' ~~~~~~~~~~ ''' ~~~~~~~~~~~~~~~~~~ '''''' ~~~~~~ ''' ~~~~~~~~~~~~~~~~~~~~ ''''''' ~~ ''' ~~~~~~~~~~~~~~~~~~~~~ ''''''' '''' ~~~~~~~~~~~~~~~~~~~~~ ''''''''' ''''' ~~~~~~~~~~~~~~~~~~~~~~ '''''''''' ''''''''' ~~~~~~~~~~~~~~~~~ '''''''''''''''''''''' ~~~~~~~~~~ '''''''''''''''''''' '''''''''''''''''' '''''''''''''''' '''''''''''''' ''''''''''' ''''''
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Playing Golf on Saturn
by DrHyde (Prior) on Oct 15, 2004 at 09:01 UTC | |
by eyepopslikeamosquito (Archbishop) on Oct 15, 2004 at 09:39 UTC | |
|
Re: Playing Golf on Saturn (437)
by eyepopslikeamosquito (Archbishop) on Oct 17, 2004 at 02:06 UTC |