Add preview of 1984-2019

The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.

One will find HTML commented out with:

    <!-- XXX remove when 2020 is ready
    2020 links here
    XXX remove when 2020 is ready -->

The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks.  Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known.  The following files
have such HTML comment blocks in them.

    ./winners.html
    ./years-spoiler.html
    ./years.html

In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.

The 2020 winner code AND write-ups are NOT part of this set.

p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
Landon Curt Noll committed 2020-12-30 16:57:03 -08:00
1 parent 28efc67f5d
commit c0663537cb
1683 files changed
+220064

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
LDFLAGS+=-lGL -lGLU -L${X11_LIBDIR} -lX11
build: vince
clean:
clobber:
-rm vince vince.improved
vince: vince.c
${CC} ${CFLAGS} -I${X11_INCLUDEDIR} ${LDFLAGS} $< -o $@
alt: vince.improved
vince.improved: vince.improved.c
${CC} ${CFLAGS} -I${X11_INCLUDEDIR} ${LDFLAGS} $< -o $@
data:
+98
View File
@@ -0,0 +1,98 @@
# Most beauteous visuals
Vincent Weaver
Ithaca, NY
USA
vince@deater.net
<http://www.deater.net/weave/>
## Judges' comments
This beauteous entry makes use of visual {}'s and whitespace to instruct
the OpenGL development libraries to create beauteous visuals. Even
hitting the space bar while the program runs produces a "spacey" effect! :-)
Challenge: Try modifying the texture to something of your own design.
## Improved Version
This following improved version of the submission will run on SGI Irix and
also has the recursive CPP macro (which snuck in accidentally) removed.
### To build
Before building, make sure that you have the OpenGL development libraries
installed.
cc -Wall -O2 -o vince vince.c -L/usr/X11R6/lib -lGL -lGLU -lX11
If you are on a 64 bit platform you might need to substitute `-L/usr/X11R6/lib64`.
### To run
vince
Under MacOSX run from within an xterm while the X11 server is running.
## Author's comments
### ABUSE OF RULES
* The executable needs to read in its own source code in order to run. As
long as the source is in the same directory as the executable it should be
able to find it...
* The program requires the OpenGL library.
* The program abuses severely the whitespace and { } ; exceptions in the
filesize limits.
### Requirements
* OpenGL. It works (slowly) with Mesa.
* 16bpp graphics capability (but might work at other depths)
* The original source needs to be in the same directory as the executable,
and the source's name should be the same as the executable but with .c on the
end.
### Background
I was annoyed after the last IOCCC because I slaved away on a clever text
based game only to find all of the game winners used X11. X11 isn't standard
C!
So to one up them, I decided to use OpenGL. It's standard, and most Unix-like
systems these days have either accelerated graphics or else software
rendering.
### Obfuscation
It was a challenge getting the source code below the 2k limit. OpenGL has way
too many GRATUITOUSLY_LONG_CONSTANTS and glLongStudlyFunctionNames();
Therefore, much of the obfuscation comes secondary to just reducing the code
size to fit under the limit while still having some semblance of a demo.
There are some interesting abuses scattered about.
### Usage
Try hitting the spacebar when the program is running.
### For Fun
Try modifying the texture to your own custom design...
### Thanks
Many thanks to John Clemens for testing this on various machines for me.
### Errors you can get
0 = no error
1 = X problem
2 = Can't open glx
3 = Can't open 16bpp visual
4 = can't open source file
+90
View File
@@ -0,0 +1,90 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <GL/glx.h>
#include <GL/glu.h>
#define E(x) { printf("%i\n",x); goto l; }
#define G fgetc(F)
#define H glEnable(
#define I glMaterialfv(GL_FRONT,
#define J glMatrixMode(
#define L (y
#define M 640,480
#define N NULL
#define O GL_DIFFUSE , i
#define P glCallList(u);
#define T glTexCoord2i
#define U glLightfv(GL_LIGHT0,
#define V R(); glVertex3i(c,m,n);
#define X GL_TEXTURE_2D
#define Z(x) G; x=G; x=x<50-(x==59);
void Y()
{ { { { { { { { { { { { { { { {
{ { { { { { { { { { {
{ { { { { {
{ { { { { { { {
{ { { { { {
{ { { { { ; { } } } } }
} } } } } } }
} } } } } }
} } } } } }
} } } } } }
} } } } } } }
} } } } } } } } } } } } } } } }
void Q()
{ { ; { { { { { { { {
{ { { { { {
{ { { { { {
; { { } } } } } } } }
} ; } } } } } } } } }
} } } } } }
FILE *F; int u,t,l,m,n,x=0,a=0,b[]={ GLX_DOUBLEBUFFER,
GLX_RGBA , GLX_DEPTH_SIZE , 16, None},o,n,c ; void R() {
Z(c); Z(m); Z(n); } int main( int _, char **A) { char f[
BUFSIZ ] ; GLXContext r ; XVisualInfo * v ; Display *y;
XEvent e ; GLfloat g=0, h=10, i[ ]= { 1,1, 1, 1, 5,5, 100
,0, .6, .6, .6 ,1 } ; XSetWindowAttributes s; GLubyte j[1
<<10] ; Window w; if(! L= XOpenDisplay ( N ) ) ) E(1) ;if
( !
glXQueryExtension L , N , N ) ) E (2); v=glXChooseVisual L ,
DefaultScreen (y ) , b ) ; s.colormap = XCreateColormap L ,
RootWindow (y,v -> screen), v -> visual, AllocNone ); if (!(
r= glXCreateContext L, v, N, 1) ) ) E (3) ; strcpy(f, *A ) ;
s.event_mask=KeyPressMask; strcat(f,".c"); F=fopen(f,"r" ) ;
w= XCreateWindow L, RootWindow( y, v -> screen ), M , M, 0,v
->depth,InputOutput, v->visual , CWColormap|CWEventMask, &s)
;glXMakeCurrent L , w , r ); H GL_DEPTH_TEST ); if ( ! F )E(
4 ) ; glShadeModel ( GL_SMOOTH ) ; while ( a != 89 ) a = G ;
G; G ; glGenTextures( 1, & t ); while ( x< 1024 ) { G; a =G;
j[ x++ ] = 128; j[ x++ ] = 128 & - ( a<33 ); j [ x ]= j[ x-1
]; x++; j[x++] =-1;} glBindTexture(X,t); glTexParameteri (X,
GL_TEXTURE_MIN_FILTER , GL_NEAREST ) ; glTexImage2D( X ,0,
GL_RGBA, 16 , 16 , 0 , GL_RGBA, GL_UNSIGNED_BYTE , j ) ; J
GL_PROJECTION ) ; gluPerspective( 60 , 1.333 , 1 , 100) ; J
GL_MODELVIEW); u=glGenLists(1); glNewList(u,GL_COMPILE); H X
) ; while ( a != 81 ) a = G ; G ; G ; for (x=0; x<6; x++ ) {
glBegin(GL_QUADS); R(); glNormal3f( c, m,n); T(1,1); V T (1,
0 ) ; V T ( 0 , 0 ) ; V T( 0 , 1 ) ; V glEnd ( ) ; }
glEndList( ) ; XMapWindow L , w ) ; c = 0; for ( ; ; ) { if(
XPending L ) ) { XNextEvent L , &e ) ; if((XLookupKeysym ( (
XKeyEvent *)&e,0))&1<<5){ h=10; i[c]=!i[c]; c++; c&=3; } else
E(0)} glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
glLoadIdentity(); gluLookAt ( -2 ,0 ,5 ,0,0 ,0,0 ,0 ,1 ) ; H
GL_LIGHTING); H GL_LIGHT0 ); U GL_POSITION, i + 4); U O) ; U
GL_SPECULAR,i); glLightModelfv( GL_LIGHT_MODEL_AMBIENT,i +8)
; I GL_AMBIENT, i+8); I O + 8 ) ; glRotatef( g, 1, 1, 1) ; P
glTranslatef(-h,0,0); P usleep (4000); g+=.07*x; if (g>360)
g-=360.0; h-=x /100.0; glFlush(); glXSwapBuffers L ,w);}
l:
return 0;
}
+88
View File
@@ -0,0 +1,88 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <GL/glx.h>
#include <GL/glu.h>
#define E(x) { printf("%i\n",x); goto l; }
#define G fgetc(F)
#define H glEnable(
#define I glMaterialfv(GL_FRONT,
#define J glMatrixMode(
#define L (y
#define N NULL
#define O GL_DIFFUSE , i
#define P glCallList(u);
#define T glTexCoord2i
#define U glLightfv(GL_LIGHT0,
#define V R(); glVertex3i(c,m,n);
#define X GL_TEXTURE_2D
void Y()
{ { { { { { { { { { { { { { { {
{ { { { { { { { { { {
{ { { { { {
{ { { { { { { {
{ { { { { {
{ { { { { ; { } } } } }
} } } } } } }
} } } } } }
} } } } } }
} } } } } }
} } } } } } }
} } } } } } } } } } } } } } } }
void Q()
{ { ; { { { { { { { {
{ { { { { {
{ { { { { {
; { { } } } } } } } }
} ; } } } } } } } } }
} } } } } }
FILE* F; void Z (int* x) { G; *x=G; *x=*x<50- (*x==59); }
int u,t,l,m,n,x=0, a=0,b[]={ GLX_DOUBLEBUFFER, GLX_RGBA ,
GLX_DEPTH_SIZE,16, None},o,n,c; void R() { Z(&c); Z(&m );
Z(&n ) ; } int main( int _, char **A) { char f [BUFSIZ ] ;
GLXContext r; XVisualInfo* v ; Display *y; GLfloat g=0 ,h=
10, i[]= { 1,1, 1,1, 5,5, 100, 0, .6,.6,.6,1 } ; XEvent e ;
XSetWindowAttributes s; GLubyte j[ 1<<10] ; Window w,u; if(
! L
=XOpenDisplay ( N ) ) ) E( 1 ) ; if ( ! glXQueryExtension L,N
,N ) ) E( 2 ) ; v = glXChooseVisual L , DefaultScreen (y ),b
); s. colormap = XCreateColormap L , u = RootWindow ( y , v->
screen),v->visual, AllocNone ); if ( !(r=glXCreateContext L,v
,N , 1 ) ) ) E ( 3 ) ; strcpy (f , * A) ; strcat (f, ".c" ) ;
F = fopen ( f , "r" ) ; s . event_mask = KeyPressMask ; w =
XCreateWindow L,u, 0,0,640, 480,0,v -> depth, InputOutput , v
-> visual , CWBorderPixel | CWColormap | CWEventMask ,& s);
glXMakeCurrent L , w , r ) ; H GL_DEPTH_TEST ) ; if ( ! F )E(
4 ) ; glShadeModel ( GL_SMOOTH ) ; while ( a != 89 ) a = G ;
G; G ; glGenTextures( 1, & t ) ; while ( x< 1024 ) { G; a =G;
j[ x++ ] = 128; j[ x++ ] = 128 & - ( a<33 ); j [ x ]= j [ x-1
]; x++; j[x++] = -1;} glBindTexture(X,t); glTexParameteri (X,
GL_TEXTURE_MIN_FILTER , GL_NEAREST ) ; glTexImage2D ( X ,0,
GL_RGBA, 16 , 16 , 0 , GL_RGBA, GL_UNSIGNED_BYTE , j ) ; J
GL_PROJECTION ) ; gluPerspective ( 60 , 1.333 , 1 , 100) ; J
GL_MODELVIEW); u=glGenLists(1); glNewList (u,GL_COMPILE); H X
); while(a!=81)a=G; G;G;for(x=0;x<6;x++){glBegin(GL_QUADS ) ;
R(); glNormal3f(c,m,n); T(1,1); V T(1,0); V T(0,0); V T(0 ,1)
; V glEnd(); } glEndList(); XMapWindow L, w) ; c=0; for(; ; )
{ if (XPending L)){ XNextEvent L, &e); if ((XLookupKeysym ( (
XKeyEvent *)&e,0))&1<<5){ h=10; i[c] =!i[c]; c++; c&=3; } else
E(0) } glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
glLoadIdentity (); gluLookAt ( -2 ,0 ,5 ,0,0 ,0,0 ,0 ,1 ) ; H
GL_LIGHTING); H GL_LIGHT0 ); U GL_POSITION, i + 4 ); U O) ; U
GL_SPECULAR, i); glLightModelfv( GL_LIGHT_MODEL_AMBIENT,i +8)
; I GL_AMBIENT, i+8 ); I O + 8 ) ; glRotatef( g, 1, 1, 1) ; P
glTranslatef (-h,0,0); P usleep (4000); g+=.07*x; if (g > 360)
g-=360.0; h-=x / 100.0; glFlush () ; glXSwapBuffers L, w); }
l:
return 0;
}