Free your creativity - IOMBCC (Development MSX Forum)MSX Resource Center MSX Info Update - Finnish MSX madness at its best              
              
English Nederlands Español Português Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 163 guests and 3 MSX friends online

You are an anonymous user.
 

MSX Forum


MSX Forum

Development - Free your creativity - IOMBCC

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 Next Page )
Author

Free your creativity - IOMBCC

dvik
msx master
Posts: 1286
Posted: April 05 2005, 08:46   
Ok, Now I have something that is working pretty well. I was able to optimize
the Rally game a bit more and make it run smother and I made it a bit harder
to play. I also added a nice ending.

I think this one could be the final version unless NYYRIKKI or someone else
finds something more cool to add or there are some bugs I haven't seen yet.


1 DEFINTA-Z:V=014:S$(0)="A18A0CA0FB07C03C01H00A80AE0AF0AFCIFFH00A80AE0AF0AF8AFCBFEAFFP00F3FF7FTFFAF0AF8AFCAFELFFE00A80AC0AE0BF0AF8AFCBFEBFFP00B01B03B07B0FB1FB3FB7FBFFB80BC0BE0BF0BF8BFCBFEBFFP00B01B03B07B0FB1FB3FB7FbFFB80BC0BE0BF0BF8BFCBFE"
2 COLOR15,5,1:X=V:S$(1)="BFFX00A01A07A0FA1FA3FB7FAFFC00A01A07A0FA3FIFFA18A30AF0BE0CC0C80J00A01A03A07B0FA1FA3FB7FBFFA0FA1FA3FA7F\FFFFCFFEDFFG00A1FA20A40A7FBCFA7FB70G00AC0A20A10AF0B98AF0B70J00A0FA10A1FA2FA1FA19K00B80A40B80L00A06A0FA09_00A03"
3 J=S-J*(J<96-S):H=J\16:FORW=0TO2:VPOKE8208+W,P(H+W):NEXT:IFTTHENRESUMENEXTELSEKEYOFF:SCREEN1,3,0:LOCATE8,1:PRINT"PLEASE WAIT!":FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I):VPOKEI,(OORO/2)/(2-(IAND4)\4):NEXT:TIME=--0:FORW=0TO1:FORO=1TO212STEP3
4 Q=ASC(MID$(S$(W),O,1))-65:Y=VAL("&H"+MID$(S$(W),O+1,2)):N=14336:FORA=ATOA+Q:VPOKEA+N,Y:NEXT:NEXT:PUTSPRITE8+W,(80+64*W,159),V,6+W:NEXT:ONERRORGOTO3:FORO=1TO12:FORH=0TO31:VPOKE6496+H+O*32,(O<9ORH<VORH>17)*(ASC(MID$("ABCSBRCKSBJR",O))-211)
5 NEXT:P(-O*(O<9))=50-15*(O/3AND1):NEXT:FORI=ITO1167:VPOKEI,(8ANDI)*255\8:VPOKE2335-I,(4ANDI)*255\4:NEXT:VPOKE8192,V:SOUND3,V:SOUND8,V:FORT=7TON/2:IF:PUTSPRITE0,(X+80,156),1,12:M=(X>72)-(X<0):SOUND1,83:F=B:B:IFC<TTHENC=V+T+TMOD99:B=CMOD3-1
6 S=S-(S<18ANDSTRIG(0))*2+(S>0):S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):-:T=T+S-1:X=X+5*(M+(U=7)-(U=3))-S*B\4:LOCATE1,1:SOUND9,V:SOUND0,225-S*9:E=NAND128:8:FORW=3TO4:PUTSPRITEW+1,(F*10+W*32,95),V,4*B+W+1:PUTSPRITE3+W,(W*32,127),V,4*F+3+W:NEXT:T
7 N=N+9-S:D=96-(NAND127):Y=D>0:D=D*D/96:PUTSPRITE1,(115-(D<34)*((24-D)*B+F*10)+(E-64)*D/225,-Y*(98+D)-31),6,16-D/24:I:U=STICK(0):PRINTUSING"SPEED:####kmh     RANK:###";S*10;(N-65)/128-82:NEXT:A$=SPACE$(V):A=TIME\60:PUTSPRITE1,,0:FORN=0TO99
8 S=16:D=88-3*N:Y=D>0:U=Y*(N\6-V):SOUND8,U:SOUND9,U:PUTSPRITE0,(116-(D<58)*((24-D*D/96)*B+F*10)+(X-36)*D/126,-Y*(98+D)-31),1,16+Y*D/24:LOCATE6,4:PRINTMID$(A$+"Game Over   Time ="+STR$(TIME\60)+"s"+A$,N\2MOD42+1,16):IOMBCC 2005:NEXT:SCREENY

NYYRIKKI
online
msx master
Posts: 1467
Posted: April 05 2005, 18:13   
That end demo was looking so great, that I even extended the lenght a bit! The on error goto idea was also brilliant! How ever there was a tiny bug in the time thing:

1 DEFINTA-Z:V=14:S$(0)="A18A0CA0FB07C03C01H00A80AE0AF0AFCIFFH00A80AE0AF0AF8AFCBFEAFFP00F3FF7FTFFAF0AF8AFCAFELFFE00A80AC0AE0BF0AF8AFCBFEBFFP00B01B03B07B0FB1FB3FB7FBFFB80BC0BE0BF0BF8BFCBFEBFFP00B01B03B07B0FB1FB3FB7FbFFB80BC0BE0BF0BF8BFCBFE"
2 COLOR15,5,1:X=V:S$(1)="BFFX00A01A07A0FA1FA3FB7FAFFC00A01A07A0FA3FIFFA18A30AF0BE0CC0C80J00A01A03A07B0FA1FA3FB7FBFFA0FA1FA3FA7F\FFFFCFFEDFFG00A1FA20A40A7FBCFA7FB70G00AC0A20A10AF0B98AF0B70J00A0FA10A1FA2FA1FA19K00B80A40B80L00A06A0FA09_00A03"
3 J=S-J*(J<96-S):H=J\16:FORW=0TO2:VPOKE8208+W,P(H+W):NEXT:IFTTHENRESUMENEXTELSEKEYOFF:SCREEN1,3,0:LOCATE8,1:PRINT"PLEASE WAIT!":FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I):VPOKEI,(OORO/2)/(2-(IAND4)\4):NEXT:TIME=--0:FORW=0TO1:FORO=1TO212STEP3
4 Q=ASC(MID$(S$(W),O,1))-65:Y=VAL("&H"+MID$(S$(W),O+1,2)):N=14336:FORA=ATOA+Q:VPOKEA+N,Y:NEXT:NEXT:PUTSPRITE8+W,(80+64*W,159),V,6+W:NEXT:ONERRORGOTO3:FORO=1TO12:FORH=0TO31:VPOKE6496+H+O*32,(O<9ORH<VORH>17)*(ASC(MID$("ABCSBRCKSBJR",O))-211)
5 NEXT:P(-O*(O<9))=50-15*(O/3AND1):NEXT:FORI=ITO1167:VPOKEI,(8ANDI)*255\8:VPOKE2335-I,(4ANDI)*255\4:NEXT:VPOKE8192,V:SOUND3,V:SOUND8,V:FORT=7TON/2:IF:PUTSPRITE0,(X+80,156),1,12:M=(X>72)-(X<0):SOUND1,83:F=B:B:IFC<TTHENC=V+T+TMOD99:B=CMOD3-1
6 S=S-(S<18ANDSTRIG(0))*2+(S>0):S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):-:T=T+S-1:X=X+5*(M+(U=7)-(U=3))-S*B\4:LOCATE2,1:SOUND9,V:SOUND0,225-S*9:E=NAND128:8:FORW=3TO4:PUTSPRITEW+1,(F*10+W*32,95),V,4*B+W+1:PUTSPRITE3+W,(W*32,127),V,4*F+3+W:NEXT:T
7 N=N+9-S:D=96-(NAND127):Y=D>0:D=D*D/96:PUTSPRITE1,(115-(D<34)*((24-D)*B+F*10)+(E-64)*D/225,-Y*(98+D)-31),6,16-D/24:I:U=STICK(0):PRINTUSING"SPEED:###kmh    RANK:###";S*10;(N-65)/128-82:NEXT:A$=SPACE$(V):A=TIME\60:PUTSPRITE1,,0:FORN=0TO244
8 S=16:D=88-3*N:Y=D>0:U=Y*(N\6-V):SOUND8,U:SOUND9,U:PUTSPRITE0,(116-(D<58)*((24-D*D/96)*B+F*10)+(X-36)*D/126,-Y*(98+D)-31),1,16+Y*D/24:LOCATE6,4:PRINTMID$(A$+"Game Over   Time ="+STR$(A)+"s"+A$,N\2MOD42+1,15):IOMBCC 2005:NEXT:SCREENY


As Manuel already pointed out the time is still going wrong even after the fix in 50Hz machines. To fix that, we should make a=time\(60-(peek(43)\128)*10) to fit in there... I'll try to experiment with the sprite data, if I'll get enough time from somewhere, but I think, that it is starting to get quite a ready.


snout

msx legend
Posts: 4987
Posted: April 05 2005, 18:23   
Holy crap, this is crazy. turboR owners: just look at that blazing speed on R800 ^_^

BASIC slow? PAH!
dvik
msx master
Posts: 1286
Posted: April 05 2005, 20:39   
I did some speed improvments to speed it up a little. It may need some fine tuning though (I don't really think it was needed on TR machines though ).

I'll also try to find space to get the 50/60Hz switch in.

1 DEFINTA-Z:V=14:S$(0)="A18A0CA0FB07C03C01H00A80AE0AF0AFCIFFH00A80AE0AF0AF8AFCBFEAFFP00F3FF7FTFFAF0AF8AFCAFELFFE00A80AC0AE0BF0AF8AFCBFEBFFP00B01B03B07B0FB1FB3FB7FBFFB80BC0BE0BF0BF8BFCBFEBFFP00B01B03B07B0FB1FB3FB7FbFFB80BC0BE0BF0BF8BFCBFE"
2 COLOR15,5,1:X=V:S$(1)="BFFX00A01A07A0FA1FA3FB7FAFFC00A01A07A0FA3FIFFA18A30AF0BE0CC0C80J00A01A03A07B0FA1FA3FB7FBFFA0FA1FA3FA7F\FFFFCFFEDFFG00A1FA20A40A7FBCFA7FB70G00AC0A20A10AF0B98AF0B70J00A0FA10A1FA2FA1FA19K00B80A40B80L00A06A0FA09_00A03"
3 J=S-J*(J<96-S):H=J\16:FORW=0TO2:VPOKE8208+W,P(H+W):NEXT:IFTTHENRESUMENEXTELSEKEYOFF:SCREEN1,3,0:LOCATE8,1:PRINT"PLEASE WAIT!":FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I):VPOKEI,(OORO\2)\(2-(IAND4)\4):NEXT:TIME=--0:FORW=0TO1:FORO=1TO212STEP3
4 Q=ASC(MID$(S$(W),O,1))-65:Y=VAL("&H"+MID$(S$(W),O+1,2)):N=14336:FORA=ATOA+Q:VPOKEA+N,Y:NEXT:NEXT:PUTSPRITE8+W,(80+64*W,159),V,6+W:NEXT:ONERRORGOTO3:FORO=1TO12:FORH=0TO31:VPOKE6496+H+O*32,(O<9ORH<VORH>17)*(ASC(MID$("ABCSBRCKSBJR",O))-211)
5 NEXT:P(-O*(O<9))=50-15*(O\3AND1):NEXT:FORI=ITO1167:VPOKEI,(8ANDI)*255\8:VPOKE2335-I,(4ANDI)*255\4:NEXT:VPOKE8192,V:SOUND3,V:SOUND8,V:FORT=7TON\2:IF:PUTSPRITE0,(X+80,156),1,12:M=(X>72)-(X<0):SOUND1,83:F=B:B:IFC<TTHENC=V+T+TMOD99:B=CMOD3-1
6 S=S-(S<18ANDSTRIG(0))*2+(S>0):S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):-:T=T+S-1:X=X+5*(M+(U=7)-(U=3))-S*B\4:LOCATE2,1:SOUND9,V:SOUND0,225-S*9:E=NAND128:8:FORW=3TO4:PUTSPRITEW+1,(F*10+W*32,95),V,4*B+W+1:PUTSPRITE3+W,(W*32,127),V,4*F+3+W:NEXT:T
7 N=N+9-S:D=96-(NAND127):Y=D>0:D=D*D\96:PUTSPRITE1,(115-(D<34)*((24-D)*B+F*10)+(E-64)*D\225,-Y*(98+D)-31),6,15-D\24:I:U=STICK(0):PRINTUSING"SPEED:###kmh    RANK:###";S*10;(N-65)\128-82:NEXT:A$=SPACE$(V):A=TIME\60:PUTSPRITE1,,0:FORN=0TO244
8 S=16:D=88-3*N:Y=D>0:U=Y*(N\6-V):SOUND8,U:SOUND9,U:PUTSPRITE0,(116-(D<58)*((24-D*D\96)*B+F*10)+(X-36)*D\126,-Y*(98+D)-31),1,15+Y*D\24:LOCATE6,4:PRINTMID$(A$+"Game Over   Time ="+STR$(A)+"s"+A$,N\2MOD42+1,15):IOMBCC 2005:NEXT:SCREENY

dvik
msx master
Posts: 1286
Posted: April 06 2005, 05:12   
I found some more characters and added the time on 50Hz machines.
I also made the time with one decimal to make it a bit more interesting.
Then I added an extra line in the horizon to make it look more distant.

1 DEFINTA-Y:V=14:S$(O1)="A18A0CA0FB07C03C01H00A80AE0AF0AFCIFFH00A80AE0AF0AF8AFCBFEAFFP00F3FF7FTFFAF0AF8AFCAFELFFE00A80AC0AE0BF0AF8AFCBFEBFFP00B01B03B07B0FB1FB3FB7FBFFB80BC0BE0BF0BF8BFCBFEBFFP00B01B03B07B0FB1FB3FB7FbFFB80BC0BE0BF0BF8BFCBFE"
2 COLOR15,5,1:X=V:S$(1)="BFFX00A01A07A0FA1FA3FB7FAFFC00A01A07A0FA3FIFFA18A30AF0BE0CC0C80J00A01A03A07B0FA1FA3FB7FBFFA0FA1FA3FA7F\FFFFCFFEDFFG00A1FA20A40A7FBCFA7FB70G00AC0A20A10AF0B98AF0B70J00A0FA10A1FA2FA1FA19K00B80A40B80L00A06A0FA09_00A03"
3 J=S-J*(J<96-S):K=J\16:FORW=0TO2:VPOKE8208+W,P(W+K):NEXT:IFTTHENRESUMENEXTELSEKEYOFF:SCREEN1,3,0:LOCATE8,1:PRINT"PLEASE WAIT!":FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I):VPOKEI,(OORO\2)\(2-(IAND4)\4):NEXT:SOUND3,V:FORW=0TO1:FORO=1TO212STEP3
4 Q=ASC(MID$(S$(W),O,1))-65:Y=VAL("&H"+MID$(S$(W),O+1,2)):N=14336:FORA=ATOA+Q:VPOKEA+N,Y:NEXT:NEXT:PUTSPRITE8+W,(80+64*W,159),V,6+W:NEXT:ONERRORGOTO3:FORR=1TO12:FORH=0TO31:VPOKE6496+H+R*32,(R<9ORH<VORH>17)*(ASC(MID$("ABCSBRCKSBJR",R))-211)
5 P(H\4)=50-15*(H\12AND1):NEXT:NEXT:FORI=ITO1168:VPOKEI-(I=1168),(8ANDI)*255\8:VPOKE8+I,(4AND7-I)*255\4:NEXT:VPOKE8192,V:TIME=0:SOUND8,V:R=N\2:FORT=7TOR:R:FORW=3TO4:PUTSPRITEW+1,(F*10+W*H,95),V,4*B+W+1:PUTSPRITE3+W,(W*H,127),V,4*F+3+W:NEXT
6 IF:T=T+S-1:PUTSPRITE1,(115-(D<34)*((24-D)*B+F*10)+(E-64)*D\225,-Y*(98+D)-31),-6*(T<R),15-D\25:OR:M=(X>72)-(X<0):SOUND0,O-S*9:S=S-(S<18ANDSTRIG(0))*2+(S>0):S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):E=NAND128:F=B:B:IFC<TTHENC=V+T+TMOD99:B=CMOD3-1
7 SOUND9,V:X=X+5*(M+(U=7)-(U=3))-S*B\4:LOCATE1,1:8:N=N+9-S:TO:PUTSPRITE0,(X+80,156),1,12:SOUND1,83:D=96-(NAND127):Y=D>0:D=D*D\96:U=STICK(0):.:PRINTUSING"SPEED:###kmh    RANK:###";S*10;N\128-82:NEXT:Z$=SPACE$(V):Z=(TIME\(6-PEEK(43)\128))/10
8 FORN=0TO244:D=88-3*N:S=16:U=Y*(N\6-V):Y=D>0:SOUND8,U:SOUND9,U:PUTSPRITE0,(116-(D<58)*((21-D*D\96)*B+F*10)+(X-36)*D\126,-Y*(98+D)-31),1,15+Y*D\24:LOCATE6,4:PRINTMID$(Z$+"Race Over   Time ="+STR$(Z)+"s"+Z$,N\2MOD42+1,15):NEXTI:NEXT:SCREENY


dvik
msx master
Posts: 1286
Posted: April 06 2005, 06:21   
I didn't check but . expands to 0! which made line 7 too long. So I fixed that and
also a sound bug at startup. Here is an update:

1 DEFINTA-Y:V=14:S$(O1)="A18A0CA0FB07C03C01H00A80AE0AF0AFCIFFH00A80AE0AF0AF8AFCBFEAFFP00F3FF7FTFFAF0AF8AFCAFELFFE00A80AC0AE0BF0AF8AFCBFEBFFP00B01B03B07B0FB1FB3FB7FBFFB80BC0BE0BF0BF8BFCBFEBFFP00B01B03B07B0FB1FB3FB7FbFFB80BC0BE0BF0BF8BFCBFE"
2 COLOR15,5,1:X=V:S$(1)="BFFX00A01A07A0FA1FA3FB7FAFFC00A01A07A0FA3FIFFA18A30AF0BE0CC0C80J00A01A03A07B0FA1FA3FB7FBFFA0FA1FA3FA7F\FFFFCFFEDFFG00A1FA20A40A7FBCFA7FB70G00AC0A20A10AF0B98AF0B70J00A0FA10A1FA2FA1FA19K00B80A40B80L00A06A0FA09_00A03"
3 J=S-J*(J<96-S):K=J\16:FORW=0TO2:VPOKE8208+W,P(W+K):NEXT:IFTTHENRESUMENEXTELSEKEYOFF:SCREEN1,3,0:LOCATE8,1:PRINT"PLEASE WAIT!":FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I):VPOKEI,(OORO\2)\(2-(IAND4)\4):NEXT:SOUND3,V:FORW=0TO1:FORO=1TO212STEP3
4 Q=ASC(MID$(S$(W),O,1))-65:Y=VAL("&H"+MID$(S$(W),O+1,2)):N=14336:FORA=ATOA+Q:VPOKEA+N,Y:NEXT:NEXT:PUTSPRITE8+W,(80+64*W,159),V,6+W:NEXT:ONERRORGOTO3:FORR=1TO12:FORH=0TO31:VPOKE6496+H+R*32,(R<9ORH<VORH>17)*(ASC(MID$("ABCSBRCKSBJR",R))-211)
5 P(H\4)=50-15*(H\12AND1):NEXT:NEXT:FORI=ITO1168:VPOKEI-(I=1168),(8ANDI)*255\8:VPOKE8+I,(4AND7-I)*255\4:NEXT:VPOKE8192,V:TIME=0:SOUND9,V:R=N\2:FORT=7TOR:R:FORW=3TO4:PUTSPRITEW+1,(F*10+W*H,95),V,4*B+W+1:PUTSPRITE3+W,(W*H,127),V,4*F+3+W:NEXT
6 IF:T=T+S-1:PUTSPRITE1,(115-(D<34)*((24-D)*B+F*10)+(E-64)*D\225,-Y*(98+D)-31),-6*(T<R),15-D\25:OR:M=(X>72)-(X<0):SOUND0,O-S*9:S=S-(S<18ANDSTRIG(0))*2+(S>0):S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):E=NAND128:F=B:B:IFC<TTHENC=V+T+TMOD99:B=CMOD3-1
7 X=X+5*(M+(U=7)-(U=3))-S*B\4:LOCATE1,1:8:N=N+9-S:TO:PUTSPRITE0,(X+80,156),1,12:SOUND1,83:SOUND8,V:D=96-(NAND127):Y=D>0:D=D*D\96:U=STICK(0):*:PRINTUSING"SPEED:###kmh    RANK:###";S*10;N\128-82:NEXT:Z$=SPACE$(V):Z=(TIME\(6-PEEK(43)\128))/10
8 FORN=0TO244:D=88-3*N:S=16:U=Y*(N\6-V):Y=D>0:SOUND8,U:SOUND9,U:PUTSPRITE0,(116-(D<58)*((21-D*D\96)*B+F*10)+(X-36)*D\126,-Y*(98+D)-31),1,15+Y*D\24:LOCATE6,4:PRINTMID$(Z$+"Race Over   Time ="+STR$(Z)+"s"+Z$,N\2MOD42+1,15):NEXTI:NEXT:SCREENY

NYYRIKKI
online
msx master
Posts: 1467
Posted: April 06 2005, 07:59   
You are a wizard! BTW do you typically sleep at all?

dvik
msx master
Posts: 1286
Posted: April 06 2005, 09:21   
Its amazing what you can squeze into 8 lines of code. I'm supprised that its still
possible to find characters to save. But it is getting harder and harder.

If we didn't have the size limit I have some ideas that would be nice, for
example scrolling mountains in the horizon and arrows showing upcoming
curves. But these features are impossible to squeze into this one (although
I've thought that about almost all features we added since the first version )

Unless you find something I think this version is close to the final one. I don't
really have anymore good ideas of character saving or new features that
doesn't require too much code.

So here is the latest code:

1 DEFINTA-Y:V=14:S$(O1)="A18A0CA0FB07C03C01H00A80AE0AF0AFCIFFH00A80AE0AF0AF8AFCBFEAFFP00F3FF7FTFFAF0AF8AFCAFELFFE00A80AC0AE0BF0AF8AFCBFEBFFP00B01B03B07B0FB1FB3FB7FBFFB80BC0BE0BF0BF8BFCBFEBFFP00B01B03B07B0FB1FB3FB7FbFFB80BC0BE0BF0BF8BFCBFE"
2 COLOR15,5,1:X=V:S$(1)="BFFX00A01A07A0FA1FA3FB7FAFFC00A01A07A0FA3FIFFA18A30AF0BE0CC0C80J00A01A03A07B0FA1FA3FB7FBFFA0FA1FA3FA7F\FFFFCFFEDFFG00A1FA20A40A7FBCFA7FB70G00AC0A20A10AF0B98AF0B70J00A0FA10A1FA2FA1FA19K00B80A40B80L00A06A0FA09_00A03"
3 J=S-J*(J<96-S):K=J\16:FORW=0TO2:VPOKE8208+W,P(W+K):NEXT:IFTTHENRESUMENEXTELSEKEYOFF:SCREEN1,3,0:LOCATE8,1:PRINT"PLEASE WAIT!":FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I):VPOKEI,(OORO\2)\(2-(IAND4)\4):NEXT:SOUND3,V:FORW=0TO1:FORO=1TO212STEP3
4 Q=ASC(MID$(S$(W),O,1))-65:Y=VAL("&H"+MID$(S$(W),O+1,2)):N=14336:FORA=ATOA+Q:VPOKEA+N,Y:NEXT:NEXT:PUTSPRITE8+W,(80+64*W,159),V,6+W:NEXT:ONERRORGOTO3:FORR=1TO12:FORH=0TO31:VPOKE6496+H+R*32,(R<9ORH<VORH>17)*(ASC(MID$("ABCSBRCKSBJR",R))-211)
5 P(H\4)=50-15*(H\12AND1):NEXT:NEXT:FORI=ITO1168:VPOKEI-(I=1168),(8ANDI)*255\8:VPOKE8+I,(4AND7-I)*255\4:NEXT:VPOKE8192,V:TIME=0:SOUND9,V:R=N\2:FORT=7TOR:R:FORW=3TO4:PUTSPRITEW+1,(F*10+W*H,95),V,4*B+W+1:PUTSPRITE3+W,(W*H,127),V,4*F+3+W:NEXT
6 IF:T=T+S-1:PUTSPRITE1,(115-(D<34)*((24-D)*B+F*10)+(E-64)*D\225,-Y*(98+D)-31),-6*(T<R),15-D\25:OR:M=(X>72)-(X<0):SOUND0,O-S*9:S=S-(S<18ANDSTRIG(0))*2+(S>0):S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):E=NAND128:F=B:B:IFC<TTHENC=V+T+TMOD99:B=CMOD3-1
7 X=X+5*(M+(U=7)-(U=3))-S*B\4:LOCATE1,1:8:N=N+9-S:TO:PUTSPRITE0,(X+80,156),1,12:SOUND1,83:SOUND8,V:D=96-(NAND127):Y=D>0:D=D*D\96:U=STICK(0):*:PRINTUSING"SPEED:###kmh    RANK:###";S*10;N\128-82:NEXT:Z$=SPACE$(V):S=15:Z=TIME\(6-PEEK(43)\128)
8 FORN=0TO244:D=88-3*N:U=Y*(N\6-V):Y=D>0:SOUND8,U:SOUND9,U:D/2:PUTSPRITE0,(116-(D<58)*((21-D*D\96)*B+F*10)+(X-36)*D\126,-Y*(98+D)-31),1,15+Y*D\24:LOCATE6,4:PRINTMID$(Z$+"Race Over   Time ="+STR$(Z/10)+"s"+Z$,NMOD42+1,S):NEXTI:NEXT:SCREENUP

manuel
msx guru
Posts: 3273
Posted: April 06 2005, 11:07   
What about using NYYRIKKI's trick to replace basic statements with single letters? PUT SPRITE is quite a long text....
BiFi
msx guru
Posts: 3142
Posted: April 06 2005, 11:11   
how about using the catapult type tab to let catapult/openMSX do the typing? or simply copy/paste the code in a file?

life can be so easy sometimes when you know you can do it in other ways than just typing
Arjan
msx addict
Posts: 440
Posted: April 06 2005, 11:55   
I'm sure manuel knows that, BiFi
The purpose is to reduce code size to be able to add extra features
manuel
msx guru
Posts: 3273
Posted: April 08 2005, 19:27   
Indeed. What do you think about it, dvik and/or NYYRIKKI?
dvik
msx master
Posts: 1286
Posted: April 08 2005, 19:51   
In order to do that we also need to add an ONSTOPGOSUB.... to catch a break
so that we can get the regular basic syntax back. But I think that it still would
save some space and it would for sure make it look more obfuscated.

Doing the one character commands would probably increase the speed a little
bit as well since the parsing will be quicker but maybe it won't be noticable.

I guess the biggest problem is to develop using the one character commands.
A lot of work is actually to just move code arround to make the lines 239 characters
long. And since there are dependencies between different statements it will
be a bit tricky to do.
manuel
msx guru
Posts: 3273
Posted: April 08 2005, 22:44   
dvik, tricky is where obfuscation is all about!
I'm sure you can manage it
BTW: you can also disable CTRL-STOP with one poke and let Q exit the game e.g. (and restore basic).

Also, the speed is incredibly much higher on turboR as snout already mentioned...
NYYRIKKI
online
msx master
Posts: 1467
Posted: April 09 2005, 05:10   
Quote:

Indeed. What do you think about it, dvik and/or NYYRIKKI?



I think, that there are people who don't know anything about ML, but they still have good BASIC ideas to implement. Although I made the rules and even later found a way to redefine part of MSX-BASIC code, I think it is not fair to redefine whole MSX-BASIC just because it is possible. I think, that if you come up with something original it is more than welcome, but redefine of code just because it is possible just don't make sense to me... The code will be totally unreadable.

BTW poke-1103,1 will disable CTRL+STOP

 
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 Next Page )
 







(c) 1994 - 2008 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.