# Free your creativity - IOMBCC

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

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!

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

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.

(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.

```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!
```

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

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
```

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

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
```

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.

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