solarsoftware wrote:
Couldn't you just do this in pure BASIC with a list?
What do you mean, by the way?
Currently I still need to get some major game necessities in, but I am having a bit of trouble.
-Moving tiles left and right when they're falling (kind of a speed issue as well - have to erase tile and redraw it, which in pure basic, will take a bit. Unfortunately I can't use Text() since that disrupts the background).
-Merging tiles doesn't seem to work yet.
-Still have to add in row deletion (thanks to mateo, I have a shift screen ASM program, just have to implement it)
Current code! If anyone wants to work on this a bunch and/or optimize it, I'd be happy to make you a co-author
Code:
0->Xmin:264->Xmax
0->Ymin:164->Ymax //is there a better way? the 1->DeltaY doesn't set it up correctly.
FnOff
CoordOff:GridOff:AxesOff
SetUpEditor SHADE
If not(dim(|LSHADE:Then
10->dim(|LSHADE
1->|LSHADE(1
End
Lbl 1
ClrDraw:BackgroundOff
Disp :DispGraph
For(A,164,0,~3
expr(sub("BLACKBLACKBLACKDARKGRAYDARKGRAYDARKGRAYGRAYGRAYGRAYMEDGRAYMEDGRAY",abs(int(A/15)-11),1
Line(1,A,30,A,Ans
Line(234,A,264,A,Ans
End
TextColor(BLACK
Text(~1,20,70,"==SHADES==
TextColor(DARKGRAY
Text(~1,50,100,"START
TextColor(GRAY
Text(~1,80,87,"OPTIONS
Text(~1,110,105,"QUIT
50->A:TextColor(BLACK
Repeat K=105
getKey->K
Text(~1,A,85(A=50)+72(A=80)+90(A=110),"<
Text(~1,A,164(A=50)+175(A=80)+157(A=110),">
If K=34 or K=25:Then
Text(~1,A,85(A=50)+72(A=80)+90(A=110),"
Text(~1,A,164(A=50)+175(A=80)+157(A=110),"
A+30((K=34)(A<110)-(K=25)(A>50->A
End
End
If A=110:Then
ClrDraw
ClrHome
Stop
End
If A=80:Then
ClrHome
ClrDraw:|LSHADE(1->S
If S<10
BackgroundOn S+9+(S>=3
If S>=10
BackgroundOn S-9-10(S=19
Disp :DispGraph
Text(150,0,"Background:
Repeat K=105
getKey->K
Text(150,90,"< ",sub("BLUEREDMAGENTAGREENORANGEBROWNNAVYLTBLUEYELLOWImage1Image2Image3Image4Image5Image6Image7Image8Image9Image0",S,1)," >"
If K=24 or K=26:Then
Text(150,90,"
S+(K=26)-19(K=26)(S=19)-(K=24)+19(K=24)(S=1->S
If S<10
BackgroundOn S+9+(S>=3
If S>=10
BackgroundOn S-9-10(S=19
Disp :DispGraph
End
End
S->|LSHADE(1
End
If A=80
Goto 1
ClrDraw
|LSHADE(1->S
If Ans<10
BackgroundOn Ans+9+(S>=3
If S>=10
BackgroundOn S-9-10(S=19
BorderColor 1
Disp :DispGraph
Line(0,0,264,0,BLACK
Line(0,2,264,2,BLACK
Line(0,4,264,4,BLACK
Line(0,6,264,6,DARKGRAY
Line(0,8,264,8,GRAY
Line(0,10,264,10,MEDGRAY
Line(0,12,264,12,LTGRAY
Line(0,14,264,14,WHITE
DelVar [A]{11,4->dim([A]
For(Z,1,4
1->[A](11,Z //non-mergeable - placeholder
End
149->A:0->B:LTGRAY->C
Repeat K=45 or [A](1,1) or [A](1,2) or [A](1,3) or [A](1,4
Repeat Ans
If [A](abs(int(A/15)-11),B+1:Then
C->[A](abs(int(A/15)-10),B+1
randInt(0,3->B
149->A:randInt(LTGRAY,DARKGRAY->C
End
Line(30B+1,A,30B+30,A,C
Line(30B+1,A+15,30B+30,A+15,0
A-3+(A=2->A
If [A](abs(int(A/15)-10),B+1)=[A](abs(int(A/15)-11),B+1) and [A](abs(int(A/15)-10),B+1) and [A](abs(int(A/15)-10),B+1)<5:Then
//merging tiles
Repeat [A](abs(int(A/15)-10),B+1)!=[A](abs(int(A/15)-11),B+1) or [A](abs(int(A/15)-10),B+1)=5
If [A](abs(int(A/15)-10),B+1)<5:Then
0->[A](abs(int(A/15)-10),B+1)
1+[A](abs(int(A/15)-11),B+1->[A](abs(int(A/15)-11),B+1
C+1->C
For(Z,A-15,A-30,~3 //drawing the merged tile, but does not work
Line(30B+1,Z,30B+30,Z,C
Line(30B+1,Z+15,30B+30,Z+15,0
End
A-15->A
End
End
End
getKey
End
Ans->K
End
DelVar [A]
ClrHome
Videos coming (since I can't do gifs of the CE) soon
EDIT: DOWNLOAD!
EDIT 2: Anyone have any thoughts on this?
Michael2_3B wrote:
Also, what would be a quick, fast method of moving a matrix a layer down? The matrix is 4 wide and 11 tall. The last row of elements is a placeholder so that when a tile hits the bottom it sees the next row down as having something, so it stacks on top of it. Anyways, so what I want to happen is to have the 10th row of elements deleted (or any other row, depending on how I decide to design the game), then move all the rows of elements above that down by 1 element. I know I could use some For() loops but that may be a bit slow.