DKWITT Posted March 23, 2013 Share Posted March 23, 2013 My first post so be gentle (if i deserve it). I decided it would be a good idea to get my kids into computer programming, rather than just using a computer or an iPad. Maybe wrong but i think that the very simple environment of an atari would be ideal. They are mad on Candy Crush Saga so I thought, let's write one of those match-3 games. It's lot more difficult than I thought. I'd got most of the checking routines sorted out but frustrated that I could not tie it all together I deleted everything. Now I want to carry on. I know that there is a game called "Swapz" on a Czech disk magazine, but does anyone know of a Basic version that I could work with / copy? I have searched for this on many different atari forums and could not find what i was looking for, but apologies if I have missed it. Even if I get no response I would like to congratulate everyone on these various forums for their dedication and hard work in supporting and using 8-bit atari machines. To think that people are still getting more out of these machines (like crazy new graphics modes) is amazing. (i'd like to see a Basic listing showing them all off - I am sure one is around somewhere). Thanks and apologies again if this subject has been covered before. Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted March 23, 2013 Share Posted March 23, 2013 Just thought I'd say Welcome DKWITT Swapz was programmed by Fandal who has a great atari web-site , not sure if there is a basic or Turbo BASIC version out there? Think if you were doing a new project would be nice to have something slighty different to what we already have The best game of this sort is Jewel Bits from a recent abbuc software contest a way better game than all others I've seen anyway! Some useful resources are Atariarchives.org has many books scanned in, and atarimania.com has lots of the 8-bit magazines. I think Turbo Basic may be your best option - Checkout K.E.Soft's games, lots of them are puzzle games and in turbo basic (I think) you could perhaps contact Kemal here on atariage... Hope this helps Quote Link to comment Share on other sites More sharing options...
DKWITT Posted March 23, 2013 Author Share Posted March 23, 2013 Thanks for the guidance TRBB. Turbo Basic is indeed my choice. I will check those websites and hopefully I can get something done. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted March 24, 2013 Share Posted March 24, 2013 I was just thinking about these sorts of games yesterday, after playing Pet Rescue Saga on facebook: This sort of game could easily be done on Atari 8-bit. I was thinking, use the ICE CIN mode in lo-res Antic 5, you can get 14 colors at 4 greyscale per character. Use vscrol tricks for when the screen scrolls as you remove the blocks. The calculations might be easy to do, tho I would think you'd need a softsprite routine for moving chunks of the screen at once. Quote Link to comment Share on other sites More sharing options...
pps Posted March 24, 2013 Share Posted March 24, 2013 I started coding such a game in 2000 when no one had done it on a8 using QUICK. Lack of time and some other things caused it never became ready. Maybe you want to watch into my old sources. QUICK is not that far away from TBA. Quote Link to comment Share on other sites More sharing options...
DKWITT Posted March 24, 2013 Author Share Posted March 24, 2013 Thanks pps! I would be interested in seeing your source files. Are they on a website somewhere or would you post them here? My version (before I childishly trashed it) was a lot simpler. I used a number array and just printed CHR$ of the number onscreen in gr.2. I used simple character animation to show that the block was 'blowing up'. I wanted the mechanics right before doing it with sprites,colours etc. I was never a great programmer when I was a kid in the 1980s and I haven't got much better since! I couldn't find out how to control the game (arrow keys + space bar or joystick). I did routines initialising the grid, and looking for 3,4,5 in a row. The game could sort of play itself but i wasn't able to merge that with the user input. I won't give up again! That is not a good example to set to the kids. Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted March 24, 2013 Share Posted March 24, 2013 Glad to hear it! There's plenty of people here to help. There are lots of beginners BASIC programming articles in the Page 6 (and Atari User) magazines but you'll have to read though them to find them The Page 6 web site (incomplete) has scans of the mags - The First Steps series might be useful. Lots of my (BASIC) games are on the gwobby web site if you want to look at some other examples Quote Link to comment Share on other sites More sharing options...
pps Posted March 27, 2013 Share Posted March 27, 2013 Ok, here what I did in QUICK in 2006. I moved to Assembler and did a few more, but here you should be able to get filled board and move with the joystick and it seems to test at least if a move right or left is possible. Hope, that this works - will try to search for the original disc to test this at real machine again - don't remember that well enough. þ Quick-Sourcetext P: ---------------- Length: $5388 Free : $23E3 ---------------- BYTE [ ATTRACT=77 DMA=559 KEY=764 RANDOM=53770 COL0=53270 COL1=53271 COL2=53272 COL4=53274 PRIOR=53275 STICK0=632 STRIG0=644 TRIG X,Z XW,YW,XPOS,JOY AXW,AYW,AXPOS ] WORD [ BS=88 DL=560 ] ARRAY [ A(9) B(9) C(9) D(9) E(9) F(9) G(9) H(9) ] MAIN CLR(142,31) DATA ($8E00) [ 0,240,66,$8000,2,0 79,$9000 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,79,$A018 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15,15 15,15,15,15,15,15,15,15,15 0,66,$8050 65,$8e00 ] DL=$8E00 BS=$8000 CLR(128,2) DLI(DLI) POS(7,0) ?("Move'em by STARSOFT Berlin") POS(10,1) ?("(p) 9/2002 + 6/2007") .INIT X=1 REPEAT .SETSTONE(X,1,A(X),0) .SETSTONE(X,2,B(X),0) .SETSTONE(X,3,C(X),0) .SETSTONE(X,4,D(X),0) .SETSTONE(X,5,E(X),0) .SETSTONE(X,6,F(X),0) .SETSTONE(X,7,G(X),0) .SETSTONE(X,8,H(X),0) X+ UNTIL X=9 .WIEVIEL(Z) POS(0,0) ?(Z) XW=1 YW=1 AXW=1 AYW=1 XPOS=A(XW) AXPOS=XPOS .SETSTONE(XW,YW,XPOS,255) TRIG=1 REPEAT ATTRACT=0 TRIG=STRIG0 IF TRIG=0 .SETSTONE(XW,YW,XPOS,68) .GAME(XW,YW,XPOS) TRIG=1 ENDIF .JOYMOVE(JOY) IF XW=1 IF JOY=2 JOY=0 ENDIF ENDIF IF XW=8 IF JOY=1 JOY=0 ENDIF ENDIF IF YW=1 IF JOY=4 JOY=0 ENDIF ENDIF IF YW=8 IF JOY=3 JOY=0 ENDIF ENDIF AXW=XW AYW=YW AXPOS=XPOS IF JOY<>0 IF JOY=1 ADD(XW,1,XW) ENDIF IF JOY=2 SUB(XW,1,XW) ENDIF IF JOY=3 ADD(YW,1,YW) ENDIF IF JOY=4 SUB(YW,1,YW) ENDIF IF YW=1 XPOS=A(XW) ELSE IF YW=2 XPOS=B(XW) ELSE IF YW=3 XPOS=C(XW) ELSE IF YW=4 XPOS=D(XW) ELSE IF YW=5 XPOS=E(XW) ELSE IF YW=6 XPOS=F(XW) ELSE IF YW=7 XPOS=G(XW) ELSE XPOS=H(XW) ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF IF TRIG=1 .SETSTONE(AXW,AYW,AXPOS,0) .SETSTONE(XW,YW,XPOS,255) ENDIF .PAUSE(5) ENDIF UNTIL X=8 ENDMAIN *------------------------------------* PROC PAUSE IN BYTE [ LEN ] LOCAL BYTE [ TIME=20 ] BEGIN TIME=0 REPEAT UNTIL TIME=LEN ENDPROC *------------------------------------* INTER DLI BEGIN PUSH COL4=0 COL2=148 COL0=10 COL1=10 SYNC(17) PRIOR=192 COL4=8 SYNC(193) PRIOR=0 COL4=0 COL2=148 COL0=10 COL1=10 PULL ENDDLI *------------------------------------* PROC JOYMOVE OUT BYTE [ J ] * Rückgabe - Output * * 1 RECHTS - RIGHT * * 2 LINKS - LEFT * * 3 RUNTER - DOWN * * 4 HOCH - UP * * 0 NICHTS - NOTHING * LOCAL BYTE [ S ] BEGIN S=STICK0 IF S=7 J=1 ELSE IF S=11 J=2 ELSE IF S=13 J=3 ELSE IF S=14 J=4 ELSE J=0 ENDIF ENDIF ENDIF ENDIF ENDPROC *------------------------------* PROC LI IN BYTE [ X1 ] ARRAY [ STR2(9) ] OUT BYTE [ Z ] LOCAL BYTE [ X2 M,N ] BEGIN Z=1 IF X1=1 JUMP(2) ENDIF X2=X1 X2- M=STR2(X1) REPEAT N=STR2(X2) IF N=M Z+ X2- ENDIF IF N<>M JUMP(2) ENDIF UNTIL X2<1 -2 ENDPROC *------------------------------------* PROC RE IN BYTE [ X1 ] ARRAY [ STR3(9) ] OUT BYTE [ Z ] LOCAL BYTE [ X2 M,N ] BEGIN Z=1 IF X1=8 JUMP(4) ENDIF X2=X1 X2+ M=STR3(X1) REPEAT N=STR3(X2) IF N=M Z+ X2+ ELSE X2=9 ENDIF UNTIL X2=9 -4 ENDPROC *------------------------------------* PROC UN IN BYTE [ X1,Y1 ] OUT BYTE [ ZO ] LOCAL ARRAY [ STR(9) ] BYTE [ Z,ZW ] BEGIN IF Y1=8 Z=1 JUMP(7) ENDIF IF X1=1 ZW=A(1) STR(1)=ZW ZW=B(1) STR(2)=ZW ZW=C(1) STR(3)=ZW ZW=D(1) STR(4)=ZW ZW=E(1) STR(5)=ZW ZW=F(1) STR(6)=ZW ZW=G(1) STR(7)=ZW ZW=H(1) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF IF X1=2 ZW=A(2) STR(1)=ZW ZW=B(2) STR(2)=ZW ZW=C(2) STR(3)=ZW ZW=D(2) STR(4)=ZW ZW=E(2) STR(5)=ZW ZW=F(2) STR(6)=ZW ZW=G(2) STR(7)=ZW ZW=H(2) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF IF X1=3 ZW=A(3) STR(1)=ZW ZW=B(3) STR(2)=ZW ZW=C(3) STR(3)=ZW ZW=D(3) STR(4)=ZW ZW=E(3) STR(5)=ZW ZW=F(3) STR(6)=ZW ZW=G(3) STR(7)=ZW ZW=H(3) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF IF X1=4 ZW=A(4) STR(1)=ZW ZW=B(4) STR(2)=ZW ZW=C(4) STR(3)=ZW ZW=D(4) STR(4)=ZW ZW=E(4) STR(5)=ZW ZW=F(4) STR(6)=ZW ZW=G(4) STR(7)=ZW ZW=H(4) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF IF X1=5 ZW=A(5) STR(1)=ZW ZW=B(5) STR(2)=ZW ZW=C(5) STR(3)=ZW ZW=D(5) STR(4)=ZW ZW=E(5) STR(5)=ZW ZW=F(5) STR(6)=ZW ZW=G(5) STR(7)=ZW ZW=H(5) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF IF X1=6 ZW=A(6) STR(1)=ZW ZW=B(6) STR(2)=ZW ZW=C(6) STR(3)=ZW ZW=D(6) STR(4)=ZW ZW=E(6) STR(5)=ZW ZW=F(6) STR(6)=ZW ZW=G(6) STR(7)=ZW ZW=H(6) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF IF X1=7 ZW=A(7) STR(1)=ZW ZW=B(7) STR(2)=ZW ZW=C(7) STR(3)=ZW ZW=D(7) STR(4)=ZW ZW=E(7) STR(5)=ZW ZW=F(7) STR(6)=ZW ZW=G(7) STR(7)=ZW ZW=H(7) STR(=ZW .RE(Y1,STR,Z) JUMP(7) ENDIF ZW=A( STR(1)=ZW ZW=B( STR(2)=ZW ZW=C( STR(3)=ZW ZW=D( STR(4)=ZW ZW=E( STR(5)=ZW ZW=F( STR(6)=ZW ZW=G( STR(7)=ZW ZW=H( STR(=ZW .RE(Y1,STR,Z) -7 ZO=Z ENDPROC *------------------------------------* PROC OB IN BYTE [ X1,Y1 ] OUT BYTE [ ZO ] LOCAL ARRAY [ STR(9) ] BYTE [ Z,ZW ] BEGIN IF Y1=1 Z=1 JUMP(6) ENDIF IF X1=1 ZW=A(1) STR(1)=ZW ZW=B(1) STR(2)=ZW ZW=C(1) STR(3)=ZW ZW=D(1) STR(4)=ZW ZW=E(1) STR(5)=ZW ZW=F(1) STR(6)=ZW ZW=G(1) STR(7)=ZW ZW=H(1) STR(=ZW .LI(Y1,STR,Z) JUMP(6) ENDIF IF X1=2 ZW=A(2) STR(1)=ZW ZW=B(2) STR(2)=ZW ZW=C(2) STR(3)=ZW ZW=D(2) STR(4)=ZW ZW=E(2) STR(5)=ZW ZW=F(2) STR(6)=ZW ZW=G(2) STR(7)=ZW ZW=H(2) STR(=ZW .LI(Y1,STR,Z) JUMP(6) ENDIF IF X1=3 ZW=A(3) STR(1)=ZW ZW=B(3) STR(2)=ZW ZW=C(3) STR(3)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,T2,T3 ] BEGIN IO=0 H=X1 H+ T1=ST1(X1) T2=ST1(H) * X1=(X1+1)? * IF T1=T2 * XOXX * IF X1>2 H1=X1 H1- H1- T3=ST1(H1) IF T1=T3 IO+ ENDIF ENDIF * XXOX * IF X1<7 H1=X1 H1+ H1+ H1+ T3=ST1(H1) IF T1=T3 IO+ ENDIF ENDIF H1=X1 H1+ H1+ H2=X1 H2- *-----------* IF Y1<8 * XXO * * X * T3=ST2(H1) IF T1=T3 IO+ ENDIF * OXX * * X * H2=X1 H2- T3=ST2(H2) IF T1=T3 IO+ ENDIF ENDIF *------------* IF Y1>1 * X * * OXX * T3=ST0(H2) IF T1=T3 IO+ ENDIF * X * * XXO * T3=ST0(H1) IF T1=T3 IO+ ENDIF ENDIF ENDIF H1=X1 H1+ H1+ *------------* * X=(X+2)? * T2=ST1(H1) IF T1=T2 * X * * XOX * IF Y1>1 T3=ST0(H) IF T3=T1 IO+ ENDIF ENDIF * XOX * * X * IF Y1<8 T3=ST2(H) IF T3=T1 IO+ ENDIF ENDIF ENDIF ENDPROC *------------------------------* PROC WIEVIEL OUT BYTE [ ZAEHL ] LOCAL BYTE [ N,M,OK ZW1 ZW2 ZW3 ZW4 ZW5 ZW6 ZW7 ZW8 ] ARRAY [ STR1(9) STR2(9) STR0(9) A2(9) B2(9) C2(9) D2(9) E2(9) F2(9) G2(9) H2(9) ] BEGIN ZAEHL=0 M=0 REPEAT M+ IF M=1 STR0="0000000" STR1=A STR2=B ELSE IF M=2 STR0=A STR1=B STR2=C ELSE IF M=3 STR0=B STR1=C STR2=D ELSE IF M=4 STR0=C STR1=D STR2=E ELSE IF M=5 STR0=D STR1=E STR2=F ELSE IF M=6 STR0=E STR1=F STR2=G ELSE IF M=7 STR0=F STR1=G STR2=H ELSE STR0=G STR1=H STR2="0000000" ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF N=0 REPEAT N+ .GEHTNOCH(N,M,STR0,STR1,STR2,OK) ADD(ZAEHL,OK,ZA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3 STR0=B2 STR1=C2 STR2=D2 ELSE IF M=4 STR0=C2 STR1=D2 STR2=E2 ELSE IF M=5 STR0=D2 STR1=E2 STR2=F2 ELSE IF M=6 STR0=E2 STR1=F2 STR2=G2 ELSE IF M=7 STR0=F2 STR1=G2 STR2=H2 ELSE STR0=G2 STR1=H2 STR2="0000000" ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF N=0 REPEAT N+ .GEHTNOCH(N,M,STR0,STR1,STR2,OK) ADD(ZAEHL,OK,ZAEHL) UNTIL N=8 UNTIL M=8 ENDPROC *------------------------------* PROC GAME IN BYTE [ XX,YY,XXPOS ] LOCAL BYTE [ BEW,END W1,W2,ZW MOV XANZ OK,ZAEHLER ] ARRAY [ STR2(9) STR2H(9) STR2U(9) ] BEGIN .WIEVIEL(ZAEHLER) POS(0,0) ?(ZAEHLER) IF YY=1 STR2=A STR2U=B ELSE IF YY=2 STR2H=A STR2=B STR2U=C ELSE IF YY=3 STR2H=B STR2=C STR2U=D ELSE IF YY=4 STR2H=C STR2=D STR2U=E ELSE IF YY=5 STR2H=D STR2=E STR2U=F ELSE IF YY=6 STR2H=E STR2=F STR2U=G ELSE IF YY=7 STR2H=F STR2=G STR2U=H ELSE STR2H=G STR2=H ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF END=0 REPEAT * Joystick moves * .JOYMOVE(BEW) W1=XXPOS * RECHTS - RIGHT * IF BEW=1 IF XX<8 ADD(XX,1,ZW) W2=STR2(ZW) STR2(ZW)=W1 STR2(XX)=W2 .SETSTONE(XX,YY,W2,68) .SETSTONE(ZW,YY,W1,68) IF W1=W2 .PAUSE(10) .SETSTONE(ZW,YY,W1,0) .SETSTONE(XX,YY,W2,255) JUMP(99) ENDIF ELSE .SETSTONE(XX,YY,XPOS,255) JUMP(99) ENDIF MOV=1 END=1 ELSE * LINKS - LEFT * IF BEW=2 IF XX>1 SUB(XX,1,ZW) W2=STR2(ZW) STR2(ZW)=W1 STR2(XX)=W2 .SETSTONE(XX,YY,W2,68) .SETSTONE(ZW,YY,W1,68) IF W1=W2 .PAUSE(10) .SETSTONE(ZW,YY,W1,0) .SETSTONE(XX,YY,W2,255) JUMP(99) ENDIF ELSE .SETSTONE(XX,YY,XPOS,255) JUMP(99) ENDIF MOV=1 END=1 ELSE * RUNTER - DOWN * IF BEW=3 IF YY<8 W1=STR2(XX) W2=STR2U(XX) ADD(YY,1,ZW) .SETSTONE(XX,YY,W2,68) .SETSTONE(XX,ZW,W1,68) IF W1=W2 .PAUSE(10) .SETSTONE(XX,YY,W1,0) .SETSTONE(XX,ZW,W2,255) JUMP(99) ENDIF ELSE .SETSTONE(XX,YY,XPOS,255) JUMP(99) ENDIF MOV=2 END=1 ELSE * HOCH - UP * IF BEW=4 IF YY>1 W1=STR2(XX) W2=STR2H(XX) SUB(YY,1,ZW) .SETSTONE(XX,YY,W2,68) .SETSTONE(XX,ZW,W1,68) IF W1=W2 .PAUSE(10) .SETSTONE(XX,YY,W1,0) .SETSTONE(XX,ZW,W2,255) JUMP(99) ENDIF ELSE .SETSTONE(XX,YY,XPOS,255) JUMP(99) ENDIF MOV=3 END=1 ENDIF ENDIF ENDIF ENDIF UNTIL END=1 IF YY=1 A=STR2 B=STR2U ELSE IF YY=2 A=STR2H B=STR2 C=STR2U ELSE IF YY=3 B=STR2H C=STR2 D=STR2U ELSE IF YY=4 C=STR2H D=STR2 E=STR2U ELSE IF YY=5 D=STR2H E=STR2 F=STR2U ELSE IF YY=6 E=STR2H F=STR2 G=STR2U ELSE IF YY=7 F=STR2H G=STR2 H=STR2U ELSE G=STR2H H=STR2 ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF .PAUSE(10) * Test if move right / left is possible * * BEWEGUNG RECHTS ODER LINKS * IF MOV=1 OK=0 .TEST1(XX,YY,ZW,STR2,OK) IF OK=1 .SETSTONE(XX,YY,W2,0) .SETSTONE(ZW,YY,W1,255) XW=ZW POS(30,2) ?("yeah") .PAUSE(10) POS(30,2) ?(" ") ELSE .SETSTONE(XX,YY,W1,255) .SETSTONE(ZW,YY,W2,0) STR2(XX)=W1 STR2(ZW)=W2 IF YY=1 A=STR2 ELSE IF YY=2 B=STR2 ELSE IF YY=3 C=STR2 ELSE IF YY=4 D=STR2 ELSE IF YY=5 E=STR2 ELSE IF YY=6 F=STR2 ELSE IF YY=7 G=STR2 ELSE H=STR2 ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF -99 ENDPROC *------------------------------------* PROC TEST1 IN BYTE [ XX,YY ZW ] ARRAY [ STR2(9) ] OUT BYTE [ RIGHT ] LOCAL BYTE [ O1,O2,U1,U2 L1,L2,R1,R2 GES ] BEGIN RIGHT=0 .OB(XX,YY,O1) .OB(ZW,YY,O2) .UN(XX,YY,U1) .UN(ZW,YY,U2) ADD(O1,U1,GES) GES- POS(5,2) ?("X1 "); ?(GES) IF GES>2 RIGHT=1 ENDIF ADD(O2,U2,GES) GES- POS(10,2) ?("X2 "); ?(GES) IF GES>2 RIGHT=1 ENDIF .LI(XX,STR2,L1) .RE(XX,STR2,R1) .LI(ZW,STR2,L2) .RE(ZW,STR2,R2) ADD(L1,R1,GES) GES- POS(15,2) ?("H1 "); ?(GES) IF GES>2 RIGHT=1 ENDIF ADD(L2,R2,GES) GES- POS(20,2) ?("H2 "); ?(GES) IF GES>2 RIGHT=1 ENDIF ENDPROC *------------------------------------* PROC INIT LOCAL BYTE [ XX,YY,R ANZ,O,MAX,XM ] ARRAY [ STR1(9) ] BEGIN *------------------ARRAY LEEREN -----* XX=1 REPEAT A(XX)=0 B(XX)=0 C(XX)=0 D(XX)=0 E(XX)=0 F(XX)=0 G(XX)=0 H(XX)=0 XX+ UNTIL XX=9 *------------------ARRAY LEEREN -----* YY=1 REPEAT XX=1 REPEAT -1 STR1="0000000" O=0 REPEAT R=RANDOM IF R>0 IF R<8 O=1 ENDIF ENDIF UNTIL O=1 IF YY=1 A(XX)=R STR1=A JUMP(3) ENDIF IF YY=2 B(XX)=R STR1=B JUMP(3) ENDIF IF YY=3 C(XX)=R STR1=C JUMP(3) ENDIF IF YY=4 D(XX)=R STR1=D JUMP(3) ENDIF IF YY=5 E(XX)=R STR1=E JUMP(3) ENDIF IF YY=6 F(XX)=R STR1=F JUMP(3) ENDIF IF YY=7 G(XX)=R STR1=G JUMP(3) ENDIF H(XX)=R STR1=H -3 *--------------------TEST------------* XM=0 REPEAT MAX=RANDOM IF MAX<3 XM=1 ENDIF UNTIL XM=1 ANZ=0 .LI(XX,STR1,ANZ) IF ANZ>MAX R=0 JUMP(1) ENDIF XM=0 REPEAT MAX=RANDOM IF MAX<3 XM=1 ENDIF UNTIL XM=1 ANZ=0 .OB(XX,YY,ANZ) IF ANZ>MAX R=0 JUMP(1) ENDIF *--------------------TEST------------* XX+ UNTIL XX=9 YY+ UNTIL YY=9 ENDPROC *------------------------------------* PROC SETSTONE IN BYTE [ X,Y,FARBE,CURSOR ] LOCAL BYTE [ EINS,ZWEI,FUENF PLUS ZAEHL,ZAEHL2 ] WORD [ ADY ADRESSE ] BEGIN EINS=0 ZWEI=0 FUENF=0 ADY=$9000 ADRESSE=$9000 IF FARBE=1 EINS=1 ZWEI=17 FUENF=16 ELSE IF FARBE=2 EINS=2 ZWEI=34 FUENF=32 ELSE IF FARBE=3 EINS=5 ZWEI=85 FUENF=80 ELSE IF FARBE=4 EINS=7 ZWEI=119 FUENF=112 ELSE IF FARBE=5 EINS=10 ZWEI=170 FUENF=160 ELSE IF FARBE=6 EINS=12 ZWEI=204 FUENF=192 ELSE EINS=14 ZWEI=238 FUENF=224 ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF IF Y=1 ADRESSE=$9000 ELSE IF Y=2 ADRESSE=$93C0 ELSE IF Y=3 ADRESSE=$9780 ELSE IF Y=4 ADRESSE=$9B40 ELSE IF Y=5 ADRESSE=$9F00 ELSE IF Y=6 ADRESSE=$A2C0 ELSE IF Y=7 ADRESSE=$A680 ELSE ADRESSE=$AA40 ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF SUB(X,1,X) MULT($5,X,PLUS) ADD(ADRESSE,PLUS,ADRESSE) ADY=ADRESSE IF CURSOR=255 ADD(EINS,240,EINS) ADD(FUENF,15,FUENF) ENDIF IF CURSOR=68 ADD(EINS,64,EINS) ADD(FUENF,4,FUENF) ENDIF ZAEHL=1 REPEAT POKE(ADRESSE,CURSOR) ZAEHL+ ADD(ADRESSE,1,ADRESSE) UNTIL ZAEHL=6 ADD(ADY,$28,ADRESSE) ADY=ADRESSE ZAEHL=1 REPEAT POKE(ADRESSE,EINS) ZAEHL2=1 REPEAT ADD(ADRESSE,1,ADRESSE) POKE(ADRESSE,ZWEI) ZAEHL2+ UNTIL ZAEHL2=4 ADD(ADRESSE,1,ADRESSE) POKE(ADRESSE,FUENF) ADRESSE=ADY ZAEHL+ ADD(ADRESSE,$28,ADRESSE) ADY=ADRESSE UNTIL ZAEHL=22 ZAEHL=1 REPEAT POKE(ADRESSE,CURSOR) ZAEHL+ ADD(ADRESSE,1,ADRESSE) UNTIL ZAEHL=6 ENDPROC ÿ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.