Free your creativity - IOMBCC

Página 7/29
1 | 2 | 3 | 4 | 5 | 6 | | 8 | 9 | 10 | 11 | 12

Por NYYRIKKI

Enlighted (5976)

Imagen del NYYRIKKI

19-03-2005, 11:05

dvik: That worm game is really good looking! It's so small, hard to read and yet so well working. Congratulations! That prime number search routine is also weird!

Por dvik

Prophet (2200)

Imagen del dvik

19-03-2005, 11:18

Thanks nyyrikki. The worm game can be done a little bit shorter but I wanted to keep the quite ugly for loops (look at how the loop variables are used and also when the next statements are called). If I manage to get it down to six lines instad of seven I'll post a new version but it may be a bit tricky Wink

Your entries are very cool too. I like that you use a wider range of calls. It shows that you know msx basic really well.

Por NYYRIKKI

Enlighted (5976)

Imagen del NYYRIKKI

20-03-2005, 23:24

(anyone have any ideas on how to get rid of this one. I tried run but that clears the variables?)

I have a little idea... Thanx to your great explanation, I also took a liberty to make some minor changes in order to obfuscate it a bit more. Smile

1 ONERRORGOTO1:POKE-2373,0:PRINTCHR$(-30*(D<>0OR(X(1)-X(0))<>2))A:A=A-2*(D=0)-(A=0):X(0)=(D=0)-(D<>0)*X(0):X(1)=NOT(D<>0)*(X(1)+1):D=D-A*(D=0):X(-(D>0))=X(-(D>0))+2:D=D-SGN(D)*X(-(D>0)) IOMBCC ENTRY BY DVIK!

Por dvik

Prophet (2200)

Imagen del dvik

21-03-2005, 07:24

Nice enhancment NYYRIIKI Smile Using an array for the two square number iterators was a good idea which made the last calculation much more intersting.

Por dvik

Prophet (2200)

Imagen del dvik

21-03-2005, 07:25

I also have an update to the snake game. I finally manage to shrink it to 6 lines instead of 7:

1 SCREEN1:KEYOFF:FORR=0TO9:COLOR5,1,1:LOCATE8,11:PRINT" s to start":M=32:S=-10
2 IFINKEY$<>"s"THEN2ELSECLS:FORD=0TO737::D=D+(D+1AND2ANDD>MANDD<704)*15:F=6176
3 VPOKED+F,7:NEXT:H=6480:T=H-D:FORC=ATOF:S=S+10:L=F+RND(1)*D:IFVPEEK(L)-MTHEN3
4 Y=Y-10*(S>Y):R=3ANDASC(INKEY$+"C")+R+1:VPOKEL,15:U=M^(RAND1)*(1-(RAND2)):C=0
5 VPOKE2^13,6:VPOKEH-D,U+M:H=H+U:O=VPEEK(H):VPOKEH,9:IFO-MANDO-15THENR=0:NEXTR
6 LOCATE1,0:PRINT"SCORE"S,"HI"Y:IFO=15THEN3ELSEVPOKET+D,M:T=T+VPEEK(T)-M:GOTO4

Por NYYRIKKI

Enlighted (5976)

Imagen del NYYRIKKI

21-03-2005, 08:18

Just wondering... Does ASCII still need some BASIC listings to their magazine? We might have few suitable... Tongue

Por dvik

Prophet (2200)

Imagen del dvik

21-03-2005, 08:28

Just one little mistake on line 5. This is correct. Sorry


1 SCREEN1:KEYOFF:FORR=0TO9:COLOR5,1,1:LOCATE8,11:PRINT" s to start":M=32:S=-10
2 IFINKEY$<>"s"THEN2ELSECLS:FORD=0TO737::D=D+(D+1AND2ANDD>MANDD<704)*15:F=6176
3 VPOKED+F,7:NEXT:H=6480:T=H-D:FORC=ATOF:S=S+10:L=F+RND(1)*D:IFVPEEK(L)-MTHEN3
4 Y=Y-10*(S>Y):R=3ANDASC(INKEY$+"C")+R+1:VPOKEL,15:U=M^(RAND1)*(1-(RAND2)):C=0
5 VPOKE2^13,6:VPOKEH-D,U+M:H=H+U:O=VPEEK(H):VPOKEH,9:IFO-MANDO-15THENR=3:NEXTR
6 LOCATE1,0:PRINT"SCORE"S,"HI"Y:IFO=15THEN3ELSEVPOKET+D,M:T=T+VPEEK(T)-M:GOTO4

Por dvik

Prophet (2200)

Imagen del dvik

23-03-2005, 06:12

If anyone has some creativity left or maybe got inspired, the 2005 version of the International Obfuscated C Code Contest IOCCC just opened. So if you want to participate you can send in your obfuscated c code entries to www.ioccc.org before May22.

Por dvik

Prophet (2200)

Imagen del dvik

28-03-2005, 02:28

Entry: Rally-X
System: MSX1

I tried to make an MSX1 basic version of a rally game I did for IOCCC last year. I had to cut off a few features such as oponent cars in order to fit the size limits and I also had to prioritize code size in favor of speed but the result is quite decent anyway. You control the car with the joystick.

Let me know what you think.

1 DATA18,C,F,7,7,3,3,3,1,1,1,,,,,,,,,80,E0,F0,FC,5,5,5,5,5,5,5,5,5,,,,,,,,,80,E0,F0,F8,FC,9,9,5,,,,,,,,,,,,,,,,,3F,3F,3F,3F,3F,3F,B,B,B,B,B,B,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,F0,F8,FC,9,5,5,5,5,5,5,5,5,5,5,5,5,,,,,,80,C0,E0,F0,F0,F8
2 DATAFC,9,9,5,5,,,,,,,,,,,,,,,,,1,1,3,3,7,7,F,F,1F,1F,3F,3F,B,B,5,5,80,80,C0,C0,E0,E0,F0,F0,F8,F8,FC,FC,9,9,5,5,,,,,,,,,,,,,,,,,1,1,3,3,7,7,F,F,1F,1F,3F,3F,B,B,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,80,80,C0
3 DATAC0,E0,E0,F0,F0,F8,F8,FC,FC,9,9,5,5,,,,,,,,,,,,,,,,,,,,,,,,,1,7,F,1F,3F,B,B,5,,,,1,7,F,3F,5,5,5,5,5,5,5,5,5,18,30,F0,E0,E0,C0,C0,C0,80,80,80,,,,,,,,,,,1,3,7,F,F,1F,3F,B,B,5,5,F,1F,3F,B,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
4 DATA5,5,5,FC,FC,FC,FC,FC,FC,9,9,9,9,9,9,5,5,5,5,,,,,,,,1F,20,40,B,CF,CF,B,30,30,,,,,,,,C0,20,10,F0,98,98,F0,60,60,18,17,16,0,17,1,16,8,0,17,9,1:DEFINTA-Z:SCREEN1,3:KEYOFF:FORI=0TO415:READS$:Y=VAL("&H"+S$):X=112:V=14:COLOR,5,1:VPOKE8192,V
5 VPOKE14336+I,Y-250*(Y=5)-245*(Y=9)-116*(Y=11):NEXT:FORI=0TO11:READF:FORH=0TO31:VPOKE6528+H+I*32,(I<8ORH80ANDX<152):X=X+6*((X>152)-(X<80)):GOTO7
9 J=1-J*(J<6):FORI=STO9:VPOKEA,P(J):VPOKEA+1,P(J+1):VPOKEA+2,P(J+2):NEXT:RETURN

Por Vampier

Prophet (2402)

Imagen del Vampier

28-03-2005, 02:57

you damn basic maniac this is one of the coolest basic things I've seen until now Big smile

Página 7/29
1 | 2 | 3 | 4 | 5 | 6 | | 8 | 9 | 10 | 11 | 12