Autor
| Free your creativity - IOMBCC
| snout
 msx legend Mensajes: 4991 | Publicado: Abril 17 2005, 15:54   | ?
| | manuel msx guru Mensajes: 3347 | Publicado: Abril 17 2005, 15:59   | Quote:
| Quote:
| This is BASIC, man. Of course it's dead slow! 
|
If you don't have all the time in the world, here is raped version, that works on X-BASIC as well...
|
Hey, this helps a lot! Especially on R800 it is reasonably fast  THanks! (I missed this one...) | | dvik msx master Mensajes: 1299 | Publicado: Abril 17 2005, 18:24   | Quote:
| dvik/Nyyrikki - Can we expect more updates to Rally-X?
|
I'm pretty satisfied with rally-x now. I'm not sure if nyyrikki has some more ideas. | | manuel msx guru Mensajes: 3347 | Publicado: Abril 17 2005, 18:56   | btw, at a certain depth, the fast version of Mandelbrot seems to loose details... Is that possible?
If you like, I can e-mail some screenshots  | | manuel msx guru Mensajes: 3347 | Publicado: Abril 17 2005, 18:57   | About rally-x: I'd like a scrolling landscape above the horizon  | | dvik msx master Mensajes: 1299 | Publicado: Abril 18 2005, 02:37   | It would be nice to have a scrolling horizon. I have an idea on how to do it without slowing down the game but I'm not sure if I can make it with few enough characters of code.
On the other hand I guess we can make a less fancy ending. after all, it uses about 15% of the total number of characters. Maybe it is more fun to have scrolling mountains or something in the horizon than a fancy ending.
I'll see what I can do.
| | gargamel msx user Mensajes: 36 | Publicado: Abril 18 2005, 07:55   | Quote:
|
8728 DEFUSR=38+PEEK(-2442)+PEEK(-2441)*256:IFUSR(0)THENLINE>2COPY0&H80F6OR384ALLYOURBASEAREBELONGTOUS!
|
That was the coolest ML loader I've ever seen!!
It was as magic as those hex listings one entered from magazines before I got to know Rodnay Zaks.
| | Alex Ganzeveld msx lover Mensajes: 81 | Publicado: Abril 18 2005, 12:32   | Dvik: You're joking, right?
| | NYYRIKKI msx master Mensajes: 1485 | Publicado: Abril 18 2005, 15:10   | About x-rally...
Maybe I can get some more space out of it, but have had too many other things going on, so that I have not been able to test my ideas. This week is going to be another busy one, so no updates are expected from me anytime near.
Manuel: I somehow still don't like the idea of redefining BASIC commands, but maybe we have to take that choice, if dvik adds the mountains, as I like the end demo.  The Mandelbrot routine may really lose some details as part of the speed comes from the fact, that numbers are not handled as accurately as in MSX-BASIC. Sorry about that, I think, I didn't test that too well.
| | dvik msx master Mensajes: 1299 | Publicado: Abril 18 2005, 19:56   | I just want to get your oppinion on the scrolling mountains in the rally game. I've done a little
test and I got something that works ok at least. This version is not that
optimized but I wanted to hear if it is worth continue working on or if the old
one without mountains is better.
If you think it is ok I'll try to make it a bit more efficient. (Note that this version
does not meet the size requirements of iombcc)
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:
6 FORI=1536TO1791:W=2^(IAND7):J=127\W:K=255*WAND255:VPOKEI,JANDK:VPOKEI+256,JORK:NEXT:FORJ=6464TO6495:VPOKEJ,224+8*(JAND3):VPOKEJ+32,192+8*(JAND3):NEXT
7 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
8 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
9 G=G+F*S:L=G\16:FORW=0TO3:VPOKE8216+W,86+8*(L+WAND2):VPOKE8220+W,85-((L+WAND3)=3):NEXT
10 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)
11 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
| | gargamel msx user Mensajes: 36 | Publicado: Abril 18 2005, 21:32   | Hehe... this one is much cooler! I really like mountains, perhaps I'm a Konami junkie.  I bit of dvik/nyyrikki optimizations and I'll torch my Hyper Rally cart.
| | manuel msx guru Mensajes: 3347 | Publicado: Abril 18 2005, 22:29   | dvik - rocks! A little more variation in the skyline would be nice, though, because it sometimes seems to jump, which I think is related to 'aliasing'  | | dvik msx master Mensajes: 1299 | Publicado: Abril 19 2005, 05:01   | I have a small update that saves some characters and makes the scroll a little
bit better. More variation in the skyline would indeed be nice but because of
the quite hard requirements and the fact that it is basic makes it hard to do
something more fancy.
I'm not sure what nyyrikki think we should do to fit this into the size limits. I'll
try to do some more optimizations. But I guess we either need to do the
poke thing or cut something.
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:
6 FORI=1536TO1791:W=2^(IAND7):J=127\W:VPOKEI,JAND-W:VPOKEI+256,JOR-WAND255:NEXT:FORJ=0TO63:VPOKE6464+J,224+8*(JAND3)-(JAND32):NEXT
7 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
8 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
9 G=F*S-G*(G<R):FORW=8216TO8219:VPOKEW,86+(GAND16):VPOKE4+W,85+(GAND24)\24:G=G+8:NEXT
10 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)
11 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
| | NYYRIKKI msx master Mensajes: 1485 | Publicado: Abril 19 2005, 14:46   | It is nice, that we already have a reason to start compressing.  I really have to get some time to this project as well...
| | dvik msx master Mensajes: 1299 | Publicado: Abril 20 2005, 09:41   | Nyyrikki, I've done some more compressing and its pretty close to fit the size
rules now. Everyting is in there except the fading sound in the end demo and
a line in the horizon.
I made the sprite data more compressed by letting each character in the arrays
be 6 bits instead of 4 (it was hex before). I'll try to compress it more but its
getting harder and harder.
1 J=S-J*(J<96-S):K=J\16:FORW=0TO2:VPOKE8208+W,P(W+K):NEXT:IFTTHENRESUMENEXTELSEONERRORGOTO1:T$="???@AAF????GF?????@?NDDR????JC???@??@@N@@@@@@@@@@@@@@@@N@@@@@@@`@@@@@@@@V?????@?A????G???@AAH???@??@@????ZDDBE????@?@E????@?@H??????I@?@J???]?"
2 DEFINTA-Y:COLOR15,5,1:SCREEN1,3,0:S$=">VV)-26&&&.^VYee&&.^VI5ede5&eb]eVI5ede5&&(2^VI5ede5&'2V'5bW5ec5F&)4b^YUee)6&)BV)EbYEe).VF)5dbaee&*V'5bW5ec5&'BV)eb5,V&5^&).&'2V'5bW5ece)EbYEeYUee)V-F&ZE5e-B&&2.6&5LV)-&5&W-Ub7,&&.6&(F'5J&&)&":N=14336
3 KEYOFF:LOCATE8,1:V=14:PRINT"PLEASE WAIT!":FORO=1TO142:Q=ASC(MID$(T$,O,1))-63:Y=Y\256:FORR=RTOR-(OMOD3=1):Y=Y+(4^(-RAND3))*(ASC(MID$(S$,R+1,1))-38):NEXT:FORA=ATOA+Q:VPOKEA+N,YAND255:NEXT:NEXT:R=N\2:FORI=256TO1023:VPOKE7952+I,85:O=VPEEK(I)
4 VPOKEI,(OORO\2)\(2-(IAND4)\4):NEXT:FORK=1TO12:W=KAND1:PUTSPRITE8+W,(80+64*W,159),V,6+W:FORH=0TO31:VPOKE6496+H+K*32,(K<9ORH<VORH>17)*(ASC(MID$("<CBRCSBJRCKS",K))-211):P(H\4)=50-15*(H\12AND1):NEXT:NEXT:X=V:SOUND3,V:VPOKE8192,V:FORI=ITO1279
5 VPOKE6464+(IAND63),224+8*(IAND3)-(IAND32):W=2^(IAND7):J=127\W:VPOKEI+512,JAND-W:VPOKEI+768,JOR-WAND255:J=8-(IAND32)\8:VPOKEI,(JANDI)*255\J:NEXT:TIME=0:SOUND9,V:FORT=7TOR:-:LOCATE1,1:SOUND8,V:F=B:IFC<TTHENC=V+T+TMOD99:B=(R-T>99)*(1-CMOD3)
6 S=S-(S<18ANDSTRIG(0))*2+(S>0):-: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:-: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:M=(X>72)-(X<0):-:U=STICK(0)
7 S=S*((X-15-E\3)\15<>0ORD<73)*(M=0):SOUND0,255-S*9:E=NAND128:X=X+5*(M+(U=7)-(U=3))-S*B\4:N=N+9-S:G=G+F*S\2:-:FORW=8216TO8219:G=G+8AND31:VPOKEW,86+(GAND16):VPOKE4+W,85+G\24:NEXT:-:PUTSPRITE0,(X+80,156),1,12:SOUND1,83:D=96-(NAND127):Y=D>0:-
8 D=D*D\96:PRINTUSING"SPEED:##0kmh RANK:###";S;N\128-82:NEXT:BEEP:Z$=SPACE$(V):S=15:Z=TIME\(6-PEEK(43)\128):FORN=0TO244:D=88-3*N:PUTSPRITE0,(116-(36-X)*D\126,68+D),-(D>0),S-D\24:LOCATE6,4:PRINTMID$(Z$+"Race Over Time ="+STR$(Z/10)+"s"+Z$,NMOD42+1,S)
9 -:NEXT:SCREEN0
| |
| |
| |