Add alt code to 1996/eldby - moves too fast now
For those who have any sensitivity to things zooming by (like me) or who also just thinks it goes by too fast with modern systems to truly enjoy (like me) there is now the alt version. This should help make it more like in the past but without tampering with the original code. See the README.md for how to reconfigure the default sleep time. Format fixes in README.md as well.
This commit is contained in:
1 parent
de1100d7db
commit
7dc35c0782
4 files changed
+36
-4
No files matched your search
@@ -1 +1,2 @@
|
||||
eldby
|
||||
eldby.alt
|
||||
+3
-3
@@ -58,7 +58,7 @@ ARCH=
|
||||
|
||||
# Defines that are needed to compile
|
||||
#
|
||||
CDEFINE=
|
||||
CDEFINE= -DZ=35000
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
@@ -114,8 +114,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
|
||||
|
||||
#################
|
||||
|
||||
+22
-1
@@ -20,7 +20,28 @@ make all
|
||||
|
||||
WARNING: on modern systems this is very fast and could be a problem for those
|
||||
susceptible to photosensitivity. Please try this one with caution if this
|
||||
applies to you! The same goes for people who can be overstimulated.
|
||||
applies to you! The same goes for people who can be overstimulated. See below
|
||||
for alternate version if you want to see it go slower or if seeing things move
|
||||
by too fast is a problem for you.
|
||||
|
||||
NOTE: to reset the sanity of your terminal after this program ends try `reset`.
|
||||
|
||||
|
||||
### Alternate code:
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) provided an alternate
|
||||
version which uses `usleep()` in between writing the output for those who are
|
||||
sensitive to text flashing by rapidly (it affects him too but he also thinks it
|
||||
moves too fast nowadays anyway). The default sleep duration is `35000` but you can
|
||||
change it at compilation like:
|
||||
|
||||
```sh
|
||||
make CFLAGS+="-DZ=20000" clobber alt
|
||||
```
|
||||
|
||||
Use `eldby.alt` as you would `eldby`.
|
||||
|
||||
Thank you Cody!
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
float s=1944,x[5],y[5],z[5],r[5],j,h,a,b,d,e;int i=33,c,l,f=1;int g(){return f=
|
||||
(f*6478+1)%65346;}m(){x[i]=g()-l;y[i]=(g()-l)/4;r[i]=g()>>4;}main(){char t[1948
|
||||
]=" `MYmtw%FFlj%Jqig~%`jqig~Etsqnsj3stb",*p=t+3,*k="3tjlq9TX";l=s*20;while(i<s)
|
||||
p[i++]='\n'+5;for(i=0;i<5;i++)z[i]=(i?z[i-1]:0)+l/3+!m();while(1){for(c=33;c<s;
|
||||
c++){c+=!((c+1)%81);j=c/s-.5;h=c%81/40.0-1;p[c]=37;for(i=4;i+1;i--)if((b=(a=h*x
|
||||
[i]+j*y[i]+z[i])*a-(d=1+j*j+h*h)*(-r[i]*r[i]+x[i]*x[i]+y[i]*y[i]+z[i]*z[i]))>0)
|
||||
{for(e=b;e*e>b*1.01||e*e<b*.99;e-=.5*(e*e-b)/e);p[c]=k[(int)(8*e/d/r[i])];}}for
|
||||
(i=4;i+1;z[i]-=s/2,i--)z[i]=z[i]<0?l*2+!m():z[i];while(i<s)putchar(t[i++]-5);usleep(Z);}}
|
||||
Reference in new issue
Block a user