Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: pimathbrainiac on November 07, 2012, 11:53:51 am
-
So basically, I have used another part of the forum to get help, but I think i will do the rest of the posting here.
Thanks to all those who are helping and will help
This is AXECHESS:
(http://img.removedfromgame.com/imgs/GHESSGIF1.2.gif)
The SRC, the App, the Readme, and the Screenshot are attached.
AXECHESS needs help with AI, move checks, en passant, and promotion.
help with code will be rewarded.
Edit: latest update: http://ourl.ca/17408/327488
-
One suggestion i have would be to XOR your cursor instead of ORing/replacing whatever's there, that way you can still see what piece you have selected. I'm not very good at chess, though ;)
-
chicken: If you look good at the screenie you can see that the selected piece is in the upper left corner. And may I know why this needs to be an app? (I think it's not over 8811 bytes?)
-
It's an app b/c originally, it was too big to be a prog.
-
chicken: If you look good at the screenie you can see that the selected piece is in the upper left corner.
Yeah, but only AFTER you've selected it. You could also use that side are to show a more detailed (read: larger) sprite of the piece you've selected. I'm not sure what all of those terms mean, but are pieces restricted to squares they are allowed to go to? ie the bishop can only move diagonally, the pawns can only move forward unless they are attacking, etc.
What exactly is it you need help with? I can't help with AI as i really suck at chess, someone from the TI-CT like Lionel or thepenguin77 who wrote an asm version might be able to help, but i can maybe help explain how to do some of the other things.
-
HUGE EDIT: (complete post revamp to be exact)
Okay as for AI, thepenguin77 has a position evaluation formula in the readme of his chess game, which you could use for your engine too.
-
This is impressive so far!
-
HUGE EDIT: (complete post revamp to be exact)
Okay as for AI, thepenguin77 has a position evaluation formula in the readme of his chess game, which you could use for your engine too.
Can you link me to the file?
-
pimath, the ticalc.org link to it has been given to you at least twice in your other thread :P
Also I moved this thread to the Z80 projects subforum
-
I see that now... *facepalm* I need to pay more attention
-
looking epic with the new screenshot!
Great work so far :D
-
Thanks for positive stuff!
I love everyone's helpful attitude!
-
I see that now... *facepalm* I need to pay more attention
No worries.
And nice to see the screen not disappearing while you're picking a piece. Do you have any other plans besides adding in AI?
-
rule checks, promotion, and en passant
-
you can move the pieces anywhere at the moment?
-
no, you can make illegal moves though... HOW they move is what is in the code... WHERE they CAN is not in yet...
-
*puzzles*
So if I get it right, you can have 2 pieces on one square or so?
-
kinda... only pawns when not using a capturing move.
-
Hey, I need to change a sprite from one hex to another during promotion. I DelVar the sprite, then create a new one with the same name, and assign a new hex to said sprite... but when compiling, I get an invalid token error... any ideas?
-
Can't you just not display the pawn and draw a queen (or something else) instead?
-
if you look at the graphics routine, no...
Lbl O
ClrDraw
Line(19,1,19,57)
Line(26,1,26,57)
Line(33,1,33,57)
Line(40,1,40,57)
Line(47,1,47,57)
Line(54,1,54,57)
Line(61,1,61,57)
Line(68,1,68,57)
Line(75,1,75,57)
Line(19,1,75,1)
Line(19,8,75,8)
Line(19,15,75,15)
Line(19,22,75,22)
Line(19,29,75,29)
Line(19,36,75,36)
Line(19,43,75,43)
Line(19,50,75,50)
Line(19,57,75,57)
Pt-On({L+1},{L‚+1},Pic2R)
Pt-On({L+2},{L‚+2},Pic2N
Pt-On({L+3},{L‚+3},Pic2B)
Pt-On({L+4},{L‚+4},Pic2Q)
Pt-On({L+5},{L‚+5},Pic2K)
Pt-On({L+6},{L‚+6},Pic2B)
Pt-On({L+7},{L‚+7},Pic2N)
Pt-On({L+8},{L‚+8},Pic2R)
Pt-On({L+9},{L‚+9},Pic2P9)
Pt-On({L+10},{L‚+10},Pic2P10)
Pt-On({L+11},{L‚+11},Pic2P11)
Pt-On({L+12},{L‚+12},Pic2P12)
Pt-On({L+13},{L‚+13},Pic2P13)
Pt-On({L+14},{L‚+14},Pic2P14)
Pt-On({L+15},{L‚+15},Pic2P15)
Pt-On({L+16},{L‚+16},Pic2P16)
Pt-On({L„+1},{L…+1},Pic1R)
Pt-On({L„+2},{L…+2},Pic1N)
Pt-On({L„+3},{L…+3},Pic1B)
Pt-On({L„+4},{L…+4},Pic1Q)
Pt-On({L„+5},{L…+5},Pic1K)
Pt-On({L„+6},{L…+6},Pic1B)
Pt-On({L„+7},{L…+7},Pic1N)
Pt-On({L„+8},{L…+8},Pic1R)
Pt-On({L„+9},{L…+9},Pic1P9)
Pt-On({L„+10},{L…+10},Pic1P10)
Pt-On({L„+11},{L…+11},Pic1P11)
Pt-On({L„+12},{L…+12},Pic1P12)
Pt-On({L„+13},{L…+13},Pic1P13)
Pt-On({L„+14},{L…+14},Pic1P14)
Pt-On({L„+15},{L…+15},Pic1P15)
Pt-On({L„+16},{L…+16},Pic1P16)
Pt-On({Lƒ+17},{Lƒ+18},Pic3)
DispGraph
Return
I need to physically change the sprite assignment
this is where I get the error:
Lbl P
1ü{Lƒ+18}
19ü{Lƒ+17}
Repeat (getKey(56))
sub(M)
If (getKey(54))
If (({Lƒ+17}=19) and ({Lƒ+18}=1))
DelVar Pic1P1
Pic1NüPic1P1
2üY
End
End
ClrDraw
Pt-On(19,1,Pic1N)
Pt-On(26,1,Pic1B)
Pt-On(33,1,Pic1R)
Pt-On(40,1,Pic1Q)
End
Return
-
Ok I made your graphics routine slightly shorter, but your data needs to be restructured.
data structure:
-sprites:
[hexWPAWN]->Pic1PCS
[hexWBISHOP][hexWKNIGHT][hexWROOK][hexWQUEEN][hexWKING][continue here for the 6 black pieces]
-------
how the pieces are stored in L1:
{taken?(0 if still on the board),xpos,ypos,pieceno(0=pawn,1=bishop, just like the sprite arrangement, and no need for B/W pieces)}
-----
Now the big thing: drawing the stuff.
For(A,0,31)
if {A*4+L1}=!0
A>15->B
pt-on(A*4+L1+1,A*4+L1+2,8*{A*4+L1+3}+Pic1PCS+48*B) ;; the x and y positions might be a bit off. you should change this later on.
end
end
I think that will do it :D
-
I'm going to try the graphics addition now...
-
Ok. I gotta eat now, post any questions you got :)
-
Hey, I need to change a sprite from one hex to another during promotion. I DelVar the sprite, then create a new one with the same name, and assign a new hex to said sprite... but when compiling, I get an invalid token error... any ideas?
Wait, did you try to do for example this ?
[<Hex>]→Str1
.code
Delvar Str1
.code
[<Hex>]→Str1
O.O
That is not possible in Axe. I quote shmibs here because he explains very well:
the difference here is that, in basic, STR1 is the name of an external object that is created in ram when the program is running, and can be modified however you choose. in axe, however, STR1 is a pre-processor directive. there is no actual object named STR1 that is created, and it is not used at all by your running program. STR1 is a label used by the compiler to point to a specific spot in your compiled program itself, so you can't tell it to point to two different places at once, which is what saying "store X" -> STR1 and then "store Y" -> STR1 is doing. the first time the compiler sees that, it appends the data "store X" to your program and then labels that point as STR1 for everything else to use. the second line would, then, be trying to append data at a different spot in the program and tell the compiler that that place is also called "STR1", which is causing an issue.
now, all that being said, it's easy enough to modify data stored at an STR#, GDB#, or PIC# label later on, provided that you are compiling a program, that will run in standard RAM space, rather than an application. you have to use the label as a part of a pointer, though, and store all the number values manually. it's much easier to work with free ram areas outside of your own program, like hayleia showed above.
And since shmibs' post tells about one of my post, I quote it too:
It says Duplicate Symbol because you are using twice the pointer Str1.
Note that Str1 is a pointer, not a string, and Axe is not Basic ;)
What you can do is that:
"STRING1"→GDB1
"1GNIRTS"→GDB2
Then, when you need the first string, do that:
Fill(L1,8,0)
Copy(GDB1,L1,7)
Now, at the pointer L1, you have a null-terminated string with "STRING1"[00] in it :)
And to get the second string in L1, do that:
Fill(L1,8,0)
Copy(GDB2,L1,7)
-
Hmm...Might I recommend a 3-level gray, where the tiles are grey and white? That way you can use more of the tile (no outlines) leading to larger, better looking pieces.
-
I want to get the basic mechanics down first
Edit: Hayleia, I have no idea what you mean
-
To summarize hayleia's point: str, gdb, pic are not the same as the Basic str, pic, gdb.
-
I'd recommend having an array filled with each piece. Each piece would then have the following attributes: position and type (from which the sprite and moves could be derived). It'd be a lot simpler than what you're doing right now - that way, you can just swap out the type, subsequently changing the sprite pointers and movement rules.
-
it needs one more attribute: Alive or dead. Way easier than having a dynamically resizing list, and you just check that first before moving.
-
Not if all 64 squares are accounted for. It would probably be a lot easier to keep track of all squares than to deal with 32 pieces - mainly because of pawn promotion.
-
Pawn promotion wouldn't be too difficult, if you've got an array of pieces. If a piece moves to the opposite edge, then if it's a pawn, it becomes a queen. That doesn't really change with your storage method.
-
Oh, I see. I was imagining that you were thinking of a separate array for each type of piece... Silly me.
-
it needs one more attribute: Alive or dead. Way easier than having a dynamically resizing list, and you just check that first before moving.
Well I was thinking that dead pieces could be type 0 or something, so that you wouldn't need 32 more bytes (or nibbles) just for that attribute.
-
That would work, especially since pieces never have to come back from the dead.
-
I second leafy's suggestion, having specific coordinates would make checking for valid moves a cinch, and you could even show possible moves based on the piece's present location.
-
You guys no read other's posts? I accounted everything I said in the code I posted. Lol.
[sorry this is not meant rude, I'm just kind of surprised you had not seen it]
EDIT: quoting myself:
Ok I made your graphics routine slightly shorter, but your data needs to be restructured.
data structure:
-sprites:
[hexWPAWN]->Pic1PCS
[hexWBISHOP][hexWKNIGHT][hexWROOK][hexWQUEEN][hexWKING][continue here for the 6 black pieces]
-------
how the pieces are stored in L1:
{taken?(0 if still on the board),xpos,ypos,pieceno(0=pawn,1=bishop, just like the sprite arrangement, and no need for B/W pieces)}
-----
Now the big thing: drawing the stuff.
For(A,0,31)
if {A*4+L1}=!0
A>15->B
pt-on(A*4+L1+1,A*4+L1+2,8*{A*4+L1+3}+Pic1PCS+48*B) ;; the x and y positions might be a bit off. you should change this later on.
end
end
I think that will do it :D
-
pt-on(A*4+L1+1,A*4+L1+2,8*{A*4+L1+3}+Pic1PCS+48*B)
But that will never work ???
A*4+L1+1 is far beyond 96, A*4+L1+2 is far beyond 64 so there is nothing drawn on screen, and 8*{A*4+L1+3}+Pic1PCS+48*B is surely not the right number, since you multiplied Pic1PCS by B.
(Your line could be optimized as pt-on(A*4+L1+1,+1,{+1}*8+Pic1PCS+48*B) but it is not important since the code is wrong)
-
erw, you are right T.T thanks for pointing that out. (I haven't programmed in a loooong time)
I made a huge mistake: the pt-on command should be this:
pt-on({A*4+L1+1},{A*4+L1+2},8*{A*4+L1+3}+Pic1PCS+(48*B))
Sorry o*.*o
-
erw, you are right T.T thanks for pointing that out. (I haven't programmed in a loooong time)
I made a huge mistake: the pt-on command should be this:
pt-on({A*4+L1+1},{A*4+L1+2},8*{A*4+L1+3}+Pic1PCS+(48*B))
Sorry o*.*o
That is better like that ;)
But that still can be optimized as pt-on({A*4+L1+1→r1},{r1+1},B*6+{r1+2}*8+Pic1PCS) :P
Moreover, I don't get why you make an array with pieces with X,Y,type,etc, instead of just making some sort of a tilemap on the checkerboard ???
-
what would the syntax be to store all this shtuff in L1? I am somewhat confused
-
so this is the way you have it stored:
{taken,x,y,piece}
taken is the 0th element in this so-called array.
To access the nth variable of the pth piece, you need to do this:
{p*4+n+L1}
p needs to be multiplied by four because each piece uses up 4 bytes of data in the array.
Hope that explains it :)
And I agree with Hayleia that a 64-byte array for representing the board would be handier. But that's your choice :)
-
so... to declare it, it would be {stuff}->L1?
-
No. To declare it you would use number-to-store->{p*4+n+L1}
-
{all stuff separated by commas}->{p*4+n+L1}?
-
No that's not possible. I think this needs some explaination.
A WILD POINTER TUTORIAL APPEARS!
What {p*4+n+L1} actually means is a place in memory. {p*4+n+L1} points to that place and is thus called a pointer. L1 is not a list like in Basic, it is a pointer. What you do when saying {p*4+n+L1} is tell the program to go to p*4+n bytes after L1. This can even be done with "variables": I bet you have had these weird characters on your screen when you forgot to say >dec when you wanted to output a number on screen. These weird characters are actually the contents of RAM at the place of your number :).
If you got any more questions, ask!
-
so, put all the different numbers for one piece on separate lines, n = 1, first being p*1+n, then p*2+n, etc. then the next piece, n = 2? (plz give me a code example)...
-
Imagine you have the white H-pawn. This is likely to be the eighth piece in L1. (remember that because we start counting from zero, we have to subtract one from this. This explains why I'll use seven instead of eight in the exciting piece of code following this boring story)
It moves on the last row. Because you are still debugging, you haven't included that you cannot promote into a king.
Now if we want to change the pawn in a king, we do:
;remember, the king is represented by 5
;also remember that the piece type is the 3rd element of the 4 bytes per piece, the 0th being if it's taken or not.
5 -> { 7*4 + 3 + L1} ;the p here is 7, the n is 3
-
Uh... aeTIos, when I compile I get a "duplicate symbol" exception for the pics
edit: here's my code (the error is when declaring pics)
.CHESS
[3844828282443800]üPic1PCS
[387CFEFEFE7C3800]üPic1PCS
[3068A4A484483000]üPic1PCS
[1058DCDCFC783000]üPic1PCS
[609088482848F800]üPic1PCS
[60F0F87838787800]üPic1PCS
[D6D67C2828287C00]üPic1PCS
[D6D67C3838387C00]üPic1PCS
[9254382828287C00]üPic1PCS
[9254383838387C00]üPic1PCS
[3828EE82EE283800]üPic1PCS
[3838FEFEFE383800]üPic1PCS
[FFFFFFFFFFFFFFFF]üPic3
19ü{Lƒ+17}
15ü{Lƒ+18}
20ü{0*4+0+L}
1ü{0*4+1+L}
27ü{1*4+0+L}
1ü{1*4+1+L}
34ü{2*4+0+L}
1ü{2*4+1+L}
41ü{3*4+0+L}
1ü{3*4+1+L}
48ü{4*4+0+L}
1ü{4*4+1+L}
55ü{5*4+0+L}
1ü{5*4+1+L}
62ü{6*4+0+L}
1ü{6*4+1+L}
69ü{7*4+0+L}
1ü{7*4+1+L}
20ü{8*4+0+L}
8ü{8*4+1+L}
27ü{9*4+0+L}
8ü{9*4+1+L}
34ü{10*4+0+L}
8ü{10*4+1+L}
41ü{11*4+0+L}
8ü{11*4+1+L}
48ü{12*4+0+L}
8ü{12*4+1+L}
55ü{13*4+0+L}
8ü{13*4+1+L}
62ü{14*4+0+L}
8ü{14*4+1+L}
69ü{15*4+0+L}
8ü{15*4+1+L}
50ü{16*4+1+L}ü{17*4+1+L}ü{18*4+1+L}ü{19*4+1+L}ü{20*4+1+L}ü{21*4+1+L}ü{22*4+1+L}ü{23*4+1+L}
20ü{16*4+0+L}
27ü{17*4+0+L}
34ü{18*4+0+L}
41ü{19*4+0+L}
48ü{20*4+0+L}
55ü{21*4+0+L}
62ü{22*4+0+L}
69ü{23*4+0+L}
43ü{24*4+1+L}ü{25*4+1+L}ü{26*4+1+L}ü{27*4+1+L}ü{28*4+1+L}ü{29*4+1+L}ü{30*4+1+L}ü{31*4+1+L}
20ü{24*4+0+L}
27ü{25*4+0+L}
34ü{26*4+0+L}
41ü{27*4+0+L}
48ü{28*4+0+L}
55ü{29*4+0+L}
62ü{30*4+0+L}
69ü{31*4+0+L}
0ü{24*4+3+L}ü{25*4+3+L}ü{26*4+3+L}ü{27*4+3+L}ü{28*4+3+L}ü{29*4+3+L}ü{30*4+3+L}ü{31*4+3+L}
1ü{8*4+3+L}ü{9*4+3+L}ü{10*4+3+L}ü{11*4+3+L}ü{12*4+3+L}ü{13*4+3+L}ü{14*4+3+L}ü{15*4+3+L}
2ü{2*4+3+L}ü{5*4+3+L}ü{18*4+3+L}ü{21*4+3+L}
3ü{1*4+3+L}ü{6*4+3+L}ü{17*4+3+L}ü{22*4+3+L}
4ü{0*4+3+L}ü{7*4+3+L}ü{16*4+3+L}ü{23*4+3+L}
5ü{3*4+3+L}ü{19*4+3+L}
6ü{4*4+3+L}ü{20*4+3+L}
Repeat (getKey(15))
sub(M)
If (0)
Lbl M
If ((getKey(3)) and ({Lƒ+17}<68))
{Lƒ+17}+7ü{Lƒ+17}
Pause 250
End
If ((getKey(2)) and ({Lƒ+17}>20))
{Lƒ+17}-7ü{Lƒ+17}
Pause 250
End
If ((getKey(4)) and ({Lƒ+18}>1))
{Lƒ+18}-7ü{Lƒ+18}
Pause 250
End
If ((getKey(1)) and ({Lƒ+18}<48))
{Lƒ+18}+7ü{Lƒ+18}
Pause 250
End
Return
End
If (getKey(54))
For(N,0,31)
If (({N*4+0+L}=({Lƒ+17}+1)) and ({N*4+1+L}={Lƒ+18}) and ({N*4+3+L}=0))
{N*4+0+L}üZ
{N*4+1+L}üÁ
sub(A)
Zü{N*4+0+L}
Áü{N*4+1+L}
End
End
End
sub(O)
If (0)
Lbl O
ClrDraw
Line(19,1,19,57)
Line(26,1,26,57)
Line(33,1,33,57)
Line(40,1,40,57)
Line(47,1,47,57)
Line(54,1,54,57)
Line(61,1,61,57)
Line(68,1,68,57)
Line(75,1,75,57)
Line(19,1,75,1)
Line(19,8,75,8)
Line(19,15,75,15)
Line(19,22,75,22)
Line(19,29,75,29)
Line(19,36,75,36)
Line(19,43,75,43)
Line(19,50,75,50)
Line(19,57,75,57)
For(A,0,31)
If ({A*4+L1}=!0)
A>15üB
Pt-On({A*4+L1+1?r1},{r1+1},B*6+{r1+2}*8+Pic1PCS)
End
End
DispGraph
Return
End
End
If (0)
Lbl A
Repeat (getKey(55))
sub(M)
If ((getKey(54)) and (((Á)-14)={Lƒ+18}) and ((Y)<1))
Á-14üÁ
1üY
End
If ((getKey(54)) and ((Á-7)={Lƒ+18}) and ((Z-1)={Lƒ+17}))
Á-7üÁ
1üY
End
If ((getKey(54)) and ((Á-7)={Lƒ+18}) and ((Z-7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L+X})) and (({Lƒ+18})=({L‚+X})))
0ü{L+X}
0ü{L‚+X}
Á-7üÁ
Z-7üZ
1üY
End
End
End
If ((getKey(54)) and ((Á-7)={Lƒ+18}) and ((Z+7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L+X})) and (({Lƒ+18})=({L‚+X})))
0ü{L+X}
0ü{L‚+X}
Á-7üÁ
Z+7üZ
1üY
End
End
End
sub(O)
End
Return
End
If (0)
Lbl B
Repeat (getKey(55))
sub(M)
If ((getKey(54)) and (((Á)+14)={Lƒ+18}) and ((Y)<1))
Á+14üÁ
1üY
End
If ((getKey(54)) and ((Á+7)={Lƒ+18}) and ((Z-1)={Lƒ+17}))
Á+7üÁ
1üY
End
If ((getKey(54)) and ((Á+7)={Lƒ+18}) and ((Z-7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L„+X})) and (({Lƒ+18})=({L…+X})))
0ü{L„+X}
0ü{L…+X}
Á+7üÁ
Z-7üZ
1üY
End
End
End
If ((getKey(54)) and ((Á+7)={Lƒ+18}) and ((Z+7)=({Lƒ+17}+1)))
For(X,1,16)
If ((({Lƒ+17}+1)=({L„+X})) and (({Lƒ+18})=({L…+X})))
0ü{L„+X}
0ü{L…+X}
Á+7üÁ
0Z+7üZ
1üY
End
End
End
sub(O)
End
Return
End
If (0)
Lbl C
Repeat (getKey(55))
sub(M)
If (getKey(54))
For(V,1,50)
If (((Z+V)=({Lƒ+17}+1)) and ((Á+V)=({Lƒ+18}))
Z+VüZ
Á+VüÁ
End
If (((Z-V)=({Lƒ+17}+1)) and ((Á+V)={Lƒ+18}))
Z-VüZ
V+ÁüÁ
End
If (((Z+V)=({Lƒ+17}+1)) and ((Á-V)={Lƒ+18}))
Z+VüZ
Á-VüÁ
End
If (((Z-V)=({Lƒ+17}+1)) and ((Á-V)={Lƒ+18}))
Z-VüZ
Á-VüÁ
End
If (getKey(54))
For(X,1,16)
If ((({Lƒ+17}+1)={L+X}) and ({Lƒ+18}={L‚+X}))
0ü{L+X}
0ü{L‚+X}
End
End
End
If (getKey(54))
For(X,1,16)
If ((({Lƒ+17}+1)={L„+X}) and ({L…+X}={Lƒ+18}))
0ü{L„+X}
0ü{L…+X}
End
End
End
End
End
sub(O)
End
Return
End
If (0)
Lbl D
Repeat (getKey(55))
sub(M)
If (getKey(54))
For(V,1,49)
If ((Z=({Lƒ+17}+1) and ({Lƒ+18}=(Á+V)))
Á+VüÁ
End
If ((Z=({Lƒ+17}+1) and ({Lƒ+18}=(Á-V)))
Á-VüÁ
End
If (((Z+V)=({Lƒ+17}+1) and ({Lƒ+18}=Á))
Z+VüZ
End
If (((Z-V)=({Lƒ+17}+1) and ({Lƒ+18}=Á))
Z-VüZ
End
End
If (getKey(54))
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
End
sub(O)
End
Return
End
If (0)
Lbl E
Repeat (getKey(55))
sub(M)
If (getKey(54))
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á+14)))
Z+7üZ
Á+14üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á+14)))
Z-7üZ
Á+14üÁ
End
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á-14)))
Z+7üZ
Á-14üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á-14)))
Z-7üZ
Á-14üÁ
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=(Á+7)))
Z+14üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=(Á+7)))
Z-14üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=(Á-7)))
Z+14üZ
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=(Á-7)))
Z-14üZ
Á-7üÁ
End
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
sub(O)
End
Return
End
If (0)
Lbl F
Repeat (getKey(55))
sub(M)
If (getKey(54))
For(X,1,49)
If ((({Lƒ+17}+1)=(Z+X)) and ({Lƒ+18}=(Á+X)))
Z+XüZ
Á+XüÁ
End
If ((({Lƒ+17}+1)=(Z-X)) and ({Lƒ+18}=(Á+X)))
Z-XüZ
Á+XüÁ
End
If ((({Lƒ+17}+1)=(Z+X)) and ({Lƒ+18}=(Á-X)))
Z+XüZ
Á-XüÁ
End
If ((({Lƒ+17}+1)=(Z-X)) and ({Lƒ+18}=(Á-X)))
Z-XüZ
Á-XüÁ
End
If ((({Lƒ+17}+1)=(Z+X)) and ({Lƒ+18}=(Á)))
Z+XüZ
End
If ((({Lƒ+17}+1)=(Z-X)) and ({Lƒ+18}=(Á)))
Z-XüZ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á+X)))
Á+XüÁ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á-X)))
Á-XüÁ
End
End
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
sub(O)
End
Return
End
If (0)
Lbl G
Repeat (getKey(55))
sub(M)
If (getKey(54))
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á+7)))
Z+7üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á+7)))
Z-7üZ
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á-7)))
Z+7üZ
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á-7)))
Z-7üZ
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z+7)) and ({Lƒ+18}=(Á)))
Z+7üZ
End
If ((({Lƒ+17}+1)=(Z-7)) and ({Lƒ+18}=(Á)))
Z-7üZ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á+7)))
Á+7üÁ
End
If ((({Lƒ+17}+1)=(Z)) and ({Lƒ+18}=(Á-7)))
Á-7üÁ
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=Á) and (Á={L…+8}))
Z+14üZ
{L„+8}-14ü{L„+8}
End
If ((({Lƒ+17}+1)=(Z+14)) and ({Lƒ+18}=Á) and (Á={L‚+8}))
Z+14üZ
{L+8}-14ü{L+8}
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=Á) and (Á={L‚+1}))
Z-14üZ
{L+1}+21ü{L+1}
End
If ((({Lƒ+17}+1)=(Z-14)) and ({Lƒ+18}=Á) and (Á={L…+1}))
Z-14üZ
{L„+1}+21ü{L„+1}
End
For(V,1,16)
If ((({Lƒ+17}+1)={L+V}) and ({Lƒ+18}={L‚+V}))
0ü{L+V}
0ü{L‚+V}
End
If ((({Lƒ+17}+1)={L„+V}) and ({Lƒ+18}={L…+V}))
0ü{L„+V}
0ü{L…+V}
End
End
End
sub(O)
End
Return
End
If (0)
Lbl P
Return
End
-
You don't need to declare Pic1PCS every time. only the first time is sufficient :)
-
but how do I declare all the other pics?
-
You don't need that. :D
-
Well, I'm taking a break from this project for a little bit. I hope it will continue :-)
-
NEWS! Promotion WORKING!!!!!!!!!!! Will post file as soon as I bugfix.
edit: IT WORKS!
Screenie:
(http://i48.tinypic.com/15gtnvd.gif)
Promotion Screenie:
(http://i49.tinypic.com/beirtk.gif)
THANK YOU aeTIos FOR ALL YOUR HELP!
-
I didn't know promotion existed in Chess O.O.
Nice to see new updates, though. Also it looks quite nice. :)
-
And now... the files!
-
Up Next: AI
-
/me shamelessly bumps
/me also asks the following questions:
Should I add linking before AI?
Or should I not add linking?
-
What's linking?
-
linking between calcs...
-
Hm... I think that AI would be more important; I would do AI first
-
gotcha! thanks for the advice!
Edit: Also: fixed bugs on the prog with black pawns... New Files Attached! :w00t:
-
:D I got a new version for all ye! :D
New graphics! 3 lvl Grayscale! Bugfixes! Take a look!
Screenies:
(http://img.removedfromgame.com/imgs/AXECHESSv2.1.gif)
(http://img.removedfromgame.com/imgs/PROMOTION.gif)
-
this is looking nice! And, does it need to be compiled as app?
-
Still, you should change the selection cursor to pt-change. looks nice :D
-
For some reason, the zip won't upload...
Here are the files as separate attachments...
-
PROGRESS UPDATE!!!
I just broke the game >:(
I'm going to have to start all over!!!
My AI algorithm went bonkers when I first ran it, and now I lost the code (my fault) and have to start over again from the latest update on.
-
Don't you have any backups? D:
-
No... I forgot to make them!!! >:(
I guess I must try again
-
But don't forget to do backups this time :P
-
That sucks D:
The most code I probably lost in axe is my whole grappling/movement engine from Grappler. But that doesn't really matter anymore because I never finished that game :P
After time, you'll learn to make backups.
Then backups of your backups.
And then backups of your backups of your backups.
And if you're feeling a little paranoid, backups of your backups of your backups of your backups.
-
PROGRESS UPDATE!!!
I just broke the game >:(
I'm going to have to start all over!!!
My AI algorithm went bonkers when I first ran it, and now I lost the code (my fault) and have to start over again from the latest update on.
So sorry to hear this. That has got to be very frustrating. I hope you don't let it discourage you -- the game looks magnificent!
-
You could start doing axe backups on-calc, they help too, to do that put your program in ram and hit alpha instead of 2ND/ENTER in the compiling menu.
It already saved some of my files, lol
-
That sucks D:
The most code I probably lost in axe is my whole grappling/movement engine from Grappler. But that doesn't really matter anymore because I never finished that game :P
After time, you'll learn to make backups.
Then backups of your backups.
And then backups of your backups of your backups.
And if you're feeling a little paranoid, backups of your backups of your backups of your backups.
How about backups of your backups of your backups of your backups of your backups???
Anyway, I didn't think that the AI would work that well the way I did it, anyway.
-
So, it was unarchived source? You should be able to get the code from Axe itself, by compiling the one with a # in front.
-
When I'm working on a project, I back my source up in groups and never delete old backups until I hit a garbage collect.
(Until that happens, deleting anything from archive doesn't do anything except make it harder for you to recover old backups.)
-
OH, yeah, I do groups and axe backup >.>
And every now and then i backup groups and programs to the pc.
-
This sucks. I personally had this happen before with a BASIC game. I ended up just scrapping it. I had a backup, but then when I tried to restore to previous state, I overwrote my older version with the new one >.<.
-
I overwrote my older version with the new one >.<.
Something similar happend to me, I /thought/ that the code was lost so i grabbed a older version and overwrote the current intact one O.o
-
I still have problems with remembering to back up stuff.
I just lost all my computer science files x.x
-
I just lost all my computer science files x.x
I recently (4 months ago) lost ALL my computer files.
I reinstalled the os and backup didn't work
oh, well, luckily i have my big programming projects on servers...
-
Is it set up so that the location of the pieces are in an appv? If it is then you could place 8 black and 8 white queens off of the screen, and then when a pawn reaches the other side, place the pawn off of the screen and replace it with one of the queens. I made a chess app and thats what I did.
-
Is it set up so that the location of the pieces are in an appv? If it is then you could place 8 black and 8 white queens off of the screen, and then when a pawn reaches the other side, place the pawn off of the screen and replace it with one of the queens. I made a chess app and thats what I did.
Okay, person with a misleading name. Thank you for being so kind as to begin your reign on Omni with a necropost on the thread for my first ever major project.
Also: Why would I do that? It's a completely useless feature until I have the AI coded.
-
Well, that feature would be good even with two human players.
-
Well, that feature would be good even with two human players.
One does not simply interrupt a game of chess.
-
I think he meant that the feature of having variables for all possible pieces, even those offscreen, would be good idea.
-
Oh, I get it. I think I may add that now. It shouldn't be too hard!