Hello Guys, I need your help, because I have to move sprites 2 as graphic characters for screen1 for Msx1, the problem is that you must move inside the maze without delete the background graphic, because the two characters are sprites Animated with two frames. But something in my program does not work, because they move just block them and stop and after walking more, but in my program there is a bug, I can not find.
That program this program managing two sprites with 4 characters each sprite and move randomly on the screen It was not easy at all. Yet as the project seems interesting. Because in fact the two enemy sprites move themselves randomly screen inside the maze. And as a project principal 1UP sprite that must be moved with keys with the joystick or cursor, I need to display sprites 6 on the same line, and moving the two enemy sprites as characters this is the trick! I truly hope that some of you can solve my problems to make sprites move the two enemies in the maze. Which is not easy to do. For now I look forward to your positive response Best Regards 10 REM VPOKE SPRITE 20 REM DA TRADURRERE IN ASSEMBLER 30 REM PER VELOCIZZARE GLI SPRITE 40 REM PER VIDEOGIOCHI MSX-1 50 REM BY AGsoftware 2008 60 REM 70 SCREEN1,2:KEYOFF:COLOR15,1,1 80 WIDTH32:CLEAR200:DEFINTA-Z 90 RESTORE120:FORA=128*8TO136*8-1:READB:VPOKEA,B:NEXTA 100 RESTORE120:FORA=136*8TO144*8-1:READB:VPOKEA,B:NEXTA 110 RESTORE160:FORA=144*8TO145*8-1:READB:VPOKEA,B:NEXTA 120 DATA 7,15,31,23,51,49,63,56,28,14,7,51,32,59,30,14 130 DATA 224,240,248,232,204,140,252,28,56,112,224,192,0,96,116,124 140 DATA 7,15,31,23,51,49,63,56,28,14,7,3,0,6,46,62 150 DATA 224,240,248,232,204,140,252,28,56,112,224,204,4,220,120,112 160 DATA 251,251,251,0,127,127,127,0 170 REM 180 VPOKE8208,10*16:VPOKE8209,6*16:VPOKE8210,8*16+10 190 GOSUB490 200 X=11:Y=15:C=0:XB=28:YB=5:C1=0 210 VPOKE6144+X+Y*32,128:VPOKE6144+X+1+Y*32,130:VPOKE6144+X+32+Y*32,129:VPOKE6144+X+33+Y*32,131 220 VPOKE6144+XB+YB*32,136:VPOKE6144+XB+1+YB*32,138:VPOKE6144+XB+32+YB*32,137:VPOKE6144+XB+33+YB*32,139 230 REM 240 X1=X:Y1=Y:GOSUB280 250 X2=XB:Y2=YB:GOSUB370 260 GOTO240 270 REM MOVE POLYP YELLOW 280 C=C+1:IFC>5THENC=0:GOTO290ELSEGOTO310 290 M=INT(RND(-TIME)*4+1) 300 Z=Z+4ANDZ<4 310 IFM=1THENX=X+1:GOSUB450:VPOKE6144+X+Y*32,128+Z:VPOKE6144+X+1+Y*32,130+Z:VPOKE6144+X+32+Y*32,129+Z:VPOKE6144+X+33+Y*32,131+Z:VPOKE6144+X-1+Y*32,32:VPOKE6144+X-1+32+Y*32,32 320 IFM=2THENX=X-1:GOSUB450:VPOKE6144+X+Y*32,128+Z:VPOKE6144+X+1+Y*32,130+Z:VPOKE6144+X+32+Y*32,129+Z:VPOKE6144+X+33+Y*32,131+Z:VPOKE6144+X+2+Y*32,32:VPOKE6144+X+34+Y*32,32 330 IFM=3THENY=Y+1:GOSUB450:VPOKE6144+X+Y*32,128+Z:VPOKE6144+X+1+Y*32,130+Z:VPOKE6144+X+32+Y*32,129+Z:VPOKE6144+X+33+Y*32,131+Z:VPOKE6144+X+Y*32-32,32:VPOKE6144+X+1+Y*32-32,32 340 IFM=4THENY=Y-1:GOSUB450:VPOKE6144+X+Y*32,128+Z:VPOKE6144+X+1+Y*32,130+Z:VPOKE6144+X+32+Y*32,129+Z:VPOKE6144+X+33+Y*32,131+Z:VPOKE6144+X+Y*32+64,32:VPOKE6144+X+1+Y*32+64,32 350 RETURN 360 REM MOVE POLYP RED 370 C1=C1+1:IFC1>5THENC1=0:GOTO380ELSEGOTO400 380 M1=INT(RND(-TIME)*4+1) 390 Z1=Z1+4ANDZ1<4 400 IFM1=1THENXB=XB+1:GOSUB470:VPOKE6144+XB+YB*32,136+Z1:VPOKE6144+XB+1+YB*32,138+Z1:VPOKE6144+XB+32+YB*32,137+Z1:VPOKE6144+XB+33+YB*32,139+Z1:VPOKE6144+XB-1+YB*32,32:VPOKE6144+XB-1+32+YB*32,32 410 IFM1=2THENXB=XB-1:GOSUB470:VPOKE6144+XB+YB*32,136+Z1:VPOKE6144+XB+1+YB*32,138+Z1:VPOKE6144+XB+32+YB*32,137+Z1:VPOKE6144+XB+33+YB*32,139+Z1:VPOKE6144+XB+2+YB*32,32:VPOKE6144+XB+34+YB*32,32 420 IFM1=3THENYB=YB+1:GOSUB470:VPOKE6144+XB+YB*32,136+Z1:VPOKE6144+XB+1+YB*32,138+Z1:VPOKE6144+XB+32+YB*32,137+Z1:VPOKE6144+XB+33+YB*32,139+Z1:VPOKE6144+XB+YB*32-32,32:VPOKE6144+XB+1+YB*32-32,32 430 IFM1=4THENYB=YB-1:GOSUB470:VPOKE6144+XB+YB*32,136+Z1:VPOKE6144+XB+1+YB*32,138+Z1:VPOKE6144+XB+32+YB*32,137+Z1:VPOKE6144+XB+33+YB*32,139+Z1:VPOKE6144+XB+YB*32+64,32:VPOKE6144+XB+1+YB*32+64,32 440 RETURN 450 IFVPEEK(6144+X+Y*32)<>32THENX=X1:Y=Y1:RETURN290 460 RETURN 470 IFVPEEK(6144+XB+YB*32)<>32THENXB=X2:YB=Y2:RETURN380 480 RETURN 490 PRINT""; 500 PRINT" "; 510 PRINT" "; 520 PRINT" "; 530 PRINT" "; 540 PRINT" "; 550 PRINT" "; 560 PRINT" "; 570 PRINT" "; 580 PRINT" "; 590 PRINT" "; 600 PRINT" "; 610 PRINT" "; 620 PRINT" "; 630 PRINT" "; 640 PRINT" "; 650 PRINT" "; 660 PRINT" "; 670 PRINT" "; 680 PRINT" "; 690 PRINT" "; 700 PRINT""; 710 PRINT""; 720 RETURN _______________________________________________ MSX mailing list (msx@stack.nl) Info page: http://lists.stack.nl/mailman/listinfo/msx