The crazy “denziens” of have announced the new, sadistic challenge of writing a roguelike in less than 1KibiBytes of source code!

Here goes some samples, proceed to rgrd to see more and submit yours!:

LUCK by “yours truly” (Java)

import sz.csi.jcurses.JCursesConsoleInterface;public class X{static
int xr,yr,xp,yp,xs,ys,xo,yo,v,r,i,e=300,s;static boolean map[][]=new
boolean[20][20];static int r(){return (int)(Math.random()*19.0d);}public
static void main(String[] p){while (i < 20){map[r()][r()]=true;i++;}c.cls();
p(21,1,”Slash1KBRL - LUCK :)!”);o:while(true){if(xo==xp&yo==yp)
xr,map[xr][yr]?”#”:”.”);xr++;}yr++;}p(2,22,”L”+v+” R”+r+” E”+e+”  “);
p(xp,yp,”@”);p(xs,ys,”>”);p(xo,yo,”)”);switch(c.inkey().code){case 112:
yp–;break;case 108:yp++;break;case 90:xp–;break;case 93:xp++;
break;case 40:break o;}e–;if(e==0){p(2,23,”LOST”);break o;}if(v==20)
{s=10-r;if(s>0)p(2,23,”LOSER”);else p(2,23,”WON “+s);break o;}}}
static JCursesConsoleInterface c = new JCursesConsoleInterface();
static void p(int x,int y,String m){c.print(x, y, m);}}

Pink Warrior, by Jurgen Lerch

PROGRAM p;USES Graph;CONST c=319;l=199;f=15;VAR
n,u,v,x,y:SMALLINT;BEGIN x:=f;y:=30001;InitGraph(x,y,'');
FOR x:=0 TO c DO BEGIN d[x,0]:=f;d[x,l]:=f END;FOR y:=0 TO l DO BEGIN
d[0,y]:=f;d[c,y]:=f END;FOR n:=0 TO 3456 DO d[Random(c),Random(l)]:=f;
FOR n:=0 TO 11 DO BEGIN w[n]:=Random(c);z[n]:=Random(l) END;
FOR x:=0 TO c DO FOR y:=0 TO l DO PutPixel(x,y,d[x,y]);
x:=160;y:=100;PutPixel(x,y,13);REPEAT Read(k);PutPixel(x,y,0);
CASE k OF'8':IF d[x,y-1]<>f THEN DEC(y);'2':IF d[x,y+1]<>f THEN INC(y);
'4':IF d[x-1,y]<>f THEN DEC(x);'6':IF d[x+1,y]<>f THEN INC(x);
END;FOR n:=0 TO 11 DO IF(x=w[n])AND(y=z[n])THEN w[n]:=-1;
PutPixel(x,y,13);FOR n:=0 TO 11 DO BEGIN u:=w[n];v:=z[n];IF u>0 THEN
BEGIN PutPixel(u,v,0);CASE Random(4)OF 0:IF d[u,v-1]<>f THEN DEC(z[n]);
1:IF d[u,v+1]<>f THEN INC(z[n]);2:IF d[u-1,v]<>f THEN DEC(w[n]);
3:IF d[u+1,v]<>f THEN INC(w[n]);END;PutPixel(w[n],z[n],4);IF(w[n]=x)
AND(z[n]=y)THEN k:=#27;END END;UNTIL k=#27;CloseGraph;END.

Energon Absorber by Numeron

class M{static char m[][]=new char[10][10];static int 
k,X=5,Y=5,x,y,a,b,s,t,e=10;public static void main(String[] A)throws 
+;}System.out.println();}if(e!=0)System.out.println("t:"+t+"  e:"+e 
+"n");else System.out.println("U Win! t:"+t 

8 thoughts on “First

  1. I tried Pink Warrior, but there seem to be two small bugs (either here produced by the blog display or in the source itself): Instead of ‘ for delimiting strings, the one time a single ” (quotation mark is used) and another time two ´ ´ (accent markers). Don’t know if other Pascal dialects support this syntax, my FreePascal did not 😉


  2. Congratulations on knowing exactly what the Usenet is and how to access it. I was referring to the link posted. It was a mild suggestion to the author to offer a web link that didn’t need registration.


  3. Still, you dont need to log into the google usenet web-client to view posts and download code. I mildly suggest that you use your own usenet client instead if google is causing you problems.


  4. Thanks for the input. I’d rather not hunt down a free + working Usenet server and learn how to use a newsreader. In order to make this excellent contest more available to the general public there really should be a link to binaries via the web. That was my suggestion. No registration only groups or arcane forms of Internet use – just web links for the common man. Why keep this to the Usenet savvy? It’s a great idea for a contest. Just a little more effort on the original topics authors part is all I was suggesting.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s